設置交換機的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