Hands-on tutorial

Tutorials · Switching

How to Stop Network Loops and Broadcast Storms With Loop Detection and Storm Control

Protect access switches from the cable plugged into two wall sockets, the unmanaged switch under a desk and the flood that takes the whole network down.

Beginner8 min6 steps

Before you start

  • Managed access switches
  • A list of uplink ports and access ports
  • Spanning tree enabled on the network

Step by step

  1. Know the symptoms

    A loop causes a broadcast storm: all links light up, CPU on switches rises, and the whole network slows or stops within seconds.

  2. Keep spanning tree on

    Rapid spanning tree blocks loops between switches. Set the core as root and keep it enabled everywhere.

  3. Enable edge-port protection on access ports

    Mark access ports as edge ports and enable BPDU guard, so a port that receives spanning-tree packets from an unexpected switch shuts down.

    interface range gi1/0/1-44
     spanning-tree portfast
     spanning-tree bpduguard enable
    
  4. Enable loop detection

    Loop detection catches loops that spanning tree cannot see, such as through an unmanaged switch that drops BPDUs. The port is blocked or shut when its own test frame comes back.

    loopback-detection enable
    interface range gi1/0/1-44
     loopback-detection enable
    
  5. Add storm control

    Limit broadcast and multicast on access ports, for example to 1–5% of the port speed, so one device cannot flood the network.

    interface range gi1/0/1-44
     storm-control broadcast level 2
     storm-control multicast level 5
    
  6. Set automatic recovery

    Let shut ports recover automatically after a few minutes, or keep them down until IT checks, depending on your policy. Alert on every event.

Commands are generic, industry-standard examples. Exact syntax and menu names vary by model and firmware; check your device's manual on the Documentation page.

Pro tips

  • Never enable BPDU guard on uplinks.
  • Check camera multicast before setting tight multicast limits.
  • Teach staff not to connect two wall sockets with one cable.