IT Certification and Training Blog

A Case Study on Root Port Selection

Posted by Kelson Lawrence on Feb 8, 2011 10:20:00 AM

By Bryan Baize, CCIE #16139

describe the image

ASW1 is connected to DSW1 on F0/1 and F0/2, F0/1 connects to F0/11 on DSW1, F0/2 connects to F0/12 on DSW1. With default configuration on both switches. Initial show spanning-tree has DSW1 as Root, ASW1 is using F0/1 as the root port.


ASW1#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
Cost 19
Port 1 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000d.2989.edc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/2 Altn BLK 19 128.2 P2p

DSW1#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
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 0009.e81a.6f00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/11 Desg FWD 19 128.11 P2p
Fa0/12 Desg FWD 19 128.12 P2p


Test #1 Should port priority be set locally or upstream? Conclusion Upstream.

The following demonstrates that changing port priority on ASW1 F0/1 or F0/2 has no effect on root port selection.

ASW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ASW1(config-if)#spanning-tree port-priority 10
% Port Priority in increments of 16 is required

ASW1(config-if)#spanning-tree port-priority 16
ASW1(config-if)#end
ASW1#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
Cost 19
Port 1 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000d.2989.edc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 16.1 P2p
Fa0/2 Altn BLK 19 128.2 P2p
Fa0/5 Desg FWD 100 128.5 Shr

ASW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ASW1(config)#int f0/2
ASW1(config-if)#spanning-tree port-priority 16
ASW1(config-if)#end
ASW1#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
Cost 19
Port 1 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000d.2989.edc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/2 Altn BLK 19 16.2 P2p
Fa0/5 Desg FWD 100 128.5 Shr

Changing the port cost on DSW1 port F0/12 causes ASW1 to change it's root port to F0/2

DSW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
DSW1(config)#int f0/12
DSW1(config-if)#spanning-tree port-priority 16
DSW1(config-if)#do show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
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 0009.e81a.6f00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/11 Desg FWD 19 128.11 P2p
Fa0/12 Desg FWD 19 16.12 P2p

ASW1(config-if)#do show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
Cost 19
Port 2 (FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000d.2989.edc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Altn BLK 19 128.1 P2p
Fa0/2 Root LIS 19 128.2 P2p
Fa0/5 Desg FWD 100 128.5 Shr

Test #2 Should port cost be changed locally or upstream? Conclusion: locally

ASW1 is connected to DSW1 on F0/1 and F0/2, F0/1 connects to F0/11 on DSW1, F0/2 connects to F0/12 on DSW1. With default configuration on both switches. Initial show spanning-tree has DSW1 as Root, ASW1 is using F0/1 as root port.


ASW1#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
Cost 19
Port 1 (FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000d.2989.edc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/2 Altn BLK 19 128.2 P2p


DSW1#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
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 0009.e81a.6f00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/11 Desg FWD 19 128.11 P2p
Fa0/12 Desg FWD 19 128.12 P2p

Changing the port cost on ASW1 F0/2 causes the root port to change.

ASW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
ASW1(config)#int f0/2
ASW1(config-if)#spanning-tree cost 10
ASW1(config-if)#do show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
Cost 10
Port 2 (FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000d.2989.edc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Altn BLK 19 128.1 P2p
Fa0/2 Root LIS 10 128.2 P2p
Fa0/5 Desg FWD 100 128.5 Shr

Changing the port cost of DSW F0/11 does not cause ASW1 to change it's root port.

DSW1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
DSW1(config)#int f0/11
DSW1(config-if)#spanning-tree cost 1
DSW1#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
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 0009.e81a.6f00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/11 Desg FWD 1 128.11 P2p
Fa0/12 Desg FWD 19 128.12 P2p

ASW1#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0009.e81a.6f00
Cost 10
Port 2 (FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000d.2989.edc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300

Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Altn BLK 19 128.1 P2p
Fa0/2 Root FWD 10 128.2 P2p
Fa0/5 Desg FWD 100 128.5 Shr

 

 

 

 

Root credit: http://www.flickr.com/photos/sis/ / CC BY 2.0

Tags: Bryan Baize, case study root port selection, root port selection