【接入层交换机配置命令】实现划分vlan
Switch>EN
Switch#CONF T
Enter configuration commands, one per line. End
with CNTL/Z.
Switch(config)#VLAN 2
Switch(config-vlan)#EXIT
Switch(config)#EXIT
Switch#
Switch(config)#interface f0/1
Switch(config-if)#switchport access vlan
2 ---将端口加入vlan 2
Switch(config-if)#exit
Switch(config)#interface f0/2
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
Switch(config)#interface f0/3
Switch(config-if)#switchport access vlan 2
Switch(config-if)#exit
【修改交换机端口为truk类型】
Switch#CONF T
Enter configuration commands, one per line. End
with CNTL/Z.
Switch(config)#INT F0/24
Switch(config-if)#SWitchport Mode TRunk
%LINEPROTO-5-UPDOWN: Line protocol on Interface