RSTP vs MSTP: Convergence, Instances and Migration - 夜莺博客

RSTP vs MSTP: Convergence, Instances and Migration

Classic 802.1D spanning tree converges in about 50 seconds — unacceptable for any modern network. RSTP (802.1w) fixes convergence with explicit port roles and handshakes; MSTP (802.1s) then solves RSTP's scaling problem by mapping many VLANs onto a few spanning tree instances, each with its own topology for load balancing. This guide contrasts the two, explains MST regions and the IST/MSTI model, and shows the Cisco commands to switch modes and build an MST region.

RSTP: Fast Convergence, One Tree per VLAN (PVST+)

RSTP redefines port states as roles (root, designated, alternate, backup) and converges in the low hundreds of milliseconds on point-to-point links — no reliance on timers, using proposal/agreement handshakes and edge-port behavior instead. Cisco's rapid-PVST+ runs one RSTP instance per VLAN, which gives per-VLAN load balancing but burns CPU and BPDU overhead as the VLAN count grows:

Switch(config)# spanning-tree mode rapid-pvst
Switch(config)# spanning-tree vlan 10 priority 4096

MSTP: Many VLANs, Few Instances

MST (802.1s) maps groups of VLANs to a single MST instance (up to 65). Each instance computes its own spanning tree, so instance 1 can block one uplink while instance 2 blocks the other — load balancing with a fraction of the instances PVST+ needs. Instances live inside an MST region: switches with the same region name, revision number and VLAN-to-instance mapping.

IST and MSTIs

Inside a region, the Internal Spanning Tree (IST, instance 0) is an RSTP instance that represents the whole region to the outside world — it is the only instance that exchanges BPDUs across the region boundary, which is why the entire region looks like one bridge to neighboring PVST+/RSTP networks. The remaining MSTIs are pure RSTP instances that never leave the region. MST runs RSTP internally, so you get rapid convergence and instance scaling.

Configuring an MST Region on Cisco

Switch(config)# spanning-tree mode mst
Switch(config)# spanning-tree mst configuration
Switch(config-mst)# name REGION-CORE
Switch(config-mst)# revision 1
Switch(config-mst)# instance 1 vlan 10,20
Switch(config-mst)# instance 2 vlan 30,40
Switch(config-mst)# exit

Every switch in the region must carry the identical name, revision and mapping — any difference and the switches split into separate regions at the boundary. Untagged VLANs stay on the CIST (instance 0); only VLANs explicitly mapped leave it. Set per-instance roots the same way as per-VLAN roots:

Switch(config)# spanning-tree mst 1 priority 4096
Switch# show spanning-tree mst configuration
Switch# show spanning-tree mst 1

Migration and Interop Rules

  • Migrate core first, then distribution, then access — changing STP type reconfigures the tree and can disrupt traffic.
  • If the MST region meets a PVST+ cloud over a trunk, one side must be the root for all VLANs; the PVST+ simulation fails (root inconsistent) otherwise.
  • PortFast, BPDU guard, root guard and loop guard keep working in MST mode.

Edge protections apply identically in every mode — see PortFast, BPDU guard and root guard — and if you are still fighting Layer 2 loops, our LLDP vs CDP guide helps confirm what your neighbors actually are.

原文链接:https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/24248-147.html