设置交换机的enable 密码 bluestudy_a(config)#enable passWord bluestudy bluestudy_a(config)#enable secret bluestudy The enable secret you have chosen is the same as your enable password. This is not recommended. Re-enter the enable secret. 注:对于如上的密码,secret的优先级更高,优先起作用。
设置console口密码 bluestudy_a(config)#line con 0 bluestudy_a(config-line)#password bluestudy bluestudy_a(config-line)#
现在我将双方之间的channel配置去掉 bluestudy_a(config)#interface fastEthernet 0/1 bluestudy_a(config-if)#no port group 2 bluestudy_a(config-if)# bluestudy_a(config)#interface fastEthernet 0/2 bluestudy_a(config-if)#no port group 2 bluestudy_a(config-if)#
bluestudy_b(config)#interface fastEthernet 0/23 bluestudy_b(config-if)#no port group 2 bluestudy_b(config-if)# bluestudy_b(config)#interface fastEthernet 0/24 bluestudy_b(config-if)#no port group 2 bluestudy_a(config-if)#
然后打开Spanning tree bluestudy_a(config)#spanning-tree vlan 1 bluestudy_a(config)# bluestudy_b(config)#spanning-tree vlan 1 bluestudy_b(config)#
Spanning tree 1 is executing the IEEE compatible Spanning Tree PRotocol Bridge Identifier has priority 32768, address 0006.d74f.6700 Configured hello time 2, max age 20, forward delay 15 Current root has priority 32768, address 0006.5329.cd80 Root port is 13, cost of root path is 19 Topology change flag not set, detected flag not set, changes 30 Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Timers: hello 0, topology change 0, notification 0
Interface Fa0/1 (port 13) in Spanning tree 1 is FORWARDING Port path cost 19, Port priority 128 Designated root has priority 32768, address 0006.5329.cd80 Designated bridge has priority 32768, address 0006.5329.cd80 Designated port is 37, path cost 0 Timers: message age 1, forward delay 0, hold 0 BPDU: sent 2, received 358
Interface Fa0/2 (port 14) in Spanning tree 1 is BLOCKING Port path cost 19, Port priority 128 Designated root has priority 32768, address 0006.5329.cd80 Designated bridge has priority 32768, address 0006.5329.cd80 Designated port is 38, path cost 0 Timers: message age 0, forward delay 0, hold 0 BPDU: sent 1, received 351 Interface Fa0/3 (port 15) in Spanning tree 1 is down Port path cost 100, Port priority 128 Designated root has priority 32768, address 0006.5329.cd80 Designated bridge has priority 32768, address 0006.d74f.6700 Designated port is 15, path cost 19 Timers: message age 0, forward delay 0, hold 0 BPDU: sent 1, received 0
在交换机a上查看Spanning tree状态
bluestudy_b#show spanning-tree vlan 1 Interface Fa0/23 (port 37) in Spanning tree 1 is FORWARDING Port path cost 19, Port priority 128 Designated root has priority 150, address 0006.d74f.6700 Designated bridge has priority 150, address 0006.d74f.6700 Designated port is 13, path cost 0 Timers: message age 4, forward delay 0, hold 0 BPDU: sent 453, received 119
Interface Fa0/24 (port 38) in Spanning tree 1 is BLOCKING Port path cost 19, Port priority 128 Designated root has priority 150, address 0006.d74f.6700 Designated bridge has priority 150, address 0006.d74f.6700 Designated port is 14, path cost 0 Timers: message age 3, forward delay 0, hold 0 BPDU: sent 440, received 118 结果如上:一根通一根断
对堆叠端口同样进行trunk封装 bluestudy_a#config t Enter configuration commands, one per line. End with CNTL/Z. bluestudy_a(config)#interface gigabitEthernet 0/1(此端口为堆叠端口) bluestudy_a(config-if)#switchport mode trunk bluestudy_a(config-if)# bluestudy_b(config)#interface gigabitEthernet 0/1(此端口为堆叠端口) bluestudy_b(config-if)#switchport mode trunk bluestudy_b(config-if)# bluestudy_c(config)#interface gigabitEthernet 0/2(此端口为堆叠端口) bluestudy_c(config-if)#switchport mode trunk bluestudy_c(config-if)# bluestudy_d(config)#interface gigabitEthernet 0/2(此端口为堆叠端口) bluestudy_d(config-if