VLAN划分实验的基础配置,我刚接触这方面知识不是太久,如有错误地方请见谅,此配置为思科模拟器配置案例分享给大家学习下。

Switch>en
Switch>enable
Switch#conf
Switch#configure
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#in v
Switch(config)#in vlan 1
Switch(config-if)#ip add 192.168.1.4 255.255.255.0
Switch(config-if)#no shut
Switch(config-if)#no shutdown

%LINK-5-CHANGED: Interface Vlan1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up

Switch(config-if)#exit
Switch(config)#v
Switch(config)#vlan 100
Switch(config-vlan)#exit
Switch(config)#vl
Switch(config)#vlan 200
Switch(config-vlan)#exit
Switch(config)#in r
Switch(config)#in range f0/1-8
Switch(config-if-range)#sw
Switch(config-if-range)#switchport m
Switch(config-if-range)#switchport mode a
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#sw
Switch(config-if-range)#switchport a
Switch(config-if-range)#switchport access v
Switch(config-if-range)#switchport access vlan 100
Switch(config-if-range)#exit
Switch(config)#in r
Switch(config)#in range f0/9-16
Switch(config-if-range)#sw
Switch(config-if-range)#switchport m
Switch(config-if-range)#switchport mode a
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#sw
Switch(config-if-range)#switchport a
Switch(config-if-range)#switchport access v
Switch(config-if-range)#switchport access vlan 200

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
Switch(config-if-range)#exit