Use it when designing which switch is root per VLAN, or when the root has moved to an unexpected switch.
Root Bridge
The root bridge is the switch with the lowest bridge ID (priority, then MAC address). All its ports are designated and forwarding, and every other switch computes its best path towards it.
1. show spanning-tree root — root ID and root port per VLAN.
2. show spanning-tree vlan <id> bridge — local priority and bridge ID.
3. Wrong root → lower priority on the intended root (spanning-tree vlan <id> priority 4096) and set a secondary.
4. Root keeps moving → a new switch with a low priority, or root guard missing.
5. show spanning-tree vlan <id> on the root — "This bridge is the root".
each switch announces its bridge ID → lowest priority + MAC wins → root sends BPDUs → all switches agree on the root ID → root ports point towards it
Compare candidate BIDs/priorities, find the superior device, then correct root design deliberately.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
spanning-tree vlan <vlan-list> root primaryPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational verification and known-good state Verify boundary
Verify root state for one VLAN/instance at a time. show spanning-tree should identify Root ID, local Bridge ID, root path cost and port roles. On the intended root, Root ID and Bridge ID should match for that instance. On a downstream switch, follow the root port and physical topology toward the root, checking that accumulated cost and redundant alternate paths match design. Compare primary and secondary root priorities before and after maintenance. If MST is used, verify region name/revision/VLAN mapping first; two switches that disagree on region configuration do not participate in the same internal instance logic even if their cabling is correct.
Step 2 Verification & troubleshooting Narrow the fault
Check show spanning-tree root and show spanning-tree vlan <vlan> across the topology. Confirm the same intended Root ID is seen everywhere for that VLAN/instance.
Step 3 Diagnosis Narrow the fault
Root Bridge — discriminating diagnosis for Switching → STP → Spanning Tree Fundamentals → Root Bridge. Use this chain of steps: Concrete boundaries: physical/link/VLAN → BPDU reception → root/instance calculation → port role → forwarding state → MAC learning → target VLAN path → original frame/return path. IF the stable identity (physical/logical interface, VLAN or MST instance, peer system/port identity and source/destination MAC) cannot be matched between adjacent layers, stop and correct scope before interpreting downstream absence. ELSE IF the object is transitional (RSTP proposal/agreement or DTP negotiation while counters/state progress toward forwarding), inspect the responsible timer/retry/sequence/queue and show whether it progresses. ELSE IF the owner looks known-good (the switchport mode is as designed, the intended VLAN is admitted, STP role/state matches design and MAC learning follows the expected logical path), verify the next consumer/effective state rather than repeating the same local check. A broken signature is suspended/individual member, VLAN missing or native mismatch, unexpected root/role, blocking when forwarding is required, or MAC movement on the wrong path It is a candidate boundary, not automatic root cause.
Step 4 Failure signatures and troubleshooting branches Narrow the fault
If an unexpected switch becomes root, inspect priority changes, newly introduced switches, region/VLAN scope and whether BPDUs from the intended root are actually reaching the domain. Root Guard can intentionally block a port that receives superior BPDUs; treat that as a protection signal rather than an ordinary link failure. If the root is correct but traffic follows an odd path, move to root-port/path-cost and designated/alternate decisions instead of changing root priority. Frequent root changes should be correlated with link flaps, topology changes and BPDU visibility. Do not lower priority randomly on multiple devices; document which device should win and which should be backup.
Step 5 When the problem is really fixed Narrow the fault
After remediation, the intended device must remain root for the exact VLAN/instance, downstream switches must select the expected root path, and the original Layer-2 flow must succeed without creating a loop or unexpected blocking elsewhere. Trigger or observe a controlled redundancy condition only when safe and verify the secondary design behaves as intended. A root ID displayed by one switch is local STP state, but it does not show every switch agrees or every trunk carries the VLAN. Capture/compare BPDUs or inspect multiple switches when the topology itself is in question. If root placement changed, verify the intended secondary root still has the designed next-best Bridge ID and inspect more than one downstream switch. That checks convergence intent rather than only the winner visible from a single vantage point and reduces the chance that a partitioned STP domain is mistaken for healthy election.
Step 6 Common mistakes Narrow the fault
- Root at the edge of the network.
- No root guard on access-facing ports.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Set the root with spanning-tree vlan <id> priority <value> (multiples of 4096) or spanning-tree vlan <id> root primary|secondary. Put the root in the distribution or core, ideally on the same switch as the VLAN's active default gateway. Root guard on downstream ports keeps another switch from taking over.
show spanning-tree vlan <id>— root ID, local bridge ID, and each port's role, state and cost.show spanning-tree root— the root bridge, root cost and root port per VLAN.show spanning-tree vlan <id> detail— BPDUs sent and received, topology changes and their source.show spanning-tree summary— mode, enabled features and port counts per state.show spanning-tree inconsistentports— ports blocked by root guard, loop guard or type inconsistency.
ReferenceWhat it is1 section · depth on demand
What it is
The root bridge is the reference point for an STP tree. Every other switch calculates its best path toward this bridge.
ReferenceWhy it matters1 section · depth on demand
Why it matters
Use deliberate root placement to make Layer 2 forwarding predictable and align the tree with the intended distribution/core design.
ReferenceHow it works1 section · depth on demand
How it works
Root Bridge — state ownership for Switching → STP → Spanning Tree Fundamentals → Root Bridge. Identity to preserve: physical/logical interface, VLAN or MST instance, peer system/port identity and source/destination MAC Owner sequence: STP/RSTP/MST receives BPDUs per port/VLAN or instance, elects a root and root path, assigns port roles, and places ports into forwarding/discarding states. Known-good: the switchport mode is as designed, the intended VLAN is admitted, STP role/state matches design and MAC learning follows the expected logical path Transitional: RSTP proposal/agreement or DTP negotiation while counters/state progress toward forwarding Broken: suspended/individual member, VLAN missing or native mismatch, unexpected root/role, blocking when forwarding is required, or MAC movement on the wrong path Do not collapse configured/requested state, owner state, programmed/effective state and workload outcome into one “healthy” flag. What this does not show: link-up alone does not show the required VLAN/MAC path is usable end to end Scope: Cisco IOS / IOS XE first; PVST+/Rapid-PVST+/MST behavior and defaults depend on configured mode.
ReferenceImportant terms & boundaries4 sections · depth on demand
Key points
The switch with the lowest BID becomes root for the VLAN/instance. On the root bridge, all active STP ports are normally designated for their segments.
In depth
The root bridge is the switch with the lowest bridge ID, and every path is measured towards it
The Catalyst 9300 STP guide states that the lowest bridge ID wins the root election. A lower priority value makes a switch more likely to become root, and if priorities are equal, the lowest MAC address wins. The default mode on Catalyst 9300 is Rapid PVST+, so there is a separate root per VLAN.
C9300-CORE1(config)# spanning-tree vlan 10,20,30 root primary
C9300-CORE2(config)# spanning-tree vlan 10,20,30 root secondary
C9300-CORE1# show spanning-tree vlan 20 | include Root|This bridge|Priority
VLAN0020
Root ID Priority 24596
Address a0f8.4912.3400
This bridge is the root
Bridge ID Priority 24596 (priority 24576 sys-id-ext 20)
C9300# show spanning-tree root
The guide describes root primary as setting the priority so that the switch becomes root, and root secondary as setting 28672 for a backup root.
Choosing the root deliberately
| Rule | Reason |
|---|---|
| Root in the distribution or core, never at the access layer | Traffic paths follow the tree towards the root |
| Root and backup root fixed by configuration | Not decided by the oldest MAC address |
| Same root for VLANs that share the same gateway (HSRP/VRRP active) | Avoids suboptimal Layer 2 paths to the gateway |
| Root guard on ports towards access switches | A new switch with a low priority can't take over |
Symptoms of the wrong root
| Symptom | Cause |
|---|---|
| Uplinks blocked in an odd place, traffic hair-pinning | An access switch or an old switch became root |
| Root changes after adding a switch | Priorities left at the default 32768; lowest MAC wins |
| Frequent topology changes | Root moving between switches |
Check show spanning-tree detail | include ieee|occur|from|is exec to see topology-change counts and their source port.
Documented example, not captured output.
Quick reference
The root bridge is the reference point of a spanning tree; all path costs are measured towards it, and all its ports are designated (forwarding). The switch with the lowest bridge ID — priority first, then MAC address — becomes root.
spanning-tree vlan 10,20 root primary ! sets priority 24576 (or lower if needed)
spanning-tree vlan 10,20 root secondary ! 28672
show spanning-tree root
Documented example, not captured output.
Place the root on a distribution or core switch near the centre of traffic; an access switch as root forces traffic through suboptimal paths.
Mechanics and state ownership
Spanning Tree builds a loop-free Layer-2 topology around an elected root bridge. Bridges compare the root information carried in BPDUs; the superior vector ultimately identifies the lowest effective Bridge ID as root for that instance. The root originates the reference from which other bridges calculate root-path cost. On the root itself, active participating ports are normally designated for their segments because there is no root port toward another bridge. Root election is deterministic but can be operationally undesirable if all devices use defaults and the lowest MAC-address component wins. Good design therefore places explicit primary and secondary root preference near the Layer-2 topology center and keeps the election scope—PVST VLAN or MST instance—clear.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Switching → STP → Spanning Tree Fundamentals → Root Bridge. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Quick lookup tables
Root Bridge operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Root-election signal | Known-good | Suspicious | Next check |
|---|---|---|---|
| Root ID | Matches intended root for instance | Unexpected access/edge switch | Priority + BPDU reachability |
| Local Bridge ID | Equals Root ID on root | Root claim inconsistent | Instance/VLAN context |
| Root path cost | Matches intended topology | Higher/unexpected path | Link cost + root port |
| Root changes | Stable except planned events | Frequent transitions | Link/BPDU/topology-change timeline |
| Root Guard state | No superior BPDU on protected edge | Inconsistent/blocking | Identify superior BPDU source |