Sub topic 1
Why redundant switch links create loops
Prerequisites
This chapter assumes you already know the following:
- How a switch learns source MAC addresses and forwards frames using its MAC address table.
- The difference between unicast, broadcast and unknown-unicast flooding.
- Basic VLAN and trunk concepts.
- How to read output from a switch command-line interface.
Why you want redundant links
A single link between two switches is a single point of failure. If the cable or port fails, everything behind it loses connectivity. So designers connect switches in triangles or full meshes, which gives every switch at least two paths to the rest of the network.
At Layer 3 this is safe. An IP packet carries a Time to Live (TTL) field, and each router decrements it. A looping packet is eventually discarded. An Ethernet frame has no such field. A switch never changes a frame to say how many times it has been forwarded.
How a loop forms
Switches flood broadcast frames and unknown-unicast frames out of every port except the one they arrived on. Take three switches, SW1, SW2 and SW3, each linked to the other two.
- A host on SW1 sends an ARP broadcast.
- SW1 floods it to SW2 and SW3.
- SW2 floods the copy it received to SW3, and SW3 floods its copy to SW2.
- SW2 and SW3 each receive the other's copy, and flood those back toward SW1 and onward.
Nothing removes the frames. They circle the triangle in both directions, and each trip around creates more copies.
What goes wrong
A loop causes three separate problems.
| Problem | Cause | Symptom |
|---|---|---|
| Broadcast storm | Looping frames multiply and fill the links | Links reach 100% utilization and useful traffic is dropped |
| MAC table instability | The same source MAC arrives on different ports as copies circle | Entries keep moving between ports, and unicast frames go to the wrong place |
| High CPU load | Switches and hosts must process every copy | Switch management becomes slow, and hosts see duplicate frames |
A storm can take a network down within seconds. It continues until someone breaks the loop, usually by unplugging a cable.
The design goal
Redundancy is still wanted, so removing links is the wrong fix. The goal is to keep the physical redundancy and have the switches logically disable some links while the others work. If an active link fails, a disabled one is brought back. Spanning Tree Protocol (STP, IEEE 802.1D) does this. It builds a loop-free logical tree over the physical topology by putting some ports into a blocking state.
The next chapters explain how switches share topology information, how they choose which ports to block, and how they recover from failures.
Exercise
A broadcast frame enters a triangle of three switches with no loop prevention. Why does it never expire, and what happens to the MAC address table in the meantime?
Show answer
An Ethernet frame has no TTL or hop count, so no switch ever discards it for age. Each switch floods it out of all other ports, so copies circulate in both directions and multiply. Because copies of the same source MAC arrive on different ports, each switch keeps relearning that address on a different port, so the table is unstable and unicast forwarding becomes unreliable.