SW1
sw1(config)#int range f0/11 �C 12
sw1(config-if-range)#no sh
sw1(config-if-range)#sw mo tr
sw1(config-if-range)#^Z
SW2
sw2(config)#int range f0/11 �C 12
sw2(config-if-range)#no sh
sw2(config-if-range)#sw mo tr
sw2(config-if-range)#^Z
在SW1上查看生成树
sw1#sh spanning-tree
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address ccd1.4bb8.0000
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag set, detected flag set
Number of topology changes 1 last change occurred 00:00:21 ago
from FastEthernet0/11
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 21, notification 0, aging 0
Port 12 (FastEthernet0/11) of VLAN1 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.12.
Designated root has priority 32768, address ccd1.4bb8.0000
Designated bridge has priority 32768, address ccd1.4bb8.0000
Designated port id is 128.12, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 55, received 5
Port 13 (FastEthernet0/12) of VLAN1 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.13.
Designated root has priority 32768, address ccd1.4bb8.0000
Designated bridge has priority 32768, address ccd1.4bb8.0000
Designated port id is 128.13, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 55, received 6
Port12和Port13都为转发模式
在SW2上查看生成树
sw2#sh spanning-tree
VLAN1 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address ccd2.977c.0000
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32768, address ccd1.4bb8.0000
Root port is 12 (FastEthernet0/11), cost of root path is 19
Topology change flag set, detected flag not set
Number of topology changes 1 last change occurred 00:00:40 ago
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 0
Port 12 (FastEthernet0/11) of VLAN1 is forwarding
Port path cost 19, Port priority 128, Port Identifier 128.12.
Designated root has priority 32768, address ccd1.4bb8.0000
Designated bridge has priority 32768, address ccd1.4bb8.0000
Designated port id is 128.12, designated path cost 0
Timers: message age 1, forward delay 0, hold 0
Number of transitions to forwarding state: 1
BPDU: sent 1, received 18
Port 13 (FastEthernet0/12) of VLAN1 is blocking
Port path cost 19, Port priority 128, Port Identifier 128.13.
Designated root has priority 32768, address ccd1.4bb8.0000
Designated bridge has priority 32768, address ccd1.4bb8.0000
Designated port id is 128.13, designated path cost 0
Timers: message age 10, forward delay 0, hold 0
Number of transitions to forwarding state: 0
BPDU: sent 4, received 2
Port12为转发模式 Port13为阻塞模式