The switch that won’t stop flashing

During break, a student stays behind in the computer lab to tidy up the tangled cables running to the switch under the teacher’s desk.

When the class comes back, nothing works: websites will not load, nobody can print and the computers are extremely slow. The lights on every port of the switch are flashing nonstop, even though nobody is using the network.

Restarting the switch only fixes the problem for a few seconds, and soon other classrooms start complaining that the network is very slow.

What has brought the network down?

How to solve the cases
Network switch with many cables connected and every port light on

Hints

Reveal them one at a time, only when you need them.

Solution

While the cables were being tidied, one was left connected at both ends to the same switch. This created a loop, and broadcast messages started going round endlessly and multiplying until they saturated the network: a broadcast storm.

What happened?

Devices on a local network constantly send broadcast messages addressed to every device. For example, ARP requests are used to find out which physical address belongs to an IP address. The switch forwards each broadcast out of all its ports except the one it was received on.

If two ports on the same switch are joined by a cable, each broadcast leaves through one of them, comes back in through the other and the switch forwards it again. Unlike IP packets, layer 2 frames have no time to live (TTL) that removes them after a certain number of hops, so they never disappear. This is what happened:

  1. The cable joined two ports on the lab switch and closed a circuit.
  2. The first broadcast sent by a computer also went out through those two ports, came back in through the other end of the cable and was forwarded by the switch again, over and over.
  3. Each new broadcast was added to those already circulating. Within seconds, the switch and the computers were busy receiving copies of the same messages and there was no capacity left for normal traffic.
  4. That is why the lights kept flashing, and restarting the switch did not help: as soon as it started up, the loop was still there.
  5. The copies also went out to the rest of the school network, which is why other classrooms noticed the network slowing down.

How could it be fixed and prevented?

To fix it, the cable joining two ports on the same switch had to be found and unplugged. As Cisco explains, once the loop is physically interrupted, the broadcast storm immediately begins to subside.

To stop it from happening again, several measures helped:

  • Enable the Spanning Tree Protocol (STP), or its rapid version, RSTP, on managed switches. STP detects paths that form loops and blocks the ports needed to prevent them.
  • Protect the ports where computers are connected with features such as BPDU Guard, which disables the port if it receives messages that only a switch should send.
  • Check whether the lab switches support STP or loop detection. The simplest models do not always include it.
  • Tidy and label the cabling so that both ends of every cable are identified.

Further reading

How a broadcast storm forms, how to detect it and how to stop it is explained in the guide Troubleshoot Layer-2 Loops on Catalyst 9000 Series Switches — Cisco.

How STP prevents layer 2 loops and broadcast storms is summarised in Spanning Tree Protocol (STP) Overview — Cisco Meraki Documentation.

Have a story worth investigating?

Suggest a case

A project by Eniun

How do you solve the cases?

Each case presents a mystery that seems to defy explanation.

A moderator who knows the solution reads the mystery to the group. The group works out what happened by asking questions, discussing hypotheses and using what they know.

You can project the case on a screen so everyone can read it and refer back to it during the discussion.

The moderator can guide the discussion without giving away the answer. If the group gets stuck, each case offers three graded hints under “Hints”, which can be revealed one at a time.

Once the moderator confirms that the group has found the answer, select “Show answer” to open the solution.

You can also solve the cases on your own: read the story, try to come up with an explanation and use the hints only when you need them.