STP Port States and BPDU Timers

Posted: 13th December 2020 by ccna7guru in ITN

To facilitate the learning of the logical spanning tree and avoid loops, each switch port transitions through five possible port states and uses three BPDU timers.
The five STP port states are as follows:
Blocking: The port is a non-designated port and does not participate in frame forwarding. The port continues to process received BPDU frames to determine the location and root ID of the root bridge and what port role the switch port should assume in the final active STP topology.
Listening: STP has determined that the port can be selected as a root port or designated port based upon the information in the BPDU frames it has received so far. At this point, the switch port is not only receiving BPDU frames, it is also transmitting its own BPDU frames and informing adjacent switches that the switch port is preparing to participate in the active topology. The port returns to blocking state if it is determined that the port does not provide the lowest cost path to the root bridge.
Learning: The port prepares to participate in frame forwarding and begins to populate the MAC address table.
Forwarding: The port is considered part of the active topology and forwards frames and also sends and receives BPDU frames.
Disabled: The Layer 2 port does not participate in spanning tree and does not forward or process frames. The switch port is administratively disabled.

Once stable, every active port in the switched network is either in the forwarding state or the blocking state.
The amount of time that a port stays in the various port states depends on the BPDU timers. The following timers determine STP performance and state changes:

Hello time: The time between each BPDU frame sent on a port. The default is 2 seconds, but can be tuned between 1 and 10 seconds.
Forward delay: The time spent in the listening and learning states. The default is 15 seconds, but can be tuned between 4 and 30 seconds.
Maximum age: Controls the maximum length of time a switch port saves configuration BPDU information. The default is 20 seconds, but can be tuned between 6 and 40 seconds.