cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1803
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

28 Replies 28

Jon:

I think I understand where I was going wrong. Its a bit tedious to explain it on here, but, in short, I was forgetting that each switch can see the Hellos and BPDUs from ALL the other switches, not just its neighbor....

Of course, this is fundamental, but I brain farted in the process of formulating answers for Pascal.

So, yes, I see it now...

Since all switches can see everyone's Hellos, they will all be able to know that the top-left switch has the lowest cost to the root. He will be the one advertising a cost of 4 to the root, which no one else can beat. Therefore, Mr. top-left knows that he has to keep his port unblocked as the DP for the segment, since traffic must go through him to get to the root.

Did I get it right?

Victor

Still reading :)

"Since all switches can see everyone's Hellos, they will all be able to know that the top-left switch has the lowest cost to the root"

Not as far as i can see. Top right does not see top left hello as is because top middle adds it's cost before top right sees it.

As i say you are spot on with the root port election. I think the key point is this - quote from CCIE R&S Exam cert guide

"To win the right to be the DP, a switch must send the Hello with the lowest advertised cost onto the segment"

And the way i read that is that switch that receives that Hello does not add the cost of the interface it was received on before it evaluates it in the DP election unlike with the RP election.

As i say need to double check.

Pascal - apologies for confusing the issue :)

Jon

I'm amazed by the activity on this topic;-)

Yes you are right, the cost is only added for root port election. And the R&S Exam certification guide is not really exact in saying that the "lowest advertised cost" determines who is designated on a segment. As you and Victor mentioned earlier, the whole "information" conveyed in the BPDU is considered, not only the cost. In this regard, you can consider a BPDU as a long integer formed by the concatenation of Root ID, Cost, Sender BID, Sender PortID. The bridge sending the best integer on a segment is designated (no need to differentiate between the fields!).

In fact, there is a fifth tie breaker for the designated port election: the receiver port ID. Supposed that two ports of the same switch are connected to the same shared segment as the root bridge. They both receive the exact same BPDU! Their (receiver) port ID will be used to determine who is designated and who is alternate.

Regards,

Francois

Francois

About time you showed up :-)

Could you just clarify something then. Are you saying that when all the books talk about the tie breakers ie. bridge ID, port priority etc. that these are not actually considered in isolation but rather they are considered as a whole in the decision making process ?

Thanks

Jon

Well, they are not always considered as a whole because for the root election, we clearly identify the cost and add something to it.

But when it's a matter of determining between designated/alternate or backup ports, it's exactly as if they were considered as a whole. Practically, in every implementation, we are going to look first at the root ID and then only use the cost and so on. This is for optimization purpose: what's the point of wasting CPU cycle comparing everything down to the port ID when we already know that a BPDU is better than another based on the root ID?

But the main point I wanted to make about the book is that the cost is not what determines the role on a given segment, it's the whole content of the BPDU. What this thread is all about is an example why the cost is not enough.

Regards,

Francois

Wow...poor Pascal, hes probably cursing the moment he posted his message LOL

On that note, I'll conclude my invoolvement in this most exhausting activity by helping myself to the arsenic in my medicine cabinet's top-left shelf...or is it top-right? LOL

Victor

Finding out whether the arsenic is in the top-left or top-right part of the shelf is just a matter of checking the first letter on the label of the concerned products. Of course, if both first letters are "A", you'll have to use the second letter as a tie breaker and so on;-)

LOL

I hope everybody got a good night sleep :)

As I understand it so far (and I keep the top, middle and left naming to not get confused even more):

1. All ports on the Root Bridge must be in forwarding state.

2. Ports with lowest Root Path Cost must be in Forwarding state.

This leaves us with the following ports candidate for Blocking status:

top left port 0/2

top middle port 0/1

top right port 0/2

backup root port 3/3

3. Now on every segment a switch can place additional ports in forward status based on BPDUs sent by the 2 switches onto the segment

A lower Root Bridge ID --> obviously is irrelevant now (x in short)

A lower path cost to the Root

A lower sending Bridge ID

A lower Sending Port ID

Segment between top left and top middle:

Top middle has a higher path cost to the root, hence the top left can place his blocking port to forwarding

Segment between top middle and top right:

Both ports in this segment are blocking. Both switches have a path cost of 8, so the tie breaker is now the sending bridge ID. Top middle has the lowest bridge ID so can put port 0/1 on this segment in forwarding.

Segment between top right and backup root:

Backup root has the lowest path cost to the root, thus can put interface 3/3 in forwarding.

At least that works with the example I have sent ...

Anyway, thank you all for your input!

Best regards,

Pascal

Hi Pascal

Yes, slept well and off we go again :)

The key is as discussed that the DP (Designated Port) is elected before the switch that receives the Hello adds the cost of the interface on which it received the hello. Note i use the term cost loosely, see Francios's post for more detail.

This differs from the RP (Root port) election in that the cost of the receiving interface is added on before the calculation is made.

And you have summed up correctly how each switch works out which ports to block and which to forward on.

I'm still learing about STP all the time and just when i think i know something Francois corrects me :)

Jon

Jon:

Yer gonna kill me....but just whaen I think I have tied all loose ends, another pops up. :-)

Here goes...

I am in total agreement with you on how the DP is elected. No biggie.

For example..

Top left switch has a cost of 4 to root

Top middle switch advertises a higher cost

So, top left wins the DP election on that segment and so the top left port remains forwarding.

But here is my question: If the top middle's port lost the DP election to the top left, why didnt it block its port? In the top right and top middle DP election, the top right lost the DP election, and consequently, blocked its port that lost. The top middle did not block its port, though, when it lost to the top left switch. Why?

Isnt it a rule of thumb that if a port is not a root or a DP, it should be blocking?

Victor

Ok, wait a minute. I think I just answered my own question...the top middle switch did not block its port after it lost the DP election with the top left because the top middle port was already designated as the ROOT port. As a root port, it is not eligble for blocking.

First, there was the root bridge election, then each switch discovers its root port by examining cost to the elected bridge, and then the DP election takes place.

So, when the election for DP took place, the top middle switch port was never eligible for blocking.

Agree?

Victor

Hi,

I haven't found confirmation in any books. But yes, that's how I see it also. So I agree!

Case closed!

Unless somebody has another idea of course :)

Best regards,

Pascal

Victor

Totally agree. RP first then DP.

Jon

Case closed.

Review Cisco Networking products for a $25 gift card