What are the types of "Layer 2 loops" that have caused numerous network crashes? How can we troubleshoot and resolve them?

2025.04.07
Today, I will share the basic knowledge of Layer 2 loops.

Loop concept
In the field of network technology, "Layer 2 loop" refers to the loop structure that appears in the second layer (data link layer) of the network. Layer 2 loops may cause problems such as broadcast storms, multi-frame duplication, and MAC address table instability, thereby affecting the performance and stability of the network.

Loop type
First, we need to understand that there are three main types of typical physical loop topologies:


Type 1: The broadcast packets of the interconnected loops of multiple switches will be wirelessly looped and forwarded between the loop interfaces of multiple switches, causing serious impact on device performance and network.
Type 2: The broadcast packets of the downlink loop of the switch are connected to the switch self-loop and flooded in large quantities and impact the uplink core equipment, causing the entire network to paralyze.
Type 3: The complex loop equipment topology has both downlink self-loops and interconnected loops between switches.
Troubleshooting methods
Generally speaking, there are two solutions for troubleshooting loops:

Primary method: Physically unplug the cable. See which interface is unplugged to restore normal operation. However, this troubleshooting method is generally very painful and only applies to one ring. It is impossible to accurately judge the situation with multiple rings.
• General method: Check the packet receiving rate of the port to find the loop. Ports with a crazy increase in broadcast & multicast packets will have loops. For switches, we only need to look at the ingress direction (RX).
If there is only one port with a sudden increase in broadcast & multicast in the RX direction, it means that the downstream link of the port is in a loop (such as type 2 in Figure 1); if there are multiple ports with a sudden increase in broadcast & multicast in the RX direction, it means that these ports are in a loop. If there are n abnormal ports, there are ≥n/2 loops (such as type 1 and type 3 in Figure 1).
Remember one thing: In the case of multiple loops, physical unplugging is useless, and you have to check the packet receiving statistics in the port RX direction to confirm (the basic idea of ​​loop breaking protocol STP and loop protection).
Layer 2 loop solution
The existence of layer 2 loops will have a serious impact on the performance and stability of the network. Therefore, during the network design and deployment process, effective measures must be taken to prevent and control the occurrence of layer 2 loops. Common measures include:
• Use of spanning tree protocol (STP)
• Loop detection and isolation technology
• Reasonable network topology design
These measures can ensure the normal operation of the network and improve the reliability and performance of the network.