Hello Jose
There are two situations which require a switch to begin STP convergence procedures. The direct and indirect link failures. Let’s take a look at both:
- A direct link failure is when a switch detects a loss of carrier on its own port and immediately declares the port as disconnected. Take a look at the following figure:
The STP is converged and Port B is in blocking state. Imagine Port A goes down. The bridge no longer detects a carrier on that port and immediately causes Port B to go through the STP procedure going into the Listening and Learning states for a total of 15+15=30 seconds. Convergence time in this case is at 30 seconds.
- An indirect link failure is when a link goes down on another switch. This is not immediately detected. Take a look at the following figure:
In this figure, SW1 is the Root Bridge and Port B on SW3 is the blocked port. Also, assume SW2 has a better Bridge ID than SW3. Imagine that Port C on SW2 goes down. How will Port B on SW3 react? Let’s go through the steps.
- SW2 will no longer be receiving BPDUs from SW1 and will declare itself root bridge.
- SW2 will start advertising new BPDUs to SW3 telling SW3 that it is root bridge. SW3 will ignore them because SW1 BPDUs it’s still receiving are superior.
- SW3 will keep the information from the previously received BPDUs on Port B for 20 seconds which is the blocking timer
- Once this timer is expired, Port B will begin considering the BPDUs in the Listening state and will begin relaying SW1’s BPDUs to SW2 since they are superior
- Then SW2 will detect the better information it is receiving on Port D and will cycle the port through Listening and Learning.
- Both switches (2 and 3) will eventually place their ports in the forwarding states and connectivity will be recovered.
In this case, the total time is 20+15+15=50.
The 50 second convergence time is more often quoted for STP because it is the absolute longest time that you may have to wait for STP to fully converge.
I hope this has been helpful!
Laz