RSTP – Rapid Spanning Tree Protocol
1. What Is RSTP and Why Was It Needed?
Rapid Spanning Tree Protocol (RSTP), defined in IEEE 802.1w, is an evolution of the original Spanning Tree Protocol (STP, IEEE 802.1D). It was designed to solve STP's most significant weakness: slow convergence.
Classic STP can take 30 to 50 seconds to converge after a topology change — devices sit through Listening (15 s) and Learning (15 s) states before a port is allowed to forward. During that time, users lose connectivity. RSTP reduces convergence to under 1 second in most real-world topologies by replacing the timer-driven state machine with an active negotiation mechanism between adjacent switches.
RSTP is backward compatible with classic STP. When an RSTP switch detects a neighbour running legacy STP, it falls back to the original 802.1D behaviour automatically — though the fast convergence benefits are then lost on that segment.
| Feature | Classic STP (802.1D) | RSTP (802.1w) |
|---|---|---|
| IEEE Standard | 802.1D | 802.1w (later merged into 802.1D-2004) |
| Convergence time | 30–50 seconds | Under 1 second (typically 1–2 seconds) |
| Port states | Blocking, Listening, Learning, Forwarding, Disabled | Discarding, Learning, Forwarding |
| Port roles | Root, Designated, Non-Designated (Blocked) | Root, Designated, Alternate, Backup |
| Convergence method | Timer-based (Forward Delay × 2) | Active proposal/agreement handshake |
| BPDU generation | Only root bridge generates BPDUs; others relay them | Every switch generates its own BPDUs every Hello interval |
| Topology change handling | Floods TCN up to root; root sends TC flag in BPDUs | Each switch independently flushes its MAC table on TC receipt |
| Edge ports | PortFast (Cisco proprietary) | Edge Port (standardised PortFast equivalent) |
| Link types | Not defined | Point-to-point, Shared, Edge |
| Cisco implementation | PVST+ (Per-VLAN STP) | Rapid PVST+ (per-VLAN RSTP) |
Related pages: STP Overview | STP Port Roles | Root Bridge Election | PVST+/Root Bridge Lab | PortFast & BPDU Guard | RSTP Configuration Lab
2. RSTP Port States — Simplified from Five to Three
Classic STP defines five port states. RSTP collapses these into three by eliminating the transient Listening state and merging Blocking and Disabled into a single Discarding state. This simplification is key to faster convergence — the Listening state was purely a timer wait with no functional purpose.
| STP State (802.1D) | RSTP State (802.1w) | Forwards Frames? | Learns MACs? | Sends/Receives BPDUs? |
|---|---|---|---|---|
| Disabled | Discarding | No | No | No |
| Blocking | No | No | Yes (receives only) | |
| Listening | Eliminated in RSTP | No | No | Yes |
| Learning | Learning | No | Yes | Yes |
| Forwarding | Forwarding | Yes | Yes | Yes |
3. RSTP Port Roles
RSTP retains the Root Port and Designated Port roles from classic STP and adds two new roles: Alternate Port and Backup Port. Each port on every non-root switch is assigned exactly one role at any given time.
3.1 Root Port (RP)
The Root Port is the single port on a non-root switch that has the best (lowest cost) path toward the root bridge. Every non-root switch has exactly one Root Port. It is always in the Forwarding state.
3.2 Designated Port (DP)
Each network segment has exactly one Designated Port — the port on that segment with the best path cost toward the root bridge. Designated Ports are always in the Forwarding state. On the root bridge itself, all active ports are Designated Ports.
3.3 Alternate Port (AP) — New in RSTP
The Alternate Port is the RSTP replacement for STP's Non-Designated (Blocking) port. It receives BPDUs from a different switch on the same segment that offers a better path to the root. The Alternate Port stays in Discarding state normally but can immediately transition to Forwarding if the Root Port fails — without waiting for any timers. This is the primary mechanism behind RSTP's fast convergence.
3.4 Backup Port (BP) — New in RSTP
A Backup Port receives BPDUs from the same switch on the same shared segment — meaning the switch has two or more connections into the same segment (e.g., via a hub). The Backup Port stays in Discarding state and acts as a redundant path on that local segment. Backup Ports are rare in modern switched networks (they require a shared hub-connected segment) and are less commonly tested than Alternate Ports.
| Port Role | Normal State | Exists On | Purpose |
|---|---|---|---|
| Root Port | Forwarding | Non-root switches (one per switch) | Best path toward root bridge |
| Designated Port | Forwarding | One per segment (all ports on root bridge) | Best path from segment toward root; forwards traffic onto segment |
| Alternate Port | Discarding | Non-root switches | Backup to Root Port; BPDU received from a different switch |
| Backup Port | Discarding | Non-root switches (rare) | Backup to Designated Port; BPDU received from the same switch |
See also: STP Port Roles (classic) | Root Bridge Election
4. Edge Ports — The Standardised PortFast
An Edge Port is an RSTP port that is connected directly to an end device (PC, server, printer) rather than to another switch. Because no bridging loops can form through an end device, an Edge Port is allowed to skip the Discarding and Learning states entirely and transition immediately to Forwarding when the link comes up.
Edge Ports are the IEEE-standard equivalent of Cisco's PortFast
feature. On Cisco switches running Rapid PVST+, configuring
spanning-tree portfast on an interface designates it as an
Edge Port.
Edge Port and BPDU Guard
An Edge Port that receives a BPDU has a switch connected to it — which means it is no longer a true edge port and could create a loop. BPDU Guard is configured alongside Edge Ports to detect this condition: if any BPDU arrives on an Edge Port, BPDU Guard immediately shuts the port down (err-disabled state), protecting the topology. This is critical in production environments.
Switch(config-if)# spanning-tree portfast Switch(config-if)# spanning-tree bpduguard enable
See also: PortFast & BPDU Guard – Full Guide | PortFast & BPDU Guard Lab
5. Link Types in RSTP
RSTP introduces the concept of link types to determine whether rapid convergence (the proposal/agreement mechanism) can be used on a given link. There are three link types:
| Link Type | Description | Rapid Convergence? | How Detected |
|---|---|---|---|
| Point-to-Point | Full-duplex link between two switches | Yes — proposal/agreement handshake used | Auto-detected: full-duplex interface |
| Shared | Half-duplex link (e.g., connected to a hub) | No — falls back to classic STP timers | Auto-detected: half-duplex interface |
| Edge | Port connected to an end device (no switch) | Yes — immediate Forwarding, no negotiation needed | Manually configured (PortFast / Edge Port) |
6. Rapid Convergence — The Proposal/Agreement Mechanism
The core of RSTP's speed improvement is the Proposal/Agreement (P/A) handshake. Instead of waiting for timers to expire, adjacent switches actively negotiate to transition ports to Forwarding. This handshake can only happen on Point-to-Point links between two switches.
Proposal/Agreement — Step by Step
Topology Change Handling
In classic STP, a Topology Change Notification (TCN) is sent to the root bridge, which then floods TC-flagged BPDUs to all switches, causing them to shorten their MAC address ageing timer. This process can take many seconds.
In RSTP, topology change handling is more efficient:
- Any switch that detects a topology change (a non-edge port moving to
Forwarding) immediately sends TC-flagged BPDUs out all its Designated
and Root Ports for
2 × Hello Time(2 seconds by default). - Each switch that receives a TC-flagged BPDU flushes its MAC address table for all ports except the port the TC was received on, then propagates the TC further.
- There is no need to involve the root bridge — convergence is distributed and local.
7. RSTP BPDU Format and Hello Behaviour
RSTP uses an updated BPDU format that differs meaningfully from classic STP BPDUs:
| BPDU Field / Behaviour | Classic STP (802.1D) | RSTP (802.1w) |
|---|---|---|
| BPDU version | 0 | 2 |
| Who generates BPDUs? | Only the root bridge; others relay | Every switch generates its own Hello BPDUs every 2 seconds |
| Flags field (1 byte) | Uses 2 bits (TC + TCA) | Uses all 8 bits: TC, Proposal, Port Role (2 bits), Learning, Forwarding, Agreement, TCA |
| BPDU expiry (MaxAge) | MaxAge = 20 s; BPDUs must arrive or port goes Blocking | 3 × Hello Time = 6 s; a port is considered dead after 3 missed Hellos |
| Inferior BPDU handling | Ignored | Immediately triggers re-election; switch responds with its own superior BPDU |
Because every switch sends its own Hello BPDUs independently, RSTP can detect a neighbour failure in just 3 × Hello Time = 6 seconds (compared to MaxAge = 20 seconds in classic STP), dramatically reducing failure detection time.
8. Cisco's Rapid PVST+ Implementation
Cisco's implementation of RSTP is called Rapid PVST+ (Rapid Per-VLAN Spanning Tree Plus). It runs a separate instance of RSTP per VLAN, just as PVST+ runs a separate instance of classic STP per VLAN. This allows per-VLAN load balancing by designating different switches as root bridges for different VLANs.
Configuring Rapid PVST+ on Cisco IOS
! Enable Rapid PVST+ (default on modern Cisco IOS): Switch(config)# spanning-tree mode rapid-pvst ! Verify the spanning-tree mode: Switch# show spanning-tree summary Switch is in rapid-pvst mode ! Set a switch as root bridge for a specific VLAN (primary and secondary): Switch(config)# spanning-tree vlan 10 root primary Switch(config)# spanning-tree vlan 20 root secondary ! Manually set bridge priority (must be a multiple of 4096): Switch(config)# spanning-tree vlan 10 priority 4096 ! Configure an edge port with BPDU Guard: Switch(config-if)# spanning-tree portfast Switch(config-if)# spanning-tree bpduguard enable ! Verify RSTP topology per VLAN: Switch# show spanning-tree vlan 10 Switch# show spanning-tree vlan 10 detail
show spanning-tree summary.
See also: PVST+/Root Bridge Lab | RSTP Configuration Lab | Spanning Tree Root Bridge Lab
9. RSTP vs Classic STP — Topology Example
10. Common RSTP Verification Commands
! Show spanning-tree status for all VLANs: Switch# show spanning-tree ! Show spanning-tree for a specific VLAN: Switch# show spanning-tree vlan 10 ! Show detailed information (timers, port states, costs): Switch# show spanning-tree vlan 10 detail ! Show summary of mode and root status: Switch# show spanning-tree summary ! Show interface-level STP info: Switch# show spanning-tree interface Gi0/1 ! Show spanning-tree interface in detail: Switch# show spanning-tree interface Gi0/1 detail
Sample Output — show spanning-tree vlan 10
Sts shows the port state
(FWD = Forwarding, BLK = Blocking/Discarding, LRN = Learning).
Role shows the RSTP port role (Desg = Designated, Root,
Altn = Alternate, Back = Backup). Type shows the link type
(P2p = Point-to-Point, Shr = Shared, Edge = Edge Port).
See also: show vlan Command | RSTP Configuration Lab
Test Your Knowledge — RSTP Quiz
Related Topics & Step-by-Step Tutorials
Continue your Spanning Tree studies:
- Spanning Tree Protocol – Concepts & Operation — STP fundamentals, BPDU exchange, port states
- PVST and PVST+ — Per-VLAN Spanning Tree Plus — one STP instance per VLAN
- RSTP – Rapid Spanning Tree Protocol — Rapid STP — 802.1w convergence improvements
- Root Bridge Election — Bridge ID, priority, and root port selection
- STP Port Roles — Root, Designated, Alternate and Backup ports
- PortFast & BPDU Guard – STP Optimisation and Access-… — PortFast and BPDU Guard for edge ports
- EtherChannel Configuration – Complete Guide — EtherChannel — aggregating links to reduce STP blocking
- Spanning Tree Protocol (STP) — Root Bridge Election (Step-by-Step)
- RSTP / Rapid Spanning Tree Configuration (Step-by-Step)
- PortFast & BPDU Guard Configuration (Step-by-Step)
- EtherChannel (LACP) Configuration (Step-by-Step)