show spanning-tree vlan
Shows the spanning-tree instance for one VLAN: root bridge, local bridge ID and port roles and states.
Written by a working field network engineer · CCNA, Security+, CySA+
The same per-VLAN spanning-tree block as show spanning-tree, limited to the VLAN you name. With Rapid PVST+ every VLAN has its own tree, so the root and blocked ports for VLAN 10 can differ from VLAN 20.
Example output
SW2#show spanning-tree vlan 10
VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 24586
Address 0050.7966.6800
Cost 12
Port 65 (Port-channel1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32778 (priority 32768 sys-id-ext 10)
Address 0050.7966.6900
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Po1 Root FWD 12 128.65 P2pReference output: hand-written in standard Cisco IOS format for this example network, not captured from a device.
Useful variants
show spanning-tree vlan 10show spanning-tree vlan 10 briefshow spanning-tree vlan 10,20
What each column or field means
| Field | Meaning |
|---|---|
Cost | Total path cost from this switch to the root, through the root port. |
Port | The root port: this switch’s best path to the root bridge. |
priority 32768 sys-id-ext 10 | Default priority 32768 plus VLAN 10 gives 32778. This switch is not trying to be root. |
Role Root | Every non-root switch has exactly one root port per VLAN. |
When it doesn’t look right
“Spanning tree instance(s) for vlan 10 does not exist.”
No active port is in VLAN 10 on this switch, or the VLAN is not allowed on any trunk. Check show vlan brief and show interfaces trunk.
The root port is a slow link while a faster one is blocking.
Port costs or the root placement are wrong. Check that the link speeds are what you expect, and adjust spanning-tree cost on the port only if you mean to.
Related commands
Try it yourself
- STP Root Bridge Election (free)
- Root Bridge Primary and Secondary (free)
- Rapid PVST With Deliberate Root Placement (free)
Learn it in the CCNA path
- STP Roles & States (2. Network Access)
- 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.