Spanning Tree BPDUs include several timers that play an integral role in the operation of the protocol. The Spanning Tree timer values are contained in the last three fields of a BPDU. Within the Spanning Tree domain, the only timer values that are important are those that are sent by the Root Bridge. In other words, Non-Root Bridges are not concerned with locally configured timer values.
The default Spanning Tree timers go hand-in-hand with the IEEE 802.1D specification that recommends a maximum network diameter of 7. The Spanning Tree diameter is the maximum distance that any two single switches can be from each other. A maximum diameter of 7 means that two distinct switches cannot be more than seven hops away from each other. This concept will be described in detail later in this chapter.
Because all other switches in the Spanning Tree domain use the timer values advertised by the Root Bridge, the modification of any of these values should always be made at the Root Bridge. By setting these values in the STP Root, these values will be passed (via BPDUs) to other switches in the STP domain. The three configurable Spanning Tree timer values are as follows:
- The Hello Time
- The Forward Delay
- The Max Age
In addition to these three configurable timers, BPDUs also include a Message Age timer. This timer is unique in that it is modified by every switch that receives and propagates a BPDU. This timer cannot be configured by the administrator. The Message Age timer is used in conjunction with the Max Age timer. This correlation will be described later in this chapter. Figure 3-26 below shows the STP timer fields in a BPDU:

Fig. 3-26. Spanning Tree BPDU Timer Fields
The show spanning-tree vlan [number] command can also be used to verify the Hello Time, Forward Delay, and Max Age timers as illustrated in the following output:
| VTP-Switch-1#show spanning-tree vlan 80VLAN0080 Spanning tree enabled protocol ieee Root ID Priority 80 Address 000d.bd06.4100 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 80 (priority 0 sys-id-ext 80) |
NOTE: The Message Age is not included in the output of any show commands
The Hello Time
The Hello Time is the time between each BPDU that is sent. This time is equal to 2 seconds (sec) by default, but it can be set to be between 1 and 10 seconds. While the Hello Time received in the BPDU from the Root Bridge is propagated unchanged throughout the Spanning Tree domain, all switches have their own local Hello Time for TCN BPDUs that the switches transmit.
The IEEE 802.1D standard specifies a default Hello Time value of 2 seconds based on a recommended Spanning Tree diameter of 7 switches.
By decreasing the Hello Time to the lowest possible value, which is 1 second, administrators can reduce the interval between BPDU updates on a port. However, this effectively doubles the number of BPDUs that are sent and received by each bridge, which can cause an additional load on the CPU of the switches. This additional load can cause instability in a network with a large number of VLANs and trunk links due to the added load to the switch CPUs.
The Forward Delay
The Forward Delay is the time that is spent in the Listening and Learning state. When the port transitions to the Listening state, it indicates a change in the current Spanning Tree topology and that the port will go from a Blocking state to a Forwarding state. The Forward Delay is used to cover the period between the Blocking and Forwarding states, which includes the Listening and Learning states.
This time is set to 15 seconds (sec) by default but can be manually set to be between 4 and 30 seconds. As is the case with the Hello Time, the default Forward Delay value is based on the IEEE Spanning Tree diameter of 7 switches. This is derived via the following formula:
Forward Delay = ((4 * hello) + (3 * Diameter)) / 2
Assuming all the default values, we can calculate the Forward Delay as follows:
Forward Delay = ((4 * hello) + (3 * Diameter)) / 2
Forward Delay = ((4 * 2) + (3 * 7)) / 2
Forward Delay = ((8) + (21)) / 2
Forward Delay = 29 / 2
Forward Delay = 29 / 2
Forward Delay = 14.5 seconds (rounded up to 15 seconds)
The Max Age and Message Age Timers
When switches execute STP, they save a copy of the best BPDU that is received. In addition to the two timers previously described, the BPDU also contains the Message and Max Age timers.
The Max Age time is set in the BPDU by the Root Bridge and defaults to 20 seconds. This timer can be manually set to any number between 6 and 40 seconds. The Max Age value remains the same for all BPDUs that are propagated by all switches in the Spanning Tree domain. Any changes to this value on the Root Bridge are propagated to the other switches in the Spanning Tree domain. The default Max Age is based on the IEEE Spanning Tree diameter of 7 switches. This is derived via the following formula:
Max Age = (4 * Hello) + (2 * Diameter) – 2
Assuming the default STP values, the Max Age is calculated as follows:
Max Age = (4 * Hello) + (2 * Diameter) – 2
Max Age = (4 * 2) + (2 * 7) – 2
Max Age = 8 + 14 – 2
Max Age = 20 seconds
The Message Age timer displays the age of the Root Bridge BPDU. Unlike the Max Age timer, the Message Age timer is incremented by 1 by each switch that propagates it to any other downstream switch within the STP domain.
The Root Bridge sends BPDUs with a Message Age value of 0. Non-Root Bridges that are directly connected to the Root Bridge will receive the BDPU with a Message Age of 0 on their Root Port. These switches then increment this value by 1 before propagating the BPDU to downstream neighbors. This process is repeated by every switch that receives and propagates the Bridge Protocol Data Unit. This concept is illustrated in Figure 3-27 below:

Fig. 3-27. Spanning Tree BPDU Message Age Propagation
Referencing Figure 3-27, the Message Age is propagated as follows:
- The Root Bridge sends out a BPDU on its Designated Ports to Switch 1 and Switch 2. This BPDU contains the default STP timers and a Message Age value of 0.
- Switch 1 and Switch 2 receive the BPDU from the Root Bridge on their respective Root Ports. The BPDU contains the STP timers set by the Root Bridge and a Message Age of 0. Both switches increment the Message Age value by 1 before propagating the BPDU downstream.
- Switch 3 and Switch 4 receive the BPDU on their respective Root Ports from their upstream neighbors, which are Switch 1 and Switch 2. This BPDU contains the STP timers set by the Root Bridge and an incremented Message Age value of 1. Switch 3 increments the Message Age by 1 before propagating the BPDU downstream.
- Switch 5 receives the BPDU from Switch 3 on its Root Port. The BPDU contains the STP timers set by the Root Bridge and the incremented Message Age value of 2.
The Message Age timer can be used to determine the following two variables:
- How far away the switch is from the Root Bridge
- The time before the received BPDU is aged out on the port
Because each switch that forwards the Configuration BPDU increments the Message Age field by 1, the value contained in this field that is received by a downstream switch can be used to determine how far away that switch is from the Root Bridge. For example, Switch 1 receives the BPDU with a Message Age of 0. This indicates that Switch 1 is zero hops away from (i.e. directly connected to) the Root Bridge. The Message Age value of 1 received on Switch 4 indicates that the switch is one hop away from the Root Bridge, and the Message Age value of 2 that is received on Switch 5 indicates the switch is two hops away from the Root Bridge.
When a switch receives a BPDU, the BPDU contains the Max Age timer, which is set by the Root Bridge and never changes, and the Message Age, which is incremented by all other upstream switches. To determine the time before information received on that port is aged out, the switch subtracts the Message Age from the Max Age. Table 3-5 below shows how the switches illustrated in Figure 3-27 would calculate their aging times based on the Message Age and Max Age values in the received BPDUs:
Table 3-5. Aging Times
| Switch | Max (Maximum) Age | Message Age | Aging Time |
|---|---|---|---|
| Switch 1 | 20 | 0 | (20 – 0) = 20 seconds |
| Switch 2 | 20 | 0 | (20 – 0) = 20 seconds |
| Switch 3 | 20 | 1 | (20 – 1) = 19 seconds |
| Switch 4 | 20 | 1 | (20 – 1) = 19 seconds |
| Switch 5 | 20 | 2 | (20 – 2) = 18 seconds |