Spanning-Tree Reconvergence

Hi rene,

According to the theory, a designated port should be selected per each segment (link between two switches) and the one with the lowest total path cost to the root bridge between two ports becomes designated. In the image from the perspective of the GO/2 port of S2 the total cost to the root bridge is 12 and from the perspective of G0/1 of S4 the cost is 8. So, the G0/2 interface of S2 should be the port blocked? Can you explain to me what is the criteria that is being taken by which the port G0/1 of S4 is in a blocking state.
Thanks

Hello Christian!

Hmm, not quite. At least not based on your diagram. You should think about it this way.

In order to determine which port between SW2 and SW4 is designated, you should imagine placing an imaginary device on the link between the two switches like so:

You then measure the cost from H1 to the root bridge via each of the two possible paths like so:

When you measure the cost from H1 to each of the two switches, use half of the cost between the two. So the costs are:

  • H1 → SW2 → SW1 = 2+4 = 6 (green line)
  • H1 → SW4 → SW3 → SW1 = 2+4+4=10 (red line)

So since the path via SW2 is shorter, the port on switch 2 becomes designated.

Therefore it is the port on SW4 that becomes blocked. Does that make sense?

I hope this has been helpful!

Laz

I have a doubt about this excerpt from this lesson :

02:51:09: STP: VLAN0001 heard root 32769-fa16.3e5d.b4a0 on Gi0/2

The above, SW2 heard SW4 claiming to be the Root Bridge. But i always have thought in STP (not RSTP) only DSG port sends BPDUs. My question is how SW2 receives SW4 BPDU if in theory, SW4 Gi0/1 (towards R2) is a root port so it wouldnt send any bpdu to R2.

Hello Juan

In standard IEEE 802.1D STP, all active ports send out BPDUs except root ports and blocked ports. So designated ports are able to send BPDUs while root ports and blocked ports only receive BPDUs.

Now having said that, in the situation you are describing in your post, the Gi0/1 interface of SW4 sends out a BPDU that is received on Gi0/2 of SW2. So in this scenario, at this point in time, SW4 believes itself to be the root bridge.

All of the ports of a root bridge are, by definition, designated ports. Therefore, the BPDU that’s sent from SW4 is sent from a designated port, so it does indeed conform to the rules of STP. Does that make sense?

I hope this has been helpful!

Laz

1 Like

Thanks for you reply @lagapidis

I’ve tried a STP 802.1D topology , issued debug spanning-tree bpdu receive in the Root Bridge and indeed it has never received a bpdu from SW2 root port until ive changed the bid priority in SW2 therefore it see itself as the root bridge and triggers a BPDU to its former root port towards SW1.

But remain one doubt about blocked ports. I’ve also issued debug spanning-tree bpud receive on SW3 (root port towards SW1 and blocked port towards SW2) , both ports only receives bpdu and never send bpdu. In what situation a blocked port would send a bpdu ? in the same situation described above ? i mean, by example shutting down RP to SW1, the SW3 port towards SW2 will trigger a TCN BPDU and later on will come the RP.
I guess in a stable topology, designated ports only sends bpdu.

Hello Juan

First of all, thanks for sharing your experiment results with us, that is very helpful.

Now concerning your question about blocked ports. In the original IEEE 802.1D, blocked ports do not send out BPDUs, but they only receive them. I have corrected my post above as well


So the debug that you ran on the blocked port that showed that it only received BPDUs is the correct and expected behavior.

I hope this has been helpful!

Laz

Hi,

I didn’t understand the formula max age -message age = the time which BPDU will expire.

like isnt max age based on the seconds? however we count message age not based on seconds but non-root swittches it passed. So how we can even subtract them? :slight_smile:

Hello Görgen

Indeed, it seems a bit confusing at first. In STP, both Max Age and Message Age are expressed in seconds, although they are determined in different ways.

Max Age is a configurable value that indicates the maximum time a BPDU is considered valid. The default value is 20 seconds, but it can be adjusted based on network requirements.

Message Age, on the other hand, is not directly based on real time, but rather on the number of switches a BPDU has passed through. Each time a BPDU is forwarded by a switch, the Message Age is incremented by 1 (which is equivalent to 1 second). So, if a BPDU has passed through 5 switches, its Message Age is considered to be 5 seconds. It’s similar to the way the TTL in IP works.

Now, when we say “Max Age - Message Age”, we’re calculating the remaining time before the BPDU is considered expired. For example, if Max Age is 20 seconds and a BPDU has a Message Age of 5 seconds (i.e., it has passed through 5 switches), the BPDU will be considered valid for another 15 seconds.

I hope this has been helpful!

Laz

1 Like

Hi,

in Shutting GigabitEthernet0/1 on SW1 situation , isn’t SW4 should consider itself a root bridge? and then after Gi0/2 on SW5 reconverged to forwarding mode It should again supersede itself to SW1 as root bridge?

But in the debug screenshot of sw4 First it heard SW1 as root bridge for 02:51:10, but in that time SW2 still is hearing SW4 as root in the SW2 screenshot so I guess the topology has not been converged yet. So how even SW4 hear SW1 as root?

another connected question is, you make a sentence like this “Within the same second, SW2 has sent the superior BPDU from SW1 so for a short while, SW4 reconsiders Gi0/1 as its root port.” how SW2 sent superior BPDU from SW1 as it can not hear sw1 bpdu over Gi0/1? Isn’t SW4 should hear it via SW5?

Thank you very much :slight_smile:

Hello Görgen

You’re right. In the debug info for SW4, we see initially a BPDU received on Gi0/1 from SW2 indicating that the root bridge is SW1, and that the local root port is Gi0/1. But then SW5 sends a superior BPDU which is detected on Gi0/2 of SW4, so the new root port becomes Gi0/2. Indeed in the debug of SW4 we see no indication that SW4 ever considers itself root bridge.

Conversely, we see that SW2 does consider SW4 the root bridge because it received a superior BPDU from SW4.

I will let Rene know to take a look and see if there is any clarification he can make to the lesson to make it clearer what is going on.

I hope this has been helpful!

Laz

1 Like