三层交换机虚拟端口VLAN1配置远程管理地址,telnet用户名和登陆口令 (计算机的IP地址与交换机管理IP地址在同一网段)
Switch(config)#enble password xxxx //设置进入特权模式的密码;
Switch(config-line)#password xxxx //可以设置通过console端口连接设备及telnet远程登录时所需要的密码。
Switch(config)#line console 0
Switch(config-line)#password xxxx //设置console端口连接的密码
Switch(config-line)#login
Switch(config)#line vty 0 4
Switch(config-line)#password xxxx //设置远程telnet密码
Switch(config-line)#login
1、进入虚拟机接口
Switch>en
Switch#conf t
Switch(config)#interface vlan 1 //1、进入虚拟机接口,默认情况下交换机所有端口都处于 vlan 1 当中
Switch(config-if)#ip address 192.168.1.1 255.255.255.0 //配置交换机管理IP地址
Switch(config-if)#no shutdown //激活端口
Switch(config-if)#exit
2、设置进入特权模式的密码
Switch(config)#enable password 123456 //设置进入特权模式的密码
Switch(config)#line console ?
3、设置通过console端口连接设备的密码
Switch(config)#line console 0
Switch(config-line)#password haha //设置通过console端口连接设备的密码
Switch(config-line)#login
Switch(config-line)#exit
Switch(config)#line vty ?
4、设置telnet远程登录密码
Switch(config)#line vty 0 4
Switch(config-line)#password abc123 //设置telnet远程登录密码
Switch(config-line)#login
Switch(config-line)#end
5、查看配置情况
Switch#show running-config
四、验证
1、验证通过console端口连接设备的密码
Press RETURN to get started.
User Access Verification
Password: //这里输入haha
Switch>
2、验证进入特权模式的密码
Switch>en
Password: //这里输入123456
Switch#
3、验证telnet远程登录密码
a. 给PC机设置IP地址
b. 打开Command Prompt
PC>ipconfig
IPC>ping 192.168.1.1
PC>telnet 192.168.1.1 //远程登录 vty密码telnet的
Switch>en 登录特权密码
Switch#show running-config