Free tech learning for everyone, from basics to pro

Routing & SwitchingNetworking SecurityAdvanced

Troubleshooting spanning tree, its limitations and the alternatives (including FlexLinks)

In short: Spanning tree faults show up as storms, high CPU, flapping MAC addresses or traffic taking odd paths. Break any loop first, then compare each switch's view of the root, port roles and states with what you designed. Spanning tree also has built-in limits: blocked links, a single active path and failure modes that create loops. Modern designs reduce or avoid it.

Symptoms of a spanning tree problem

  • A loop: link lights flashing constantly, interfaces at 100 percent with broadcasts and multicasts, switch CPU very high, log messages about MAC addresses flapping between ports, and the whole VLAN slow or unreachable.
  • A bad root: everything works, but traffic crosses an access switch or a slow link because the wrong switch is root.
  • Frequent topology changes: short slowdowns and extra flooding, often caused by host ports without PortFast or a flapping link.
  • Ports in inconsistent states: some VLANs work and others do not on a link, caused by a guard feature or a native VLAN mismatch.

A step-by-step method

Troubleshooting a Layer 2 loopSpot symptomshigh CPU, MACflappingBreak the loopshut a redundant linkFind the rootshow spanning-treerootTrace the treeroles and states perVLANFix the causeguard, cable, config
Figure 1. Restore service first by breaking the loop, then trace the tree switch by switch to find out why it formed.
  1. Stop the damage. In a live storm, shut one of the redundant links or disconnect the suspect device. You may need the console because management access will be slow.
  2. Find the root. show spanning-tree root on several switches; they should all name the same bridge ID for each VLAN, and it should be the switch you intended.
  3. Trace the tree. show spanning-tree vlan 10 on each switch, following root ports towards the root. Compare roles, states and costs with your design drawing.
  4. Look for flapping and changes. show spanning-tree detail | include ieee|occurr|from|is exec shows topology change counts and the port the last change came from. Logs show MAC flapping and err-disabled ports.
  5. Check the guards. show spanning-tree inconsistentports lists ports blocked by Root Guard, Loop Guard or type inconsistencies, and show interfaces status err-disabled lists BPDU Guard and UDLD shutdowns.
  6. Fix the cause, such as a unidirectional fibre, a duplex mismatch causing lost BPDUs, BPDU Filter on the wrong port, or an unmanaged switch looping two ports.

Avoid debug spanning-tree on a busy production switch except for short, targeted checks.

The built-in limitations of spanning tree

  • Wasted links: redundant links are blocked, so you pay for bandwidth you cannot use (PVST+ and MST help only by sharing per VLAN).
  • Convergence: classic STP takes 30 to 50 seconds; RSTP is much faster but still not instant in every case.
  • Fail-open behaviour: when BPDUs are lost, ports tend to start forwarding. A software fault, overloaded CPU or one-way link can therefore create a loop.
  • No TTL in Ethernet: unlike IP packets, looping frames never expire, so a loop can take down a whole Layer 2 domain within seconds.
  • Scale: large Layer 2 domains with many VLANs mean many instances and wide failure areas.

Alternatives and FlexLinks

Most modern designs keep spanning tree running as a safety net but avoid relying on it:

  • EtherChannel and multichassis EtherChannel, with stacks, StackWise Virtual or vPC, so redundant links are bundled rather than blocked (see switch virtualisation).
  • Routed access: routing (OSPF or EIGRP) between access and distribution switches, keeping each VLAN within one access switch, so there are no Layer 2 loops to block.
  • Fabrics such as EVPN-VXLAN in data centres and campus fabrics, which carry Layer 2 over a routed underlay.

FlexLinks was a Cisco feature for access switches with two uplinks. One interface was configured as the backup of another; spanning tree was disabled on the pair and the backup took over in a fraction of a second if the primary failed.

! legacy example
interface GigabitEthernet0/1
 switchport backup interface GigabitEthernet0/2

FlexLinks is legacy and is not supported on many current switch families. Because it turns spanning tree off on the uplinks, a cabling mistake could cause a loop. Use EtherChannel to a virtual switch pair or RSTP instead.

Real-world example: at a busy veterinary practice, all phones and PCs froze after a cleaner reconnected a loose cable. The external engineer found MAC flapping messages on the main switch, disconnected a small unmanaged switch under the reception desk, and service returned. Both ends of a patch lead had been plugged into the unmanaged switch, forming a loop that the main switch could not see because its port had BPDU Filter configured on the interface. Replacing BPDU Filter with BPDU Guard means the same mistake now shuts only that port.

Practice

What should be your first action during a live broadcast storm?
Break the loop, for example by shutting a redundant link or disconnecting the suspected device, then investigate.
Which command shows ports blocked by Root Guard or Loop Guard?
show spanning-tree inconsistentports.
Why is a Layer 2 loop more damaging than a routing loop?
Ethernet frames have no TTL, so looping frames never expire and multiply until links and CPUs are overwhelmed.

Key takeaways

  • Loops show up as storms, high CPU and MAC flapping; wrong roots as odd traffic paths.
  • Break the loop first, then trace root, roles and states switch by switch.
  • Check topology change counters, inconsistent ports and err-disabled ports.
  • Spanning tree blocks links, fails open and has no TTL to stop looping frames.
  • Prefer EtherChannel to virtual pairs, routed access or fabrics; FlexLinks is legacy.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.