STP direct vs indirect link failure

When implementing Spanning Tree Protocol (STP), a topology will become stable or "converged" when the root bridge has been selected, and all switchports have been assigned their roles. A converged topology must begin the process of reconvergence whenever there is a failure on a port or a link. This will begin what is known as a STP topology change process.

From the point of view of a switch, there are two types of link failures:

  • direct
  • indirect

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:

stp-topology-one-switch-blocked-port.png

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:

stp-topology-3switch-blocked_port.png

Ιn 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.

https://networklessons.com/cisco/ccie-routing-switching-written/spanning-tree-reconvergence