Rapid PVST+
Root bridge election, port roles and states, path cost and tie-breaking, and how Rapid PVST+ converges faster than classic STP.
Root election and roles
Spanning Tree prevents Layer 2 loops by blocking redundant paths while keeping one active tree. Rapid PVST+ is Cisco's per-VLAN implementation of 802.1w RSTP: each VLAN computes its own topology and reconverges in sub-second to a few seconds instead of classic STP's ~50 seconds.
Election sequence
- Every switch advertises its Bridge ID: priority (lower wins; default 32768) + system ID extension (VLAN) + MAC (tiebreak).
- The lowest BID becomes the root bridge for that VLAN.
- Each non-root switch picks its root port — the port with the lowest cost path to the root.
- Each segment picks one designated port (the port advertising the best path); everything else becomes alternate/backup and discards.
RSTP port roles and states
| Role | State | Meaning |
|---|---|---|
| Root port | Forwarding | Best path to the root on each non-root switch |
| Designated port | Forwarding | Best port for a segment — forwards for that link |
| Alternate port | Discarding | Backup path to the root (blocked) |
| Backup port | Discarding | Backup for a designated port on a shared segment |
- SW1
- BID 24586 + VLAN10, MAC aaaa.bbbb.0001
- SW2
- BID 32778 (default 32768+VLAN10), MAC bbbb
- Compare priority: SW1 24586 vs SW2 32778 → SW1 lower → SW1 is root.
- On SW2 the port with the lowest root path cost to SW1 becomes the root port.
- On the shared segment, SW1's side advertises the better path → SW1's port is designated and forwards; SW2's redundant port goes alternate/blocking.
Lower BID wins the root; closer-to-root wins the forwarding roles.
Port states and timers
STP/RSTP timers and parameters
| Parameter | Classic STP (802.1D) | Rapid PVST+ (802.1w) |
|---|---|---|
| Hello interval | 2 s | 2 s |
| Max age | 20 s | 3 missed hellos (~6 s) triggers reconvergence |
| Learning states | Listening 15 s + Learning 15 s | Discarding → learning → forwarding, often sub-second with edge ports |
| Convergence | ~30–50 s | Sub-second on point-to-point links via proposal/agreement |
| Port cost (default) | Bandwidth-derived (e.g., 1G = 4) | Same cost model |
Defaults are per standard and Cisco implementation; verify platform docs for exact values.
VLAN0010 Root ID Priority 32778 Address 00aa.bb01.0201Root's BID — priority 32768+VLAN10. Root port Fa0/1Non-root switch: its best path to the root leaves Fa0/1.Gi1/0/1 Desg FWD 4 128.1 P2pDesignated port forwarding, cost 4, point-to-point link.Gi1/0/2 Root FWD 4 128.2 P2pRoot port — best path toward the root.Gi1/0/3 Altn BLK 4 128.3 P2pAlternate port blocked — your redundant path.Verification and control
Confirm topology and optionally set a primary root — Privileged EXEC (+ global config for priority)
Cisco IOS / IOS XE
configure terminal spanning-tree vlan 10 root primary end
show spanning-tree show spanning-tree vlan 10 show spanning-tree root
- The intended root shows no root port; non-root switches each show one root port.
- Blocked ports sit on the side you expect — redundancy exists but doesn't loop.
root primarylowers priority toward 24576 — don't leave elections to chance with default priorities.
Changes device configuration.
Common mistakes
- Assuming blocking means a failed link — blocking IS the healthy redundant state.
- Believing RSTP changes the election — the algorithm is the same, only convergence is faster.
- Expecting STP to preempt at root-election rate — a superior BID triggers re-election, but convergence timing depends on timers and topology, not a fixed deadline.
- Forgetting STP runs per-VLAN — different VLANs can legitimately have different roots and topologies.
- Tuning priority without planning — root placement determines which links forward.
Observation: A new switch becomes root and half the uplinks now block on the wrong side.
- New switch has lower default BID than the intended root
- Path costs differ from the design (slower links preferred or faster blocked)
- PortFast incorrectly applied to an uplink
| Check | Indicates |
|---|---|
show spanning-tree root per VLAN | Identifies the actual root vs the intended root. |
| Port costs and link speeds on the new paths | Confirms cost-based role choices. |
show spanning-tree interface detail for PortFast | PortFast on a switch link bypasses safety. |
Correction: Set explicit primary/secondary root priorities and remove PortFast from uplinks.
Root placement matches the design and blocked ports sit on intended redundant links.
Related resources
Sources
- Cisco CCNA 200-301 v1.1 Exam Topics (official PDF) — reviewed 2026-11-02
- IEEE 802.1 Working Group (802.1Q/802.1w) — reviewed 2026-11-02
- Cisco — LAN Switching Command Reference — reviewed 2026-11-02
Targets CCNA 200-301 v1.1 objectives. Supplemental blocks are labeled beyond exam scope.