BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Spanning Tree (STP)

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  Po1

Reference output: hand-written in standard Cisco IOS format for this example network, not captured from a device.

Useful variants

What each column or field means

FieldMeaning
Root IDThe root bridge’s priority (including the VLAN number) and MAC address.
Root CostThis switch’s path cost to the root. 0 on the root itself.
Hello Time / Max Age / Fwd DlyTimers advertised by the root, which every switch in the VLAN uses.
Root PortThe 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

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.

All 57 commands