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
  RSTP port state transitions:

  Link comes up
       │
       ▼
  ┌─────────────┐
  │  Discarding │  ← port is stable and blocked (no loops allowed)
  └──────┬──────┘
         │  Proposal/Agreement handshake succeeds
         │  (or edge port detected)
         ▼
  ┌─────────────┐
  │   Learning  │  ← MAC learning active; no user frames forwarded yet
  └──────┬──────┘
         │  Learning timer expires (Forward Delay = 15 s, but usually skipped
         │  via rapid mechanism)
         ▼
  ┌─────────────┐
  │  Forwarding │  ← fully operational; forwards user traffic
  └─────────────┘
CCNA exam tip: In RSTP, the Listening state does not exist. If a question lists five states, it is describing classic STP. RSTP has exactly three states: Discarding, Learning, and Forwarding.

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.

  Root Bridge (Switch A)
        │
        │ (Root Port on Switch B)
        ▼
  Switch B  ──────►  frames travel toward root via this port

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.

  Root Bridge (Switch A)
       │                │
       │                │
  Switch B          Switch C
  (Root Port)       (Root Port)
       │                │
       └──── Switch D ──┘
          Root Port: toward B (lower cost)
          Alternate Port: toward C (higher cost, discarding)

  If Switch B's link fails:
  Switch D's Alternate Port (toward C) transitions to Forwarding immediately.

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
Memory aid: Alternate = backup for the Root Port (different switch sends better BPDU). Backup = backup for the Designated Port (same switch sends a better BPDU on the shared segment).

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 behaviour:

  [PC] ──── [Switch port Gi0/1 — Edge Port]
               │
               ▼
  Link comes up → immediately enters Forwarding state
  (no Discarding → Learning → Forwarding delay)

  Non-Edge Port (switch-to-switch link):
  [Switch A] ──── [Switch B port Gi0/2 — non-edge]
               │
               ▼
  Link comes up → Discarding → proposal/agreement → Forwarding
  (rapid, but still goes through states)

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
Important: If an Edge Port receives a BPDU, it immediately loses its Edge Port status and participates in normal RSTP negotiation. BPDU Guard prevents this by err-disabling the port instead.

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)
CCNA exam tip: In modern switched networks, virtually all switch interconnects are full-duplex, so almost all inter-switch links are Point-to-Point links and benefit from rapid convergence. Shared links (half-duplex) are essentially only seen with legacy hubs and are rare in production today.

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

  Scenario: Switch A (root bridge) ── Switch B ── Switch C

  Step 1 — Proposal
  Switch A sends a BPDU with the Proposal flag set to Switch B on its
  Designated Port. This means: "I want to be your Designated switch on this
  segment — can I immediately put this port into Forwarding?"

  Step 2 — Sync
  Before Switch B can agree, it must ensure no loops exist downstream.
  Switch B places all its non-edge, non-root ports into Discarding state
  (this is called a "sync"). Switch B's Root Port (toward Switch A) is the
  exception — it will go Forwarding upon agreement.

  Step 3 — Agreement
  Once synced, Switch B sends a BPDU back to Switch A with the Agreement
  flag set: "I confirm you are my Designated switch."

  Step 4 — Forwarding
  Switch A's Designated Port transitions to Forwarding immediately.
  Switch B's Root Port transitions to Forwarding immediately.

  Step 5 — Cascade downstream
  Switch B now sends its own Proposal to Switch C on its Designated Port.
  Switch C performs the same sync and agreement process.
  The handshake cascades switch-by-switch through the topology.
  Timeline comparison — link failure and recovery:

  Classic STP:
  Link failure detected
       │ (MaxAge = 20 s — wait for old BPDU to expire)
       ▼
  Blocking → Listening (15 s Forward Delay)
       ▼
  Learning (15 s Forward Delay)
       ▼
  Forwarding
  Total: up to 50 seconds

  RSTP:
  Link failure detected → Alternate Port transitions immediately
  (no timers required on Point-to-Point links)
  Total: sub-second to ~1 second

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.
Key difference: In classic STP, only the root bridge originates TCN BPDUs in response to a topology change notification from a non-root switch. In RSTP, every switch independently generates and propagates TC BPDUs — making the process significantly faster.

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.

  Rapid PVST+ — one RSTP instance per VLAN:

  VLAN 10: Switch A = Root Bridge → Switch B forwards, Switch C blocks on link X
  VLAN 20: Switch B = Root Bridge → Switch A forwards, Switch C blocks on link Y

  Result: both uplinks from Switch C carry traffic (one per VLAN),
  achieving load balancing while still preventing loops.

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
CCNA exam tip: On modern Cisco Catalyst switches, Rapid PVST+ is the default spanning-tree mode — you do not usually need to explicitly configure it. Always verify with 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

  Three-switch topology with redundant links:

        [Root Bridge — Switch A]
        Gi0/1          Gi0/2
          │                │
          │ DP             │ DP
          │                │
        Gi0/1            Gi0/1
  [Switch B]            [Switch C]
        Gi0/2            Gi0/2
          │                │
          └──── Gi0/1 ─────┘
               Switch D

  Port roles on Switch D:
    Gi0/1 (toward B): Root Port (lower cost to root) — Forwarding
    Gi0/2 (toward C): Alternate Port — Discarding

  Port roles on Switch B, Gi0/2 (toward D): Designated Port — Forwarding
  Port roles on Switch C, Gi0/2 (toward D): Designated Port — Forwarding
  (Switch D's Alternate Port blocks toward Switch C to prevent a loop)

  If Switch B's Gi0/2 link fails:
  Classic STP: Switch D waits up to 50 s for Forwarding
  RSTP:        Switch D's Alternate Port (toward C) moves to Forwarding immediately

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

  VLAN0010
    Spanning tree enabled protocol rstp
    Root ID    Priority    4106
               Address     0001.C9A1.0101
               This bridge is the root
               Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

    Bridge ID  Priority    4106   (priority 4096 sys-id-ext 10)
               Address     0001.C9A1.0101
               Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
               Aging Time  300

  Interface        Role   Sts   Cost     Prio.Nbr   Type
  ---------------- -----  ---   -----    --------   -----
  Gi0/1            Desg   FWD   4        128.1      P2p
  Gi0/2            Desg   FWD   4        128.2      P2p
  Gi0/3            Desg   FWD   4        128.3      P2p Edge
Reading the output: 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

1. How does RSTP (802.1w) primarily achieve faster convergence compared to classic STP (802.1D)?

Correct answer is B. RSTP's rapid convergence comes from the Proposal/Agreement mechanism. When a Point-to-Point link comes up, the Designated Port sends a Proposal BPDU. The neighbour syncs its downstream ports to Discarding and replies with an Agreement, allowing both ports to move to Forwarding immediately — no timers required. Classic STP waits through Forward Delay (15+15 s) regardless of topology state.

2. Which RSTP port role provides an immediate loop-free path to the root bridge if the current Root Port fails?

Correct answer is C. The Alternate Port is in Discarding state and receives superior BPDUs from a different switch. If the Root Port fails, the Alternate Port transitions to Forwarding immediately — no timer wait, no re-election needed. This is the key fast-failover mechanism of RSTP. See: STP Port Roles

3. How many port states does RSTP define?

Correct answer is A. RSTP consolidates the five STP states into three: Discarding (combines Blocking and Disabled), Learning, and Forwarding. The Listening state is eliminated entirely — it served only as a timer wait in STP and has no equivalent in RSTP's active negotiation model.

4. What is an RSTP Edge Port, and what happens if it receives a BPDU?

Correct answer is D. Edge Ports skip the normal Discarding→Learning→Forwarding transition because no bridging loops can form through an end device. If a BPDU arrives on an Edge Port, the switch immediately revokes its edge status and treats it as a normal RSTP port. With BPDU Guard enabled, the port is err-disabled instead. See: PortFast & BPDU Guard

5. On which link type does the RSTP Proposal/Agreement handshake operate?

Correct answer is B. The rapid Proposal/Agreement handshake is only supported on Point-to-Point (full-duplex) links between two switches. Shared (half-duplex) links fall back to classic STP timer-based behaviour. In practice, virtually all modern inter-switch links are full-duplex, so rapid convergence is the norm.

6. What is the difference between an RSTP Alternate Port and a Backup Port?

Correct answer is C. The source of the superior BPDU is the distinguishing factor. An Alternate Port hears a better path to the root from a different neighbour switch — it acts as a standby Root Port. A Backup Port hears a better BPDU from the same switch on the same shared segment — it acts as a standby Designated Port. Both are in Discarding state.

7. In Rapid PVST+, what command enables Rapid PVST+ as the spanning-tree mode on a Cisco switch?

Correct answer is A. Cisco's per-VLAN RSTP implementation is called Rapid PVST+ and is enabled with spanning-tree mode rapid-pvst in global configuration mode. Note that Rapid PVST+ is the default on modern Cisco Catalyst switches — you can verify the active mode with show spanning-tree summary. See: RSTP Configuration Lab

8. How does RSTP detect a neighbour switch failure faster than classic STP?

Correct answer is D. In RSTP, every switch independently generates Hello BPDUs every 2 seconds (not just relaying the root bridge's BPDUs). If a switch misses 3 consecutive Hellos from a neighbour (3 × 2 s = 6 s), it declares the neighbour dead and triggers reconvergence. Classic STP's MaxAge is 20 seconds by default.

9. A switch port shows Role: Altn Sts: BLK in the show spanning-tree output. What does this mean?

Correct answer is B. Altn indicates the Alternate Port role and BLK (Blocking/Discarding) indicates it is currently not forwarding user traffic. This port has heard a superior BPDU from a different switch, confirming there is a better path to the root on that segment. It stands ready to transition to Forwarding immediately if the Root Port goes down. See: RSTP Configuration Lab

10. What is Rapid PVST+ and how does it differ from the IEEE 802.1w standard?

Correct answer is C. IEEE 802.1w defines a single RSTP instance that spans all VLANs on a switch. Cisco's Rapid PVST+ extends this by running one RSTP instance per VLAN, maintaining per-VLAN topology control and enabling different root bridges for different VLANs — allowing traffic load balancing across redundant uplinks. This is the default spanning-tree mode on Cisco Catalyst switches. See: PVST+/Root Bridge Lab

← Back to Home