Sub topic 18
MSTP: Mapping Many VLANs to a Few Trees
This chapter assumes you know how the root bridge is elected, how port roles are chosen, and how Rapid PVST+ runs one tree per VLAN. It then covers troubleshooting.
Why MSTP exists
Rapid PVST+ runs one spanning tree instance per VLAN. With 200 VLANs, each switch builds and sends BPDUs for 200 trees, which costs CPU and memory. Most of those trees are identical. MSTP (IEEE 802.1s) maps many VLANs onto a few instances, so you keep load balancing with far fewer trees.
How MSTP works
- An instance is one spanning tree. Each VLAN belongs to exactly one instance.
- Instance 0 is the IST. It always exists, and any VLAN you do not map falls into it.
- A region is a group of switches that share the same region name, revision number, and VLAN-to-instance mapping. Switches in different regions see each other as one big bridge.
- MSTP uses RSTP mechanics, so convergence is fast.
Configuration
Configure the identical region on every switch, then set the priority per instance.
! Cisco IOS
configure terminal
spanning-tree mode mst
spanning-tree mst configuration
name CAMPUS
revision 1
instance 1 vlan 10,20
instance 2 vlan 30,40
exit
spanning-tree mst 1 priority 4096
spanning-tree mst 2 priority 8192
end
show spanning-tree mst configuration
show spanning-tree mst 1Troubleshooting loops and instability
A loop looks like this: links at 100% utilization, high switch CPU, MAC addresses flapping between ports, and users losing connectivity. Work through these steps.
- Find the root with
show spanning-tree vlan 10(orshow spanning-tree mst 1). Confirm it is the switch you intended. - Check for unexpected topology changes. Run
show spanning-tree detailand look at the topology change count and the port it came from. A counter that keeps rising points to a flapping link or an edge port without PortFast. - Run
show spanning-tree inconsistentports. Ports listed there were blocked by BPDU Guard, Root Guard, or Loop Guard, which tells you what was violated. - Look in the logs for MAC flap messages. The ports named in them are usually the loop path.
- Check for unidirectional links, a common cause of a missing BPDU stream that unblocks a port by mistake. Loop Guard and UDLD address this.
- Stop the storm first. Shut down the suspect port, then repair the cause. Typical causes are an unmanaged switch patched into two ports, a missing guard feature, or a region mismatch.
| Symptom | Likely cause |
|---|---|
| Wrong switch is root | Default priorities, or a rogue switch without Root Guard |
| Topology changes keep rising | Flapping link, or host ports without PortFast |
| Port in root-inconsistent state | Root Guard blocked a superior BPDU |
| Uneven or odd paths between switches | MST region mismatch |
Exercise
Two access switches show the same MST name and revision, but traffic for VLAN 30 takes a strange path. What do you check first, and why?
Show answer
Check the VLAN-to-instance mapping with show spanning-tree mst configuration, and compare the digest on both switches. The name and revision can match while the mapping differs, which splits the switches into separate regions.