Start here for a broadcast storm, a link that stays blocked, slow convergence after a change, or to check that the intended switch is root.
Spanning Tree Protocol Reference
Spanning tree keeps a switched network free of loops: the switches elect one root bridge, and every redundant path towards it is blocked until needed.
1. show spanning-tree vlan <id> — which switch is root? The intended one?
2. This switch's root port — the expected uplink?
3. Any port blocking that should forward, or forwarding where a loop exists?
4. show spanning-tree detail | include changes|from — count rising? From which port?
5. show spanning-tree inconsistentports and err-disabled ports.
intended root has the lowest priority → BPDUs received on every uplink → one root port per switch → one designated port per segment → remaining ports blocking → topology changes rare
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show spanning-tree blockedportsShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Subtopics
Go one level deeper into this subject.
Spanning Tree protocols prevent Layer-2 loops by electing a root and placing redundant paths into non-forwarding roles/states.
Subtopic STP Guard Features ReferenceBPDU Guard, Root Guard, Loop Guard and related protections constrain how switchports participate in spanning tree.
Subtopic STP Root & Port Election Deep ReferenceSTP selects a root bridge then derives root, designated and alternate/blocking roles using a deterministic sequence of path-cost and bridge/port tie-breakers.
Subtopic RSTP Proposal / Agreement Deep ReferenceRSTP accelerates convergence on point-to-point links using proposal/agreement synchronization instead of relying solely on classic STP forward-delay transitions.
Subtopic MST Region & Instance Deep ReferenceMultiple Spanning Tree maps many VLANs into a smaller number of spanning-tree instances and requires matching region parameters between switches.
Subtopic BPDU Guard Deep ReferenceBPDU Guard protects edge/PortFast-style ports by taking action when BPDUs are received where a switch-to-switch topology is not expected.
Subtopic Root Guard Deep ReferenceRoot Guard protects a designated port from accepting a superior BPDU that would make the downstream side influence the intended STP root placement.
Subtopic Loop Guard Deep ReferenceLoop Guard protects non-designated STP ports from incorrectly transitioning toward forwarding when expected BPDUs disappear on a unidirectional or control-plane-failure path.
Subtopic STP / RSTP BPDU Field ReferenceSTP and RSTP BPDUs carry root information, sender bridge/port identity, path cost, timers and flags that drive topology decisions.
Subtopic STP/RSTP Flag ReferenceBPDU flags carry topology-change and RSTP proposal/agreement/role/learning/forwarding state.
Subtopic MST BPDU Field ReferenceMST BPDUs extend RSTP information with region identity, digest and per-instance records.
Set the root on purpose with a low priority; otherwise the oldest switch may win. Every switch has one root port; every segment one designated port; the rest block. PortFast and BPDU guard belong on access ports only. Constant topology changes flush MAC tables.
show spanning-tree vlan <id>— root bridge, this switch's priority, role and state of each port.show spanning-tree root— root and root port per VLAN.show spanning-tree summary— mode and enabled features.show spanning-tree detail | include changes|from— topology change count and source.show spanning-tree inconsistentports— ports blocked by root guard or loop guard.
ReferenceWhat it is1 section · depth on demand
What this group covers
STP, RSTP and MST at protocol level: root and port election rules, proposal/agreement, MST regions and instances, BPDU and flag fields, and guard features (BPDU Guard, Root Guard, Loop Guard). Start with *STP / RSTP / MST Reference* and go to the BPDU field references when reading captures.
ReferenceImportant terms & boundaries3 sections · depth on demand
Where to look
| Question | Reference |
|---|---|
| Why is this switch the root? | *STP Root & Port Election Deep Reference* |
| Why is a port blocking? | *STP / RSTP / MST Reference* |
| Why did RSTP converge slowly? | *RSTP Proposal / Agreement Deep Reference* |
| Why do MST regions not match? | *MST Region & Instance Deep Reference* |
| Why was a port err-disabled by BPDU Guard? | *BPDU Guard Deep Reference* |
| What do the BPDU flags mean? | *STP/RSTP Flag Reference* |
Spanning Tree keeps a switched network with redundant links free of loops by blocking just enough ports to leave a single active path, and unblocking them when a link fails. Its behaviour depends on which switch is elected root, so a stable network sets the root deliberately and protects edge ports against unexpected switches. Frequent topology changes are the warning sign to watch for, because each one briefly floods traffic across the network.
Spanning Tree quick reference:
show spanning-tree vlan 20
show spanning-tree summary
show spanning-tree detail | include ieee|occurr|from|is exec
spanning-tree mode rapid-pvst
spanning-tree vlan 1-4094 root primary
spanning-tree portfast default
spanning-tree portfast bpduguard default
Set root bridges deliberately (distribution/core), use PortFast + BPDU Guard on edge ports, and investigate frequent topology changes — they flush MAC tables and cause flooding.
Key numbers
| Item | Value |
|---|---|
| Default bridge priority | 32768 (+ VLAN ID with PVST) |
| Hello / Max age / Forward delay | 2 / 20 / 15 s |
| RSTP port roles | Root, designated, alternate, backup |
| MST instances (Catalyst) | Up to 65, including MST0 (IST) |
In depth
Spanning Tree Protocol keeps redundant Layer 2 topologies loop-free by electing a root bridge, choosing one forwarding path from every switch towards it, and blocking the rest. Without it, a single redundant link causes broadcast storms and MAC table instability within seconds.
| Variant | Note |
|---|---|
| 802.1D (classic) | Slow, 30–50 s convergence |
| RSTP / Rapid PVST+ | Rapid convergence, per-VLAN on Cisco |
| MST | Many VLANs mapped to few instances |
Good STP practice: choose the root deliberately, use PortFast with BPDU Guard on edge ports, and Root/Loop Guard where topology must be protected.