STP Timers

Today we are going to talk about STP timers. STP consists of three timers that include a hello timer, max age timer, and a forward delay timer. These timer values are determined and set by the root bridge and the non-root bridges adapt to those timers. 

Hello Timer – A hello timer is the interval at which BPDUs are being sent out. BPDUs start as soon as a device is configured with STP so a root bridge and port roles can be elected. After the full topology has been decided, BPDUs must continue to be sent in order to detect any changes in a topology like a link failing, a switch being added, a bridge ID has become a lowest Bridge ID, and so on. The hello timer defines the interval at which these BPDU messages are sent. The typical hello timer for Cisco switches is 2 seconds.

Forward Delay Timer– A forward delay timer is a timer that is solely used for transitional states such as listening and learning. It decides how long a port will wait in the listening and learning states before it is able to move to forwarding. The forward delay timer determines how long a port will remain in each of the listening and learning states. The typical forward delay timer for cisco switches is 15 seconds, so if a port is transitioning from blocking to forwarding then it will take about 30 seconds for a topology to fully converge. 

Max Age Timer– The max age timer on the other hand is the timer that decides when certain stored BPDU information has become stale or old. Hello BPDUs are necessary to keep the current topology alive, but if a port is not receiving a BPDU a change in the topology could have occurred such as a link going down, or the switch being turned off. This timer is consistently running, but it resets whenever a superior BPDU is received on a port. The typical Cisco max age timer is 20 seconds. So if a switch’s max age timer is at 15 seconds, as soon as it receives a BPDU the max age timer will reset to 0 seconds. If the max age timer passes without a BPDU from a neighbor, then the BPDU received from that port is considered stale and it will trigger a topology recalculation. It is good practice for the max age timer to be 2 to 4x longer than the hello interval. Cisco is usually 2 seconds for hello timer and 20 seconds for the max age timer, leaving a lot of room for a BPDU to be sent. This avoids unnecessary topology changes but a slower convergence time. 

Leave a Reply

Your email address will not be published. Required fields are marked *