Vlan划分
1.首先连接好拓扑图,配置好ip地址
2.设置VLAN,给个交换机上都要这样进行设置
Switch>en
Switch>conf t
Switch>vlan database
Switch>vlan 10
Switch>vlan 20
Switch>vlan 30
Switch>exit
Switch>show vlan
3.将端口分配给VLAN(只需对s2和s3进行设置)
Switch#conf t
Switch(config)#int f0/11
Switch(config-if)#switchport access vlan 10
Switch(config)#int f0/18
Switch(config-if)#switchport access vlan 20
Switch(config)#int f0/6
Switch(config-if)#switchport access vlan 30
Switch(config-if)#end
Switch#show vlan
4.设置干线trunk(有交换机和交换机相连的端口就设置,并且每一个交换机都要设置)
Switch#conf t
Switch#int g0/1
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport trunk allowed vlan 10,20,30