RSTP
1. Introduction to RSTP
In the previous course, we identified STP’s slow convergence times as a critical limitation, especially for modern networks with real-time applications. This brings us to Rapid Spanning Tree Protocol (RSTP), defined in IEEE 802.1w.
RSTP is an enhanced version of STP that addresses its inefficiencies, offering convergence times measured in milliseconds rather than seconds. RSTP retains backward compatibility with IEEE 802.1D STP, allowing for seamless integration into existing STP networks.
Key Features of RSTP:
- Backward Compatibility: Works seamlessly with traditional STP networks.
- Same Algorithm: Uses the same spanning tree algorithm for determining port roles and topology.
- Faster Convergence: Can recalculate the spanning tree in just a few hundred milliseconds in optimized configurations.
- Hello Mechanism: Unlike STP, where the root bridge generates Hello messages, RSTP allows all switches to send their own Hellos.
2. RSTP Port States
RSTP simplifies the port states used in STP by merging some of them:
STP vs. RSTP Port States
Listening is not a port state included in RSTP – it goes right from discarding to learning.

3. RSTP Port Roles
Overview of Port Roles
While STP defines two primary port roles—root and designated ports.
RSTP introduces two additional roles:
- Alternate Port: Provides an alternative path to the root bridge.
- Example: A redundant connection between switches remains ready for use if the primary link fails.
- Example: A redundant connection between switches remains ready for use if the primary link fails.
- Backup Port: Acts as a backup for a shared medium like a hub.
- Note: This role is less common today due to the rarity of hubs in modern networks.

Let me illustrate this with a practical example to help you better understand how RSTP determines port roles !
4. RSTP Topology Example
Take a look at the topology below to see how RSTP assigns port roles :

Assigning Port Roles
Let’s break down how RSTP assigns port roles step by step, so you can clearly understand how each role contributes to network efficiency and redundancy.
Root Ports
Imagine the Root Bridge as the central point of your network. Every switch needs to figure out the best path to the Root Bridge, and the port used for this path is called the Root Port.
- On SW2 and SW3, the G0/0 ports are designated as Root Ports because they provide the lowest cost path to the Root Bridge.

Designated Ports on the Root Bridge
Now think of the Root Bridge itself. Since it is the central point, all its ports naturally provide the best path to itself.
- This means all ports on the Root Bridge are automatically Designated Ports.

Designated Port on a Segment
When two switches, like SW2 and SW3, are connected to the same segment, they need to agree on which port will forward traffic toward the Root Bridge. This port becomes the Designated Port.
The switches hold an election to decide which port gets this role.
Here’s how the election works:
- Lowest Path Cost to the Root Bridge:
Both SW2 and SW3 have the same path cost, so we move to the next criteria. - Lowest Sender Bridge ID (BID):
The BID is like an ID card for each switch. Since SW2 has a lower BID than SW3, its port G0/1 becomes the Designated Port. - Lowest Port ID:
This is a tiebreaker used only if the first two criteria are equal.
- Result: G0/1 on SW2 wins the election and becomes the Designated Port for the segment. G0/1 on SW3 takes a backup role as an Alternate Port.

Alternate Ports
Now, what happens to the port on SW3 that didn’t win the election? It becomes an Alternate Port.
- An Alternate Port is like a safety net—it doesn’t actively forward traffic but is ready to take over if the Designated Port fails.
- In this case, G0/1 on SW3 serves as the Alternate Port, providing backup for this segment.

Backup Port Example with a Hub
In this scenario, a hub connects multiple devices within the same collision domain.
- On SW2, two ports, G0/2 and G0/3, are connected to the same hub. Since both ports are part of the same collision domain, RSTP must assign one as the Designated Port and the other as a Backup Port.

How RSTP Decides:
- Lowest Path Cost to the Root Bridge:
Both ports have the same cost. - Lowest Sender Bridge ID (BID):
Both ports share the same BID because they belong to the same switch. - Lowest Port ID:
Since G0/2 has a lower port ID than G0/3, it is chosen as the Designated Port.
- Result:
- G0/2 forwards traffic and becomes the Designated Port.
- G0/3 is assigned as the Backup Port, waiting to take over if G0/2 fails.

5. Conclusion
Rapid Spanning Tree Protocol (RSTP) ⚡ improves network stability by reducing recovery times from 50 seconds to just a few milliseconds. With Alternate and Backup Ports, it ensures faster failover and eliminates delays caused by STP’s Listening and Blocking states.
Thanks to faster topology recalculations and immediate port role transitions, RSTP is the preferred choice for modern networks requiring high availability and minimal downtime.