cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1722
Views
19
Helpful
28
Replies

STP blocking port location in square topology

pascal.coyles
Level 1
Level 1

Hi,

Can someone explain me in detail how the STP decides on the location of the blocking port in a square/circle of switches?

I have attached a real life example. Why is it blocking on the indicated port on that segment and not on the segment between the top left switches for example?

Many thanks,

Pascal Coyles

1 Accepted Solution

Accepted Solutions

Pascal, you are not stupid...you are asking excellent questions.

Each switch has to make a decision regarding which port to block. It will block the port that is receiving inferior BPDUs.

A BPDU is superior than another if it has:

A lower Root Bridge ID.

A lower path cost to the Root.

A lower Sending Bridge ID.

A lower Sending Port ID.

Using that algorithm, each switch will want to block the port that receives the inferior BPDU. However, its the switch that converges first that will block one of its ports accordingly and break the loop.

Clearer?

Victor

View solution in original post

28 Replies 28

bjw
Level 4
Level 4

There doesn't seem to be an attachment Pascal.

But in 802.1D with default settings the root bridge will be the lowest bridge ID and subsequently, if all costs are the same, the lowest STP port ID will be the root port.

Pascal:

In a square looped topology -- meaning, L2 connection exist for each side of the square, one of the inter switch links will have to be blocked to prevent a loop.

Now, as BJ rightly pointed out, the bridge with th elowest bridge ID will be elected as the root bridge for that VLAN, assuming you are running the ubiquitous pvst+. You can also rig that election and force any switch to be the root bridge, if you wanted.

Now, once the root bridge for a particular vlan is (s)elected, the root bridge will designate all the ports that face the other switches as designated ports, which SEND BPDUs to the root ports of the other switches. Root ports RECEIVE BPDUs.

Did I answer your question?

Victor

Pascal, now that I see the diagram, which you posted on the other thread, I can tell you that the port was chosen as the blocking port based on the cost advertised by the root bridge's BPDUs. If the port you are asking about (top-left) were to be blocked, the switch in the top-middle would have a cost of 12 to get to the root bridge, instead of only 8, as it is now.

Remember that BPDUs, which origniate at the root bridge, advertise cost to the root as they traverse the network and the cost is additive. The root bridge BPDU that is received on port 0/1 of the top-middle switch is inferior (has a higher cost to the root) as compared to the BPDU it receives on port 0/2. The port that receives that BPDU then becomes a candidate for blocking.

Lastly, remember that blocking does not mean blocking BPDUs, just traffic. BPDUs are still sent and received to maintain the topology and act as indicators of the network's health.

Did this clarify it for you?

If so, please rate this post.

Thank you

Victor

Hi Victor,

The top middle switch and the top right switch have both a cummulative cost of 8 to the root (the highest of all switches). To decide on the port that is blocked on the segment between the top middle switch and the the right switch the MAC address is used. Because the top middle switch has a lower MAC address his port isn't blocked. Isn't it like that?

Pascal

"The top middle switch and the top right switch have both a cummulative cost of 8 to the root (the highest of all switches)."

No, they dont. The top right switch has a cost of 8, the middle switch would have a cost of 12 (8 plus the cost of the link between itself and the top-right switch) were it to take the blocked path to the root at the bottom left.

Victor

Okay, I must be really stupid. But I still don't undertsand why the blocking is on the to right switch.

So far I understand this:

I understand that all ports pointing to the root and having the lowest cummulative path cost are Root Ports and thus forwarding.

BPDUs are sent from the root bridge only. Then the other switches relay those BPDUs but add their Root Port path cost.

How does the top left switch now he doesn't need to block his non-root port?

And how does the top right switch now that he has to block his non-root port?

Pascal

By the way, how do I delete a post?

Pascal, you are not stupid...you are asking excellent questions.

Each switch has to make a decision regarding which port to block. It will block the port that is receiving inferior BPDUs.

A BPDU is superior than another if it has:

A lower Root Bridge ID.

A lower path cost to the Root.

A lower Sending Bridge ID.

A lower Sending Port ID.

Using that algorithm, each switch will want to block the port that receives the inferior BPDU. However, its the switch that converges first that will block one of its ports accordingly and break the loop.

Clearer?

Victor

Hi,

If it is really like:

"its the switch that converges first that will block one of its ports accordingly and break the loop"

then my question is answered :)

Thanks!

Pascal

Pascal

For a port to become a designated port the switch must send a hello with the lowest advertised cost onto the segment. So

"How does the top left switch know he doesn't need to block his non-root port?"

Top left switch receives a hello from root bridge with cost 0, adds 4 because that is the cost of the interface the hello was received on and then sends this out onto the segment connecting it to top middle switch.

Top middle switch receives a hello from top right with a cost of 8, adds 4 for the outgoing port cost and sends this out onto the segment connecting it to the top left switch. Clearly top left switch has lower cost so it's port becomes the DP for that segment. So that is why top left switch does not block.

"And how does the top right switch now that he has to block his non-root port?"

Remember top left switch has sent a hello with cost of 4 onto segment connecting top left to top middle.

Top middle now sends out a hello onto segment connecting it to top right with a cost of 8 ie. cost of 4 received from top left + cost of 4 for interface on which it was received.

So top right receives a hello with cost of 8 from top middle. It also has a hello with the same cost 8 received from the other way ie.

hello from backup root with cost of 4. Add to that the cost of the incoming interface on top right 4 and that = 8 also.

So both hello's on the segment connecting top middle to top right are 8. With a tie the next decider is the lower bridge id which in this case is top middle so top middle's ports is the DP and top right blocks it's port.

One last thing. In future might be a good idea to name your switches, there was an awful lot of top left, top middle, top right going on :)

Hope that makes sense

Jon

Jon:

Now Im confused. :-)

"So top right receives a hello with cost of 8 from top middle. It also has a hello with the same cost 8 received from the other way ie."

The top right switch will receive a BPDU with a cost of 8 from the middle, but it would also add the cost of its own port (the link between it and the middle) and that would equal 12, not 8.

What I am saying is, how could the top right switch have the same cost to the root in both directions when the traffic has to take 3 hops to the root in one direction and only 2 hops in the other direction. Each hop has a cost of 4.

The top middle switch advertises a cost of 8 to the top right, but the backup root advertises a cost of only 4 to the root. Adding the cost of the top rights interfaces for either direction, one path yields a cost of 12 (facing the middle) and the other yields 8 (facing the backup).

What am I missing?

Victor

Jon:

One other thing regarding the top left switch....

You wrote "Top middle switch receives a hello from top right with a cost of 8, adds 4 for the outgoing port cost and sends this out onto the segment connecting it to the top left switch. Clearly top left switch has lower cost so it's port becomes the DP for that segment. So that is why top left switch does not block."

Couldnt the top right switch have drawn the same conclusion and considered itself the designated port for the segment, and therefore not blocked its port either? I am asking that because it, too, has a lower cost to the root than what is advertised by the top middle switch, so it, too, could behave the same way the top left did...no?

Victor

Victor

Again, i think this is to do with cost to root as opposed to cost advertised onto sgement ie. before the receiving switch has added the cost of the port on which the hello was received.

Also with we may be talking at cross purposes about segments.

The connection between top left and top middle is one segment (S1). The connection between top middle and top right is another segment (S2). So top middle sends a hello with cost of 12 onto S1. Top left sends a hello onto S1 with cost of 4.

Top middle sends hello onto S2 with cost of 8, hello from top left with cost of 4 + 4 for the interface it received it on.

Top right sends hello onto S2 also with cost of 8, hello from Backup root of 4 + 4 for the interface it was received on.

Jon

And now i'm going to have a quick reread of STP DP election just to be sure :-)

Hi Victor

Congrats on the star, nice to have you in this forum, and about time after all your questions :-)

You are spot on about the cost to root but with a designated port it is about the hello with the lowest advertised cost onto the segment ie.

top middle advertise hello with cost of 8 onto segment connecting top middle to top right. Top right advertises cost of 8 onto same segment. And that's it. There are 2 hellos on that segment both with a cost of 8. It is not about the hops to root, it is about the cost of the hellos on that particular segment and in this case they are both 8 ie.

Root to top left = hello cost 0

Top left receives hello on interface with cost 4.

Top left to top middle = hello cost 4

Top middle receives hello from top left with cost of 4 on interface with cost 4.

Top middle advertises hello onto segment between top middle and top right with cost of 8.

Root to backup root - hello cost 0

Backup root receives hello on interface with cost 4.

Backup root to top right = hello cost 4.

Top right receives hello from Backup root with cost of 4 on interface with cost of 4.

Top right advertises hello onto segment connecting top right with top middle with cost of 8.

Of course i might have made a really big mistake but that is the way i understand it.

Jon

PS - just seen your other post i'll have a look.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: