Spanning Tree Protocol (STP) convergence (Layer 2 convergence) happens when bridges and switches have transitioned to either the forwarding or blocking state. When layer 2 is converged, Root Switch is elected and Root, Designated and Non-Designated ports in all switches are selected. At Converged condition, the Root and Designated are in forwarding state, and all other ports are in blocking state.
The time it usually takes to change from blocking to forwarding state is 50 seconds (Blocking to listening is 20 seconds; Listening to learning is 15 seconds; Learning to forwarding is 15 seconds), when Spanning Tree Protocol (STP) timers are in their default values. Until the port reaches forwarding state, no user traffic is forwarded through the port and the end user may feel that there is no network connectivity.
Spanning Tree Protocol (STP) convergence (Layer 2 convergence) happens when bridges and switches have transitioned to either the forwarding or blocking state. Normal Spanning Tree Protocol (STP) convergence (Layer 2 convergence) time is 50 seconds and the end user traffic is blocked until Root Port and/or Designated Port reach the forwarding state.
We can use the feature called PortFast to speed up convergence on ports which are connected to a workstation or aserver (which will not cause layer 2 loops). PortFast feature should be used only to connect a single workstation to a switch port to avoid layer 2 switching loop. Spanning-tree PortFast feature causes a port to enter the forwarding state immediately, bypassing the listening and learning states.
When Spanning Tree Protocol (STP) is running, PortFast ports on the same switch can forward traffic between each other, but need to wait for Spanning Tree Convergence to communicate with a port on which the PortFast feature is disabled (normally a port connected to another switch). .
A non-designated port is one with a higher cost than the designated port. Non designated ports are put in blocking mode – they are not forwarding ports.
A blocked port won't forward frames; it just listens to BPDUs. The purpose of the blocking state is to prevent the use of looped paths. All ports are in blocking state by default when the switch is powered up.
The switch port listens to BPDUs and learns all the paths in the switched network. A port in learning state populates the MAC address table but doesn't forward data frames. Forward delay means the time it takes to transition a port from listeing to learning mode, which is set to 15 seconds by default and can be seen in the show spanningp-tree output.