BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Spanning Tree (STP)

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   P2p

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
CostTotal path cost from this switch to the root, through the root port.
PortThe root port: this switch’s best path to the root bridge.
priority 32768 sys-id-ext 10Default priority 32768 plus VLAN 10 gives 32778. This switch is not trying to be root.
Role RootEvery 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

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