spanning-tree mode [version]
Dictates the specific Spanning Tree Protocol (STP) flavor the switch will run to mitigate Layer 2 broadcast storms. This command radically alters how the switch calculates root bridges, blocks redundant links, and handles network convergence times.
Quick Reference
Switch(config)#(802.1D)(802.1w)Syntax & Parameters
| Protocol Option | Operational Characteristics |
|---|---|
| pvst | Per-VLAN Spanning Tree Plus (IEEE 802.1D). Cisco's proprietary legacy standard. It runs a separate calculation for every single VLAN, allowing load balancing. Drawback: Extremely slow convergence (takes up to 50 seconds for a blocked port to turn green if a link fails). |
| rapid-pvst | Rapid PVST+ (IEEE 802.1w). The modern enterprise standard. Still runs per-VLAN, but skips the legacy "Listening" state. Benefit: Sub-second convergence times. A link failure reroutes traffic almost instantly. |
| mst | Multiple Spanning Tree (IEEE 802.1s). Used in massive datacenters. Groups multiple VLANs into a single STP instance to save CPU cycles on the switch. Not heavily tested on the CCNA configuration labs, but conceptual knowledge is required. |
CLI Deployment Scenarios
Scenario 1: Upgrading to Rapid PVST+
You discover an older Catalyst 2960 switch is running the legacy 802.1D standard, causing users to experience 50-second network outages when a core link flaps. You upgrade the protocol.
CCNA Exam Gotchas
Backward Compatibility
A common exam question asks what happens if Switch A runs rapid-pvst and Switch B runs pvst.
They will form a neighbor relationship. Rapid PVST+ is backward compatible. However, the specific link connecting them will downgrade to the slower 802.1D legacy timers. You only get "Rapid" speeds if both ends of the wire speak the Rapid protocol.
The CPU Exhaustion Trap
Because PVST+ and Rapid-PVST+ calculate a unique tree for every single VLAN, they are incredibly resource-intensive. If an exam scenario mentions a switch with 500 VLANs whose CPU is pegged at 100%, the correct architectural solution is to switch to spanning-tree mode mst to consolidate the calculations.