Untitled document
CCIE Routing & Switching v5 Workbook -
CCIE R&S v5 Advanced Technology Labs -
LAN Switching
STP Root Bridge Election
A Note On Section Initial Configuration Files: You must load the
initial configuration files for the section, named Basic Layer2
Switching, which can be found in
. Reference the Virtual Routers & Physical
Switches Diagram to complete this task.
Task
Configure the inter-switch links between SW1 and all other switches as static 802.1q
trunk links.
Disable all other inter-switch links.
Configure VLAN 2 on all switches and:
Configure SW4 as the STP Root Bridge for VLAN 2 using the lowest
possible priority.
If SW4 goes down, SW1 should take over the STP Root Bridge role for
VLAN 2 using the second-lowest possible priority.
Configuration
SW1:
vlan 2
spanning-tree vlan 2 priority 4096
!
interface range FastEthernet0/19 - 24
switchport trunk encapsulation dot1q
switchport mode trunk
SW2:
vlan 2
interface range FastEthernet0/19 - 22
shutdown
!
interface range FastEthernet0/23 - 24
switchport trunk encapsulation dot1q
switchport mode trunk
SW3:
vlan 2
!
interface range FastEthernet0/19 - 20
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface range FastEthernet0/21 - 24
shutdown
SW4:
vlan 2
spanning-tree vlan 2 priority 0
!
interface range FastEthernet0/19 - 20
shutdown
!
interface range FastEthernet0/21 - 22
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface range FastEthernet0/23 - 24
shutdown
Verification
STP root bridge election is based on the priority and MAC address fields of the
Bridge ID. The device with the lowest priority value is elected the root. If there is a
tie in priority, the device with the lowest MAC address is elected root. SW4 with the
local priority of two, the configured priority of zero, plus the system id extension
(VLAN number), shows that This bridge is the root. The root bridge should show
the same priority and MAC address for both the Root ID and the Bridge ID, and list
all interfaces as Designated (downstream facing). In this case, SW4’s BID is
001a.a174.2500.
SW4#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieee
Root IDPriority2
Address001a.a174.2500 This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority2(priority 0 sys-id-ext 2)
Address001a.a174.2500
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec
InterfaceRole Sts CostPrio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------Fa0/21Desg FWD
19128.23
P2p Fa0/22Desg FWD
19128.24
P2p
Verify that all other switches agree that SW4 is the root bridge for VLAN 2 and have
selected their Root Port, which is the physical path with the lowest STP cost to
reach the root; because both SW1’s FastEthernet0/21 and FastEthernet0/22 have
the same cost of 19, the tie breaker is the lowest port-priority of the upstream
neighbor, which is SW4.
SW1#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieeeRoot ID Priority 2
Address
001a.a174.2500
Cost
19
Port
23 (FastEthernet0/21)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority4098 (priority 4096 sys-id-ext 2)
Address0013.605f.f000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
InterfaceRole Sts CostPrio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/19Desg FWD 19
128.21 P2p
Fa0/20Desg FWD 19
128.22 P2p Fa0/21Root FWD 19128.23 P2p
Fa0/22Altn BLK 19
128.24 P2p
Fa0/23Desg FWD 19
128.25 P2p
Fa0/24Desg FWD 19
128.26 P2p
!
!SW1#show spanning-tree vlan 2 root detail
VLAN0002
Root ID
Priority
2
Address
001a.a174.2500
Cost19 Port23 (FastEthernet0/21)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
!
!SW4#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieee
Root IDPriority
2
Address
001a.a174.2500
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority2(priority 0 sys-id-ext 2)
Address001a.a174.2500
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
InterfaceRole Sts CostPrio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/21Desg FWD 19128.23
P2p Fa0/22Desg FWD 19128.24
P2p
SW2 agrees that the device with the BID 001a.a174.2500 is the root bridge and
uses its Fa0/23 port with a total cost of 38 to reach it. SW2’s local BID is a priority of
32770, the default of 32768 plus the system id extension 2, and the MAC address
000a.b832.3a80.
SW2#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieee
Root IDPriority
2
Address
001a.a174.2500
Cost
38
Port
25 (FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority32770 (priority 32768 sys-id-ext 2)
Address000a.b832.3a80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
InterfaceRole Sts CostPrio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/23Root FWD 19128.25 P2p
Fa0/24Altn BLK 19128.26 P2p
SW3 agrees that the device with the BID 001a.a174.2500 is the root bridge and
uses its Fa0/19 port with a total cost of 38 to reach it. SW3’s local BID is a priority of
32770, the default of 32768 plus the system id extension 2, and the MAC address
0022.5627.1f80.
SW3#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieee
Root IDPriority
2
Address
001a.a174.2500
Cost
38
Port
21 (FastEthernet0/19)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority32770 (priority 32768 sys-id-ext 2)
Address0022.5627.1f80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
InterfaceRole Sts CostPrio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/19Root FWD 19
128.21 P2p
Fa0/20Altn BLK 19
128.22 P2p
If SW4’s trunk links to SW1 are disabled, SW1 will become the root bridge because
it has the next-best priority value of 4096.
SW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#interface range fastEthernet0/21 - 22
SW1(config-if-range)#shutdown
!
!
SW1#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieeeRoot ID Priority 4098
Address0013.605f.f000
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority4098 (priority 4096 sys-id-ext 2)
Address0013.605f.f000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec
InterfaceRole Sts CostPrio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------Fa0/19Desg FWD
19128.21
P2p Fa0/20Desg FWD
19128.22
P2p Fa0/23Desg FWD
19128.25
P2p Fa0/24Desg FWD
19128.26
P2p
Verify that both SW2 and SW3 agree that SW1 is the new current root bridge for
VLAN 2:
SW2#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieeeRoot ID Priority 4098
Address0013.605f.f000
Cost19
Port25 (FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority32770 (priority 32768 sys-id-ext 2)
Address000a.b832.3a80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
InterfaceRole Sts CostPrio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/23Root FWD 19
128.25 P2p
Fa0/24Altn BLK 19
128.26 P2p
!
!SW3#show spanning-tree vlan 2
VLAN0002
Spanning tree enabled protocol ieeeRoot ID Priority 4098
Address0013.605f.f000
Cost19
Port21 (FastEthernet0/19)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority32770 (priority 32768 sys-id-ext 2)
Address0022.5627.1f80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
InterfaceRole Sts CostPrio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/19Root FWD 19
128.21 P2p
Fa0/20Altn BLK 19
128.22 P2p