MAC flapping / broadcast storm (spanning tree loop) Networking Origin: Network OSI layer 2 · Data Link Last updated 5 Nov 2026

Networking: %SW_MATM-4-MACFLAP_NOTIF: Host is flapping between ports / broadcast storm

A layer-2 loop is making frames circle the network, saturating links and making the whole VLAN crawl.

Exact message you may see Host is flapping between portbroadcast stormSpanning tree loop detected
Seen on: Cisco Networking

Meaning

Someone plugged a switch or cable back into the same network, or spanning tree is off or misconfigured. Find the flapping MAC, unplug the loop, and enable STP protections: BPDU guard on edge ports, root guard, storm control and loop guard.

Common causes

  • Cable plugged into two ports of the same network
  • Spanning tree disabled or inconsistent
  • Unmanaged switch added by a user
  • Missing BPDU guard on access ports
  • Faulty switch or NIC flooding

⚡ Quick fix

  1. Find it: show mac address-table | include <mac>
  2. Unplug the offending cable and enable BPDU guard + storm control
  3. Verify the root bridge with show spanning-tree

Detailed fix by platform

Cisco

  1. text
    show spanning-tree summary
    show interfaces | include broadcasts
    show logging | include MACFLAP

How to diagnose

  1. Log — MAC flapping?
  2. STP — Enabled, correct root?
  3. Edge ports — BPDU guard?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

arp -a shows (incomplete) — Networking: `arp -n` shows (incomplete) / Destination Host Unreachable — no ARP reply from the next hop (Networking)arp -a shows (incompl…Cannot assign requested address (EADDRNOTAVAIL) — Networking: connect: Cannot assign requested address — ephemeral port range exhausted by TIME_WAIT connections (Networking)Cannot assign request…Duplex mismatch: late collisions / CRC errors — Networking: Duplex mismatch — late collisions, runts and CRC errors on the switch port (Networking)Duplex mismatch: late…Many sockets in CLOSE_WAIT — Networking: Thousands of sockets in CLOSE_WAIT — the application is not closing its side of the connection (Networking)Many sockets in CLOSE…Native VLAN mismatch / wrong VLAN, no connectivity — Networking: %CDP-4-NATIVE_VLAN_MISMATCH / device on the wrong VLAN can't reach the gateway (Networking)Native VLAN mismatch …Port err-disabled (psecure-violation) — Networking: %PM-4-ERR_DISABLE: psecure-violation error detected on Gi0/5, putting Gi0/5 in err-disable state (Networking)Port err-disabled (ps…Port forwarding not working (CGNAT / double NAT) — Networking: Port forwarding configured but the port stays closed — carrier-grade NAT (CGNAT) or double NAT (Networking)Port forwarding not w…MAC flapp…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.