Like most networking protocols, Spanning Tree has several timers that are very important to how quickly network convergence occurs. Making changes to the STP timers should be done with great care however. Modern implementations of Spanning Tree like RSTP and MST have dramatically improved convergence time, making manual timer adjustments less common. The information below will explain the STP timer values and show you how to manually change them, but make sure you thoroughly understand and have a need before changing them from their defaults in a production environment.
Spanning Tree Timers
The Hello Time defines the interval the Root Bridge will send out Configuration BPDUs. This is set to 2 seconds by default.
The Forward Delay is the length of the Listening and Learning states. This is 15 seconds by default.
The Maximum Age timer, often referenced as MaxAge, is the length of time each switch will save the superior BPDU’s information before discarding it. This is 20 seconds by default.
Configuring Spanning Tree Timers
All switches use the timer information contained in the Root Bridge’s superior Hello BPDUs. This means that changes to the default timers on all non-root switches will not be used and are therefor unnecessary. STP timer changes should instead be made on the Root Bridge and a predetermined secondary Root Bridge.
The output below shows SW1 as the Root Bridge using the default Hello, Forward Delay, and MaxAge timers.
Now all three timers are configured for non-default values on SW1. The show spanning-tree command can be used to verify the results.
Cofiguring STP Timers on Non-root Switches
Remember that Spanning Tree only uses the timers from the “superior” BPDUs received from the root. If the timers are changed on non-root switches, the new timers will not be used. To illustrate this point, we will change the values on a non-root switch (SW2) and see the results.
Before we make changes, the output of the show spanning-tree vlan command tells us that SW2 is not the root and is using the default timer values for VLAN 20.
Next, the timers on SW2 are modified and the show spanning-tree output displays the results.
Notice in the output above that the Bridge ID timers changed, but the Root ID timers did not. The network uses the root timers only, so the nonstandard timers configured on SW2 will only take affect if SW2 were to become the network’s Root Bridge.