Pcornel
Networking · Network & Protocols

Spanning Tree Protocol Reference

Cheat sheet · https://pcornel.dk/topic.php?topic=6241

Back to the Topic

Answer

Spanning tree keeps a switched network free of loops: the switches elect one root bridge, and every redundant path towards it is blocked until needed.

Remember

Set the root on purpose with a low priority; otherwise the oldest switch may win. Every switch has one root port; every segment one designated port; the rest block. PortFast and BPDU guard belong on access ports only. Constant topology changes flush MAC tables.

First checks

  • show spanning-tree vlan <id> — root bridge, this switch's priority, role and state of each port.
  • show spanning-tree root — root and root port per VLAN.
  • show spanning-tree summary — mode and enabled features.
  • show spanning-tree detail | include changes|from — topology change count and source.
  • show spanning-tree inconsistentports — ports blocked by root guard or loop guard.

Commands

show spanning-tree blockedports
Lists the ports Spanning Tree has put in a blocking state, per VLAN or instance.

Verify in this order

intended root has the lowest priority → BPDUs received on every uplink → one root port per switch → one designated port per segment → remaining ports blocking → topology changes rare

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6241

Confirmation

Confirm action

Continue?