cisco模拟器
配置SWA:Switch>enable 进入特权视图Switch#configure terminal 进入全局配置视图Switch(config)#vlan 10 创建VLAN10Switch(config-vlan)#exitSwitch(config)#vlan 20 创建VLAN20Switch(config-vlan)#exitSwitch(config)#interface fa0/1 进入端口1Switch(config-if)#switch access vlan 10 将端口1分配给VLAN10Switch(config-if)#no shut 启动端口Switch(config-if)#exitSwitch(config)#interface fa0/2 进入端口2Switch(config-if)#switch access vlan 20 将端口2分配给VLAN20Switch(config-if)#no shut 启动端口Switch(config-if)#exitSwitch(config)#exitSwitch#show vlan 查看VLAN表VLAN Name Status Ports10 VLAN0010 active Fa0/120 VLAN0020 active Fa0/2
配置SWB:Switch>enableSwitch#configure terminalSwitch(config)#vlan 10Switch(config-vlan)#exitSwitch(config)#vlan 20Switch(config-vlan)#exitSwitch(config)#interface fa0/1Switch(config-if)#switch access vlan 10Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#interface fa0/2Switch(config-if)#switch access vlan 20Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#exitSwitch#show vlanVLAN Name Status Ports10 VLAN0010 active Fa0/120 VLAN0020 active Fa0/2
配置SWA的Trunk口:Switch>enableSwitch#configure terminalSwitch(config)#interface fa0/3 进入端口3Switch(config-if)#switchport mode trunk 将端口3配置成Trunk口Switch(config-if)#switchport trunk allowed vlan 10,20Switch(config-if)#no shut 启用端口3Switch(config-if)#exit
配置SWB的Trunk口:Switch>enableSwitch#configure terminalSwitch(config)#interface fa0/3Switch(config-if)#switchport mode trunkSwitch(config-if)#switchport trunk allowed vlan 10,20 限制允许通过的VLANSwitch(config-if)#no shutSwitch(config-if)#exit