show spanning-tree root
Lists the root bridge ID, root cost and root port for every VLAN on one screen.
Written by a working field network engineer · CCNA, Security+, CySA+
Answers “who is the root, and how do I get there?” for every VLAN at once. It is the fastest way to confirm root placement after changing priorities across many VLANs.
Example output
SW2#show spanning-tree root
Root Hello Max Fwd
Vlan Root ID Cost Time Age Dly Root Port
---------------- -------------------- --------- ----- --- --- ------------
VLAN0010 24586 0050.7966.6800 12 2 20 15 Po1
VLAN0020 24596 0050.7966.6800 12 2 20 15 Po1
VLAN0099 24675 0050.7966.6800 12 2 20 15 Po1Reference output: hand-written in standard Cisco IOS format for this example network, not captured from a device.
Useful variants
show spanning-tree root brief
What each column or field means
| Field | Meaning |
|---|---|
Root ID | The root bridge’s priority (including the VLAN number) and MAC address. |
Root Cost | This switch’s path cost to the root. 0 on the root itself. |
Hello Time / Max Age / Fwd Dly | Timers advertised by the root, which every switch in the VLAN uses. |
Root Port | The port this switch uses to reach the root. Blank on the root bridge. |
When it doesn’t look right
Different VLANs have different roots when they should share one.
Priorities were set for some VLANs only. Apply spanning-tree vlan 1-4094 root primary (or the list you use) on the core.
Root Port points away from the core.
Another switch is root for that VLAN. Find it from the Root ID MAC and lower the core’s priority.
Related commands
Try it yourself
Learn it in the CCNA path
- Pin the root bridge with root primary and secondary (2. Network Access)
- Make the switch you chose win the root election (Prerequisite review: CCNA topics from the CCNP courses)
Topic
Spanning Tree (STP) — Keep redundant switch links without a Layer 2 loop: root bridge election, port roles and states, Rapid PVST+, PortFast and BPDU Guard.