Layer three switches: switch0
Layer two switches: switch1, switch2, switch3
switch0——f0/24——switch0
switch1——f0/1——switch2
switch2——f0/2——switch3
ip:192.168.149.1~9
xsb: vlan149 f0/11
gcb:vlan150 f0/12
rsb:vlan151 f0/13
PC1~PC9 configure IP as 192.168.149.1~192.168.149.9
192.168.149.1
255.255.255.0
switch1、switch2、switch3设置
//进入vlan 数据库
vlan database//vl dat
//新增vlan149为xsb
vlan 149 name xsb
vlan 150 name gcb
vlan 151 name rsb
xsb: vlan149 f0/11
gcb: vlan150 f0/12
rsb: vlan151 f0/13
//进入配置模式
conf t
//进入f0/11在access模式下允许vlan 149通过
int f0/11
switchport access vlan 149 //swi a v 149
int f0/12
swi a v 150
int f0/13
swi a v 151
Set the mode leading to switch1 and switch3 to trunk in switch2
//进入配置模式
conf t
//进入接口 f0/1
int f0/1
//将端口配置成trunk模式
switchport mode trunk //不属于任何一个vlan,允许多个vlan通过
int f0/2
swi m t
——————————————————————————————————————
Run for a while
sh vl //sh vlan //show vlan