Thursday, August 14, 2025

STP/RSTP Timers Explained : Hello Timer, Max-Age Timer, Forward delay, Differences between STP, RSTP, PVST, RPVST, and MSTP

STP/RSTP uses three timers for its functions. These timers control and define the time STP needs to reach convergence. These timers are Hello, Max age, and Forward delay. The root bridge dictates these timers in BPDUs. The following table lists these timers.

TimerDefault ValueDescription
Hello2 secondsThis is the interval between two consecutive BPDUs.
MaxAge10 times HelloThis is the maximum time a switch waits for a BPDU before changing the STP topology.
Forward delay15 secondsThis is the time the switch keeps ports in learning and listing states.

Let us understand the above timers in detail.

Hello Timer:

Switches use BPDU (Bridge Protocol Data Unit) messages to communicate and share STP (Spanning Tree Protocol) information. A BPDU message contains all the information that STP requires to build and maintain its topology. All STP-running switches broadcast a BPDU at a fixed interval. The Hello-timer defines this interval. The default value of this timer is two seconds. Therefore, all STP-running switches broadcast a BPDU every two seconds.

Max-Age Timer:

As long as a switch receives a BPDU every two seconds from its neighbors, it operates normally. However, if it does not receive a BPDU from the neighbor within MaxAge time, the switch reacts by taking steps to change the STP topology. The default value of this timer is ten times the Hello timer. Since the default value of the hello timer is 2 seconds, the default value of it will be 20 seconds (2 * 10 = 20). So, a switch would wait 20 seconds without hearing a Hello BPDU before reacting.

Forward delay:

Switches use this timer to age out old entries from the CAM table and add new entries. The switch uses CAM table entries to make forwarding decisions. When a network change occurs, CAM table entries become invalid. The switch can not use the existing entries to make forwarding decisions. It must flush the existing entries and learn them again to make forwarding decisions. The switch completes these tasks in the Forward delay time. The default forward delay time is fifteen seconds. STP uses fifteen seconds to flush old entries. It uses the Listening state for this. It takes another fifteen seconds to learn and add new entries to the CAM table. It uses the Learning state for this.

Viewing the STP timer

You can use the show spanning-tree command to view the STP timer values.

show spanning tree command

Similarities between STP, RSTP, PVST, RPVST, and MSTP

The following are the similarities between STP, RSTP, PVST, RPVST, and MSTP. 

  • All create and use a virtual topology to find switching loops in every VLAN.
  • All elect a root bridge and use it as the focal point of the virtual topology.
  • All use the same rules and tiebreakers for the root bridge election.
  • Besides the root bridge, all remaining switches become non-root bridge switches.
  • All select only one root port to reach the root bridge.
  • All use the same rules and tiebreakers to select the root port.
  • All select only one designated port for every local segment or end device.
  • All use the same rules and tiebreakers to select the designated port.
  • After selecting root and designated ports, they block all remaining ports to remove loops.
  • All variations run all ports through a few states. During these states, they learn the network topology, flush CAM table entries, select root and designated ports, and block the ports causing the loops.

Differences between STP, RSTP, PVST, RPVST, and MSTP

The main reason for creating RSTP/RPVST was the convergence. Convergence is the time STP takes to react to a network change. STP/PVST takes a relatively long time for convergence. With default settings, it takes 50 seconds to reach convergence. RSTP/RPVST/MSTP improves it. It reaches convergence within a few seconds (or in slow conditions, in about 10 seconds).

It adds two new port types for rapid convergence. These port types are alternative and backup ports. It uses the alternative port to reach the root bridge if the link connected to the root port fails. It uses the backup port to reach the local segment when the link connected to the designated port fails.

Since it has an alternative or backup port, it does not have to reselect the root or designated ports when a network change occurs. If the root path fails, it enables the alternative port within a few seconds. If the designated path fails, it enables the backup port. It means if the network is running RSTP/RPVST/MSTP, it has to wait a maximum of 10 seconds whenever a change occurs.

STP/PVST does not have a concept of alternative and designated ports. If the root or designated path fails, it reruns the entire process to select the new root or designated ports. Running the entire process again takes 50 seconds. It means if the network is running STP, it has to wait for 50 seconds whenever a change occurs.

RSTP/RPVST/MSTP does not use the learning state. It also renames the blocking state to the discarding state and redefines its use slightly. It combines disabled and blocking states into the discarding state. In the disabled state, the port can work physically, but it can not forward user frames. It simply meant that the interface was administratively disabled.

Conclusion:

There are three STP timers: Hello, Max age, and forward delay. Hello timer defines the interval between BPDUs. The Max age timer defines the switch's wait before rebuilding the STP topology when it does not receive BPDUs from its neighbors. STP uses the forward delay timer to rebuild the CAM table entries. It uses this timer for two states: Listening and Learning. In the Listening state, it ages out old entries. In the Learning state, it adds new entries to make forwarding decisions.

===============================================================


"This Content Sponsored by SBO Digital Marketing.

Mobile-Based Part-Time Job Opportunity by SBO!

Earn money online by doing simple content publishing and sharing tasks. Here's how:

  • Job Type: Mobile-based part-time work
  • Work Involves:
    • Content publishing
    • Content sharing on social media
  • Time Required: As little as 1 hour a day
  • Earnings: ₹300 or more daily
  • Requirements:
    • Active Facebook and Instagram account
    • Basic knowledge of using mobile and social media

For more details:

WhatsApp your Name and Qualification to 8489257126

a.Online Part Time Jobs from Home

b.Work from Home Jobs Without Investment

c.Freelance Jobs Online for Students

d.Mobile Based Online Jobs

e.Daily Payment Online Jobs

Keyword & Tag: #OnlinePartTimeJob #WorkFromHome #EarnMoneyOnline #PartTimeJob #jobs #jobalerts #withoutinvestmentjob"

==========================================================================

No comments:

Post a Comment

Youtube Channel Image
Nadaipazhagu Tamizhaa Subscribe To watch Videos
Subscribe