Loops and bonded links
Broadcast storm
A broadcast copied round a loop of switches for ever, because Ethernet frames have no hop limit.
The problem
Three switches cabled in a triangle give every frame two ways round, and a broadcast never stops going round.
- coreSwitch, floorA and floorB are cabled in a triangle, with spanning tree off. Alice is on floorA, bob on floorB.
- Alice sends one ARP broadcast for the printer,
10.0.1.12. floorA floods it to both other switches. - Each switch floods every copy it gets out of its other ports, so one copy goes round each way, for ever.
- An Ethernet frame has no hop limit to run out, so nothing removes the copies: each lap adds more work.
- Alice's frames now reach floorB from both sides, so floorB keeps moving her MAC between two ports (MAC flapping).
What you'd see
$ timeout 3 tcpdump -nn -i eth0 -w /dev/null arp
1029095 packets captured
1029805 packets received by filter
0 packets dropped by kernel
- Run on bob for 3 seconds, after alice sent one single ARP request.
1029095 packets captured: over a million copies of that one frame reached bob's card.- With spanning tree on, the same test captures
1 packet.
Guess first
During the storm, floorB's table is read six times in a row. Which port is alice's MAC behind?
Show answer
It keeps changing: dev coreSwitch, then dev floorA, then dev coreSwitch again. Her frames arrive from both sides of the loop, so the switch relearns her on each.
In short
Each switch floods every copy it receives, so a single broadcast in a loop never dies, and every new broadcast adds to it until the links and the switches' CPUs are full. Frames from one device arrive from two directions, so switches keep moving its MAC address between ports (MAC flapping) and send unicast traffic the wrong way. Storm control caps the broadcasts per port and second, which limits the damage; only spanning tree, blocking a port, removes the loop.
Read next
- Spanning tree The protocol that lets switches be cabled in loops by electing a root and blocking the ports that close a loop.
- Broadcast domain The set of devices a broadcast reaches: one network at the link layer.
- MAC address table A switch's record of which port each MAC address was last seen on, learned from source addresses.
- Edge port A spanning-tree port that faces a single host, so it forwards the instant the link is up — plus the guards that protect it.