Spanning Tree Protocol consists of the following timers:
- Hello – This is the time between each BPDU that is transmitted, by default this is set to 2 seconds, this can be tuned between 1 and 10 sec
- Forward Delay – this is the amount of time defined for a port to be in a listening or learning state. By default this is 15 seconds, but this can be tuned between 4 and 30 sec.
- Max Age – this is the timer that controls the max length of time that passes before a bridge port saves its BPDU information. By default this is 20 seconds but can be tuned between 6 and 40 sec.
- Message Age – this is not a fixed value this contains the length of time that has passed since the root bridge originated the BPDU.
Other Parameters Spanning Tree uses to determine timers for tuning:
- Diameter of the STP domain (dia) – this is the value of the maximum number of bridges between any two points in a domain. IEEE recommends a maximum diameter of 7 bridges with default timers.
- Bridge Transit Delay (transit delay) – this is the elapsed time between receiving and transmitting of the same frame by the bridge. This is basically the latency of traffic through the bridge. IEEE recommends to consider 1 sec as the max bridge transit delay
- BPDU transmission delay (bpdu_delay) – this is the delay between the time the BPDU is received on a port and the time the config BPDU is transmitted to another port. IEEE recommends 1 sec as the max BPDU transmission delay
- Message Age increment overestimate (msg_overestimate) – This is the increment value each bridge adds to the message age before forwarding a BPDU. Cisco switches add 1 second to the message age before the BPDU is forwarded.
- Lost Message (lost_msg) – This is the number of BPDUs that can be lost as it moves through the network. IEEE recommends to us three as the number of BPDUs lost
- Transmit Halt Delay (Tx_halt_delay) – this is the max amount of time that is needed for a bridge to move a port into blocking after it’s determined that the port must be blocked. IEEE recommends 1 sec
- Medium Access Delay (med_access_delay) – This is the value of time that is needed for a device to access media for transmission, Specifically the time between the CPU decision to send a frame and the moment the frame begins to leave the bridge. IEEE recommends 0.5 sec
From these parameters you can calculate other values:
- End-To-End BPDU Propagation delay – This is the amount of time that is needed for a BPDU to travel across the network, assuming the diameter of 7 hops, 3 BPDUs lost, and a Hello time of 2 seconds:
End-to-end_BPDU_propa_delay = ((lost_msg + 1) x hello) + ((BPDU_Delay x (dia – 1)) = ((3 + 1) x hello) + ((1 x (dia – 1)) = 4 x hello + dia – 1 = 4 x 2 + 6 = 14 sec
- Message Age Overestimate – this parameter is used to account the age of the BPDU since the origination, assume each bridge increases the message age by 1 sec
Message_age_overestimate = (dia – 1) x overestimate_per_bridge = dia – 1 = 6
- Maximum Fram Lifetime – This value is the max time that a frame previously sent remains in the network before it reaches the destination.
Maximum_frame_lifetime = dia x transit_delay + med_access_delay = dia + 0.5 = 7.5 = 8 (rounded)
- Max Transmission Halt Delay – This is the value of time that is needed for effectively blocking a port after the decision to block is made. IEEE uses 1 sec as the max for that event:
Maximum_transmission_halt_delay = 1