Spanning Tree Port Transitions and Timers
Part of the STP algorithm and process of building a loop-free
network, as well as reconfiguration on a topology change, is to cycle the bridge
ports through several states, as follows:
-
Blocking— A port is placed in
blocking mode upon startup and when STP determines it is a suboptimal path to
the root bridge. Blocked ports do not forward traffic.
-
Listening— When a port is
transitioned from blocking to listening, it starts to listen for other bridges.
It does not send out configuration messages, learn MAC addresses, or forward
traffic.
-
Learning— The bridge continues
to listen for other bridges; however, it can now also learn MAC addresses of
network devices.
-
Forwarding— This is normal
operation. Data and configuration messages are passed through the
port.
STP uses timers to determine how long to transition ports. STP
also uses timers to determine the health of neighbor bridges and how long to
cache MAC addresses in the bridge table.
The explanation of the timers is as follows:
-
Hello timer— 2 seconds. This
timer is used to determine how often root bridge sends configuration BPDUs.
-
Maximum Age (Max Age)— 20
seconds. This timer tells the bridge how long to keep ports in the blocking
state before listening.
-
Forward Delay (Fwd Delay)— 15
seconds. This timer determines how long to stay in the listening state before
learning, and the learning state before forwarding.
The STP timers can be tuned based on network size. These
parameters are designed to give STP ample opportunity to ensure a loop-free
topology. Mistuning these parameters can cause serious network instability.
Tuning these parameters will be discussed in Chapter 10, "Implementing and Tuning Spanning Tree."
When a bridge sees BPDUs with a better path to the root, it recalculates STP.
This allows ports to transition when appropriate.