注:本次使用PacketTracer5模拟软件操作演示。
步骤一:
(1)从用户模式进入特权模式
(2)从特权模式切换到全局配置模式
Switch>
Switch>enable
Switch#configure terminal
Switch#
步骤二:
(1)设置交换机的启用密码。作用:作为用户模式进入特权模式的认证。
(2)配置Vlan 1的IP地址并启用Vlan 1接口
Switch(config)#
Switch(config)#enable password admin
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#
步骤三:
(1)进入虚拟终端线配置模式,允许0-4个用户同时访问
(2)设置通过VTY会话连接到交换机并登录时的密码
(3)启用登录认证功能
Switch(config)#
Switch(config)#line vty 0 4
Switch(config-line)#password password
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#
步骤四:
(1)从PC端使用Telnet命令进行登陆测试
提示:输入Telnet命令后,首先输入的是与VTY对应的密码。
测试使用PC的IP配置如下:
IP=192.168.1.10
MASK=255.255.255.0
GATEWAY=192.168.1.1