Determining the Root Bridge
Look at Table 5.12. To determine your root bridge, you would obviously use the show
spanning-tree command. Let’s take a look at the other two switches and see which switch
is the default root bridge. Make a mental note of the bridge ID MAC address as well as the
priority of the S1 switch. Here’s the S2 output:
S2#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 000d.29bd.4b80
Cost 3019
Port 2 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 49153 (priority 49152 sys-id-ext 1)
Address 001a.e2ce.ff00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Uplinkfast enabled
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- ------------
Fa0/1 Root FWD 3019 128.2 P2p
Fa0/2 Altn BLK 3019 128.3 P2p
Fa0/3 Desg FWD 3100 128.4 Edge Shr
Fa0/4 Desg FWD 3019 128.5 Edge P2p
S2#
Command Meaning
spanning-tree vlan vlan priority
priority
Changes the STP priority of the PVST
spanning-tree vlan vlan
root primary
Sets the switch to be the primary root bridge of
the PVST
spanning-tree vlan vlan
root secondary
Sets the switch to be the secondary root of the PVST
TABLE 5 . 1 2 Command and Meaning
You can see that port Fa0/2 is blocked, so this cannot be your root bridge! A root bridge
cannot have blocked ports. Again, pay special attention to the bridge ID MAC address and the
priority. Here’s the output from the Core switch:
Core#sh spanning-tree
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 000d.29bd.4b80
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000d.29bd.4b80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------
Fa0/5 Desg FWD 19 128.5 P2p Peer(STP)
Fa0/6 Desg FWD 19 128.6 P2p Peer(STP)
Po1 Desg FWD 12 128.66 P2p Peer(STP)
Well there you have it. “This bridge is the root.”
But think about this—why does the Core switch have just the default of 32768 and not
49152 like the other switches? Well, it’s running the 802.1w version of STP and BackboneFast
is disabled by default.
Let’s take a look at the bridge MAC address of each switch:
S1 address: 001b.2b55.7500
S2 address: 001a.e2ce.ff00
Core address: 000d.29bd.4b80
If all switches are set to the default priority, which switch do you think will be the root
switch? Start reading the MAC addresses from the left, moving toward the right. Core is obviously
the lowest MAC address, and by looking at the output of the show spanning-tree
command, you can see that it is, indeed, the root bridge (even if all switches had the same
priority). It’s just good practice to figure out the root bridge by comparing the MAC addresses
of the switches once in awhile.