STP – Root / Designated / Blocking Port selection process, illustrated for both equal and unequal STP Cost diagrams!

STP_3switches2links

Consider the above Topology running STP with default settings, with 6 additional VLANs to the default Native VLAN 1, which links will be in what status by default?

 

Equal Cost link speeds in a default STP Port Selection process

 

First lets review the Root Port default election criteria once more:

  • Port that receives superior BPDU (Lowest Root Bridge ID)
  • Port with lowest Root Path cost
  • Port receiving BPDU with lowest sender BID
  • Port with lowest sender Port ID

Given the above Topology it can be identified SW1 will become the Root Bridge by default, so all of it’s ports will be put into Desg / FWD for all interfaces, and using the list of criteria we come up with the following for Root Port selection:

STP_3switches2links_2

The links with the lowest sender Port ID are elected as the Root Ports as all other criteria ties up to that point, however each switch has an additional link back to the Root Bridge in limbo, along with 4 interfaces (2 links) between each that will go to Designated (FWD) or Alternate (BLK) role / status.

When it comes to tie breakers for Designated / Alternate non-Root port election, two things are considered in the election criteria in the following order:

  • The switch with the lowest Root Cost is elected to have Designated ports
  • If tied for Root Cost, the switch with the lower Bridge ID wins
  • The remote side of the link is put into a non-Designated (BLK) status

The last bullet point illustrates the point that by default, only one side of the link will be in a Designated / FWD state unless it is a Root Port. So by this rule Fa1/0/1 and Fa1/0/5 on SW2 and SW3 will go into Altn / BLK while the other links are elected Root / FWD.

With the links connecting SW2 and SW3 being equal in this network, the MAC address again comes into play in the form of Lowest BID wins, and though SW2’s Bridge ID looks almost identical to SW3’s Bridge ID – However the last Hextet of SW2 is c800 whereas SW3’s last Hextet is ce00.

If it can be that similar on my lab equipment that I pieced together from different sources, it can be that similar on exam day, so watch for this on exam day!

Now the logical STP Topology can be accurately concluded to be the following:

STP_3switches2links_3

Again to note in this illustration, that if one end of a link is in Desg / FWD the remote end of the link must NOT be in a Forwarding state, unless it is selected to be a Root Port.

To verify this, I left the all interfaces in a non-Trunk mode, so the port LED will confirm:

SW1:

STP_SW1

SW2:

STP_SW2

SW3:

STP_SW3

Again the Amber port color on the LED indicates it is a non-Trunk port, as once configured as a Trunk port an interfaces LED will turn Green, even though it will remain in Altn / BLK whether it is a Trunk or Access port as demonstrated on SW3:

Trunk Verification:

SW3#sh int trunk

Port Mode Encapsulation Status Native vlan
Fa1/0/3 on 802.1q trunking 1
Fa1/0/4 on 802.1q trunking 1
Fa1/0/5 on 802.1q trunking 1
Fa1/0/6 on 802.1q trunking 1

Port Vlans allowed on trunk
Fa1/0/3 1-4094
Fa1/0/4 1-4094
Fa1/0/5 1-4094
Fa1/0/6 1-4094

Port Vlans allowed and active in management domain
Fa1/0/3 1,10,20,30,40,50,60
Fa1/0/4 1,10,20,30,40,50,60
Fa1/0/5 1,10,20,30,40,50,60
Fa1/0/6 1,10,20,30,40,50,60

Port Vlans in spanning tree forwarding state and not pruned
Fa1/0/3 none
Fa1/0/4 none
Fa1/0/5 1,10,20,30,40,50,60

Fa1/0/6 none
SW3#

Spanning-Tree Verification:

SW3#sh span

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 1ce6.c7c1.c800
Cost 19
Port 7 (FastEthernet1/0/5)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 5897.1eab.ce00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Fa1/0/3 Altn BLK 19 128.5 P2p
Fa1/0/4 Altn BLK 19 128.6 P2p
Fa1/0/5 Root FWD 19 128.7 P2p
Fa1/0/6 Altn BLK 19 128.8 P2p

So now, SW1 is the Root Bridge tasked with originating BPDUs solely for every VLAN in this switched network, while SW3 has 4 Trunk interfaces with 3 of them put into a Blocking status – So only one Trunk is Forwarding frames for ALL VLANS! Not cool!

Manually setting the Root Bridge per VLAN will be in an upcoming post, but while I am on this topic, I want to really beat it to death for clarity sake on exam day!

 

Unequal Cost link speeds in a default STP Port Selection process

 

Also when determining which ports will be Desg / FWD and which will be Altn / BLK, link speeds need to be considered, and you will need to manually add the cost hop by hop over each link back to the Root Bridge which is why knowing the STP link speed to STP Cost values is extremely important:

10Gbps = 2
1Gbps = 4
100Mbps = 19
10Mbps = 100

Consider this Topology, keeping in mind that BPDUs originate from the Root Bridge SW1, and given the different link speeds the Local BID is no longer the tie breaker:

STP_3switches2links_4

Looking at this Topology given a default STP election SW1 will become the Root Bridge and all its interfaces will be put into Desg / FWD, and its 1000mbps links leading the their respective switches will lead to the Root Ports on SW2 and SW3, meaning the other two ends of the links will be placed into Altn / BLK mode right off the bat:

STP_3switches2links_5

Now it boils down to these last two links between SW2 and SW3, however the devil is in the details of the non-Root Port Selection, to review in order:

  • The switch with the lowest Root Cost is elected to have Designated ports
  • If tied for Root Cost, the switch with the lower Bridge ID wins
  • The remote side of the link is put into a non-Designated (BLK) status

The lowest Root Cost for both links will be the same given this Topology, one path taking 1000mbps to 1000mbps links to the Root Bridge will have a Root Cost of 8, while the path taking the 100mbps to 1000mbps links to the Root Bridge will have a Root Cost of 23.

So once again, the lowest Local Bridge ID will be the tie breaker for Designated / Blocking Port selection:

STP_3switches2links_6

I couldn’t fit the Role / Status in there, but the red X’s on SW3 indicate the blocking status, this can also be seen on the two’s “sh span” output here:

SW2:

SW2#sh span

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 1ce6.c7c1.c800
Cost 4
Port 3 (FastEthernet1/0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 5897.1eab.c800
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Fa1/0/1 Root FWD 4 128.3 P2p
Fa1/0/2 Altn BLK 19 128.4 P2p
Fa1/0/3 Desg FWD 4 128.5 P2p
Fa1/0/4 Desg FWD 19 128.6 P2p

SW3:

SW3#sh span

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 1ce6.c7c1.c800
Cost 4
Port 8 (FastEthernet1/0/6)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 5897.1eab.ce00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
Fa1/0/3 Altn BLK 4 128.5 P2p
Fa1/0/4 Altn BLK 19 128.6 P2p
Fa1/0/5 Altn BLK 19 128.7 P2p
Fa1/0/6 Root FWD 4 128.8 P2p

So in the exam room and on the job, the quickest way to determine what ports are doing what is to first identify the Root Bridge and its Link Speeds, so you can identify the Root Port / Blocking Ports on connected switches

From there you can begin working your way through the network by link speed / BID, mapping out the Root Cost as you go, to determine the correct STP Port States!

I will be keeping this lab Topology (minus the cost changes to links) for the next lab up, which will be changing the Root Bridges for some of these VLANs, as the default election process has SW3 being VERY under-utilized for Frame forwarding while SW1 is originating all the BPDUs for EVERY VLAN in the switched network!

/fin

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s