Troubleshoot STP Issues on Cisco Catalyst Switches - 夜莺博客

Troubleshoot STP Issues on Cisco Catalyst Switches

Spanning Tree Protocol failures manifest in three ways: forwarding loops that saturate links, excessive flooding driven by topology changes, and slow convergence. All three can be traced back to the same root causes — BPDU loss, duplex mismatches, or unidirectional links — but finding the exact spot takes a methodical approach. This article distills Cisco's official troubleshooting guide for Catalyst switches into an actionable sequence: identify the loop, discover its scope, break it, and harden the network so it never happens again.

Recognizing the Failure Modes

A forwarding loop congests the lowest-bandwidth links on the path and eventually takes down the whole L2 domain. Excessive flooding is subtler: slow links clog up with flooded traffic and users behind them see slowness or total loss of connectivity. Both usually come from one bridge failing to receive or process BPDUs — which means it no longer knows the correct topology and stops blocking the redundant port.

Identify the Loop

Look for ports with abnormally high utilization. The show interface command displays packets-per-second utilization; on Supervisor 2+ Catalyst 6500s, show interfaces | include L2|line|broadcast pinpoints the VLAN with the highest switched-packet count — usually the VLAN where the loop lives.

Break the Loop, Then Find the Cause

  1. Shut down or disconnect the ports involved — restore connectivity first, investigate second.
  2. Verify the STP root is consistent — all switches must agree on the root bridge. show spanning-tree vlan <vlan-id> reveals the root bridge ID; differing roots in the same VLAN are a clear red flag.
  3. Check BPDU reception — on root and blocked ports, confirm BPDUs arrive periodically with show spanning-tree interface <int> detail. If receive counters do not climb, check show interface <int> counters for multicast reception and errors.
  4. Check for duplex mismatch — a half-duplex bridge that cannot transmit BPDUs will unblock a port and create a loop.

Harden the Network Against Loops

  • UDLD and Loop Guard eliminate most loop causes by shutting down defective links instead of forwarding on them.
  • PortFast on end-station ports — always paired with BPDU Guard so a rogue switch cannot inject BPDUs.
  • Root Guard prevents ports from becoming root ports.
  • Keep user traffic off the management VLAN — broadcast storms on the management VLAN can overload the CPU and distort STP operation.
  • Hardcode the STP root and backup root — never leave priority at defaults; predictable placement makes convergence deterministic.

For the complete command reference used in this workflow, see 思科交换机排障命令手册, and compare the MAC-level symptoms in Cisco IOS XR Input Drops 排障.

原文链接:https://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/28943-170.html