登录与管理交换机
为交换机命名为sw1,配置进入特权模式的密码
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname sw1
sw1(config)#en secret 123456
sw1(config)#enable secret 123456
配置远程登录的密码
sw1(config)#line vty 0 4//进入线路配置模式,同时配置0-4个虚拟终端用户
sw1(config-line)#password 000000
sw1(config-line)#login//开启登录认证功能
sw1(config-line)#exit
配置交换机远程管理的ip地址
sw1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
sw1(config)#int vlan 1
sw1(config-if)#ip addr 192.168.100.3 255.255.255.248
sw1(config-if)#end
查看vlan虚接口的状态
sw1#show int vlan 1
Vlan1 is administratively down, line protocol is down
开启vlan虚接口
sw1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
sw1(config)#int vlan 1
sw1(config-if)#no shut
sw1(config-if)#
%LINK-5-CHANGED: Interface Vlan1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up
sw1(config-if)#end
再次检查vlan虚接口状态
sw1#
%SYS-5-CONFIG_I: Configured from console by console
show int vlan