BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Spanning Tree (STP)

show spanning-tree summary

Shows the STP mode, which protections are enabled globally, and a count of ports in each state per VLAN.

Written by a working field network engineer · CCNA, Security+, CySA+

A one-screen health check of spanning tree on the switch: which mode is running, which global protections are on, and a count of ports blocking, listening, learning and forwarding in each VLAN.

Example output

SW1#show spanning-tree summary
Switch is in rapid-pvst mode
Root bridge for: VLAN0010, VLAN0020, VLAN0099
Extended system ID                      is enabled
Portfast Default                        is disabled
PortFast BPDU Guard Default             is disabled
Portfast BPDU Filter Default            is disabled
Loopguard Default                       is disabled
EtherChannel misconfig guard            is enabled
UplinkFast                              is disabled
BackboneFast                            is disabled
Configured Pathcost method used is short

Name                   Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ----------
VLAN0010                     0         0        0          4          4
VLAN0020                     0         0        0          1          1
VLAN0099                     0         0        0          1          1
---------------------- -------- --------- -------- ---------- ----------
3 vlans                      0         0        0          6          6

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
Switch is in … modepvst, rapid-pvst or mst.
Root bridge forThe VLANs this switch is root for.
Portfast / BPDU Guard DefaultWhether PortFast and BPDU Guard are enabled globally for all access ports.
Configured Pathcost methodshort (16-bit costs, 19 for 100 Mbps) or long (32-bit costs, needed above 10 Gbps).
Blocking … ForwardingPorts per VLAN in each state. A redundant topology should show some Blocking ports on non-root switches.

When it doesn’t look right

A switch you expected to be root is not listed in Root bridge for.

Its priority is not the lowest. Set spanning-tree vlan <list> root primary on it, then check every other switch shows a higher priority.

Mode differs between switches.

Rapid PVST+ and PVST+ interoperate but fall back to slower 802.1D timers on the boundary. Run the same mode everywhere: spanning-tree mode rapid-pvst.

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