Untitled document
CCIE Routing & Switching v5 Workbook -
CCIE R&S v5 Advanced Technology Labs -
LAN Switching
STP Path Selection with Port Cost
A Note On Section Initial Configuration Files: You must load the
initial configuration files for the section, named LAN Switching Initial
Spanning Tree, which can be found in
. Reference the Virtual Routers &
Physical Switches Diagram to complete this task.
Task
Using Spanning-Tree cost, ensure that traffic for all active VLANs from SW2 to SW1
uses Fa0/20 link between SW2 and SW4.
If this link goes down, traffic should use Fa0/19 link between SW2 and SW4.
Configuration
SW2:
interface range FastEthernet0/23 - 24
spanning-tree cost 1000
!
interface FastEthernet0/19
spanning-tree cost 2
!
interface FastEthernet0/20
spanning-tree cost 1
Verification
Check the STP path for one VLAN on SW2 before configuration changes, and note
that Root Port is Fa0/23, which directly connects SW2 to SW1.
SW2#show spanning-tree vlan 10
VLAN0010
Spanning tree enabled protocol ieeeRoot ID Priority 4106
Address
0013.605f.f000Cost19
Port
25 (FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority16394 (priority 16384 sys-id-ext 10)
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/19Desg FWD 19
128.21 P2p
Fa0/20Desg FWD 19
128.22 P2p Fa0/23Root FWD 19128.25 P2p
Fa0/24Altn BLK 19128.26 P2p
Note that the path from SW2 to SW1 through SW4 and SW3 is blocked at the SW4
level.
SW4#show spanning-tree vlan 10
VLAN0010
Spanning tree enabled protocol ieee
Root IDPriority
4106
Address
0013.605f.f000
Cost
38
Port
21 (FastEthernet0/19)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority8202 (priority 8192 sys-id-ext 10)
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/19Root FWD 19
128.21 P2p
Fa0/20Altn BLK 19
128.22 P2p Fa0/23Altn BLK 19128.25 P2p
Fa0/24Altn BLK 19
128.26 P2p
The STP cost to the root bridge from SW2 before configuration changes is 19.
Changing the links to SW1 to a cost of 1000 makes them the least-preferred path.
By changing the last link to SW4 to a cost of 1, the end-to-end path cost on that link
becomes 39, which is the most preferred (1 to SW4, 19 from SW4 to SW3, 19 from
SW3 to SW1). With the second-to-last link having a cost of 2, the end-to-end path
cost will be 40 and will therefore be the second-most preferred link:
SW2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#interface range FastEthernet0/23 - 24
SW2(config-if-range)#spanning-tree cost 1000
!SW2(config-if-range)#interface FastEthernet0/19
SW2(config-if)#spanning-tree cost 2
!SW2(config-if)#interface FastEthernet0/20
SW2(config-if)#spanning-tree cost 1
!
!SW2#show spanning-tree vlan 10
VLAN0010
Spanning tree enabled protocol ieeeRoot ID Priority 4106
Address
0013.605f.f000 Cost39
Port
22 (FastEthernet0/20)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority16394 (priority 16384 sys-id-ext 10)
Address000a.b832.3a80
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec
InterfaceRole Sts CostPrio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/19Altn BLK 2128.21 P2p Fa0/20Root FWD 1128.22 P2p
Fa0/23Altn BLK 1000
128.25 P2p
Fa0/24Altn BLK 1000
128.26 P2p
As shown above, the direct path from SW2 to SW1 is in blocking state, and the path
via SW4-->SW3-->SW1 is now the preferred path by STP.
SW4#show spanning-tree vlan 10
VLAN0010
Spanning tree enabled protocol ieee
Root IDPriority
4106
Address
0013.605f.f000
Cost
38
Port
25 (FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority8202 (priority 8192 sys-id-ext 10)
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/19Desg FWD 19
128.21 P2p
Fa0/20Desg FWD 19
128.22 P2p Fa0/23Root FWD 19128.25 P2p
Fa0/24Altn BLK 19128.26 P2p