Spanning TreeGlobal Config

spanning-tree mode [pvst|rapid-pvst|mst]

Configures the Spanning Tree Protocol (STP) mode on a Cisco switch to either Per-VLAN Spanning Tree (PVST+), Rapid PVST+, or Multiple Spanning Tree (MST) to prevent Layer 2 loops.

Syntax·Global Config
spanning-tree mode [pvst|rapid-pvst|mst]

When to Use This Command

  • Migrating from legacy PVST+ to Rapid PVST+ for faster convergence in a network with redundant links.
  • Enabling MST to reduce STP overhead by grouping multiple VLANs into a single spanning tree instance.
  • Configuring PVST+ on a switch that needs to interoperate with older Cisco switches that do not support rapid or MST.
  • Standardizing all switches in a data center to Rapid PVST+ for sub-second convergence during link failures.

Command Examples

Enable Rapid PVST+ on a switch

spanning-tree mode rapid-pvst

No output is generated by this command. Use 'show spanning-tree' to verify the mode.

Enable MST and enter MST configuration

spanning-tree mode mst

After entering global config, this command enables MST. Then use 'spanning-tree mst configuration' to configure MST instances.

Understanding the Output

This command does not produce output directly. To verify the STP mode, use 'show spanning-tree' or 'show spanning-tree summary'. In 'show spanning-tree summary', look for the 'Mode' field which will display either 'PVST+', 'Rapid-PVST', or 'MST'. For PVST+, the output shows per-VLAN STP information. For Rapid PVST+, the port roles (Root, Designated, Alternate, Backup) and states (Forwarding, Learning, Discarding) are shown. For MST, the output includes MST instance IDs and their associated VLANs. Key fields: 'Root ID' shows the root bridge MAC and priority; 'Bridge ID' shows the local switch; 'Port' indicates the interface; 'Role' and 'State' indicate the port's STP role and forwarding state. A healthy network should have all ports in a forwarding state (except those blocked by STP) and a single root bridge per VLAN or instance.

CCNA Exam Tips

1.

CCNA exam expects you to know that Rapid PVST+ is the default on newer Cisco switches (IOS 15.0 and later).

2.

Remember that MST requires a region name and revision number to match across switches; mismatched MST configurations can cause loops.

3.

The exam may test that PVST+ is Cisco proprietary and runs one STP instance per VLAN, while MST is IEEE 802.1s and can map multiple VLANs to fewer instances.

4.

Know that 'spanning-tree mode mst' alone does not configure MST instances; you must also enter MST configuration mode to map VLANs.

Common Mistakes

Forgetting to configure the same MST region name and revision on all switches in the MST region, causing them to treat each other as separate regions.

Assuming that changing the STP mode is hitless; in production, changing mode can cause a temporary topology change and traffic disruption.

Using 'spanning-tree mode pvst' on a switch that needs rapid convergence, resulting in slow (30-50 second) convergence on link failures.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions