Options

STP Confusion

ThenyoThenyo Member Posts: 10 ■□□□□□□□□□
So I've always had a tough time grasping exactly how STP decides which ports to make root/designated/block. I was recently challenged by someone to come up with a solution to why a specific link is blocked in a topology. It forced me to do the research required to gain an understanding of how it works. Im going to list the steps here, and correct me if I'm wrong.

Root Bridge is decided by the bridge with the lowest BID. The BID is the bridge priority + the MAC address.

Root ports are determined using the following process:

1. Lowest cost
2. Lowest received BID
3. Lowest received port-priority
4. Lowest local interface ID


Now if thats correct, then how does STP decide which switches have blocked ports and which do not?

For example:



Root Bridge is SW1 due to having the lower BID. Now here is where I am confused. Why is it that SW2 has the 2 blocked links rather than SW3 having the blocked links? Is it due to Gi0/1 winning the root port election? Someone described designated ports as being the ports connected to root ports. How come fa0/2 is a Designated port and its connected to a blocked port?

Comments

  • Options
    jebrown21jebrown21 Member Posts: 20 ■□□□□□□□□□
    The blocked ports are chosen by the lowest cost to root. SW2 Fa 0/1 is blocked because SW1 Fa 0/1 is the root and the roots ports cannot be anything but in a forwarding state and have a Desg role. (19 cost vs 0 cost).

    SW2 Gi 0/2 is blocked because it's cost to root is 23 (or 19? Not sure if the SW2 to SW1 link counts in this since it's blocked) where as SW3 Fa 0/2's cost to root is only 4.
  • Options
    ThenyoThenyo Member Posts: 10 ■□□□□□□□□□
    Another example:






    How did STP decide which ports are designated and which are blocked? How come Switch 3 doesnt have all 3 ports forwarding, and Switch 1 with only the root port forwarding? Or in other words, how come they aren't switched around? Same thing with Switch 2. How come fa0/3 is blocked and fa0/2 is forwarding? Why isnt it the other way around?

    I seem to be able to predict root port elections but I don't quite understand how Designated/Non-Designated ports come to be.
  • Options
    jebrown21jebrown21 Member Posts: 20 ■□□□□□□□□□
    SW2 Fa 0/3 got blocked because it lost the tiebreaker of lowest BID. The cost to root was the same for both Switch 2 and Switch 1, which was 19 for each. The first tiebreaker is lowest BID and SW1 has a lower BID then SW2.

    SW3 Fa 0/2 got blocked for the same reason. SW2 has a lower BID then SW3. Both ports had a cost of 19.

    SW3 Fa 0/1 also got blocked for the same reason. SW1 has a lower BID then SW3.
Sign In or Register to comment.