Switching loop

from Wikipedia, the free encyclopedia

A switching loop or bridging loop is a dangerous situation in switched computer networks (or in connection with several bridges ), which in most situations leads to a complete standstill of the network due to overload. In a switching loop , two network sockets of one and the same switch are directly connected to one another or there are two or more active connections between two switches. A switching loop leads to a total overload of the network in several ways due to the constant duplication of packets.

How it works and problems that arise

A switching loop creates errors in the network in two different ways, within a few tenths of a second to seconds:

Broadcast Packets ⇒ Broadcast Storm

If two connections B and C of a switch are connected to one another with a patch cable and a Layer II broadcast packet (which is not infrequently sent, especially in the course of address resolution using the Address Resolution Protocol ) from device A arrives at any connection, the following happens: The packet must be forwarded to all devices, i.e. sent to all connections except the respective input port; Now the packet (with the destination address FF:FF:FF:FF:FF:FF, i.e. it is addressed to all devices) is also sent on the two interconnected connections, but both come back directly to the switch through the loop. There are now two copies of this package with a broadcast address that have to be sent on all (each other) connections. All broadcast packets are effectively saved in duplicate, circle endlessly and accumulate quickly. As soon as more packets circulate than the loop can "temporarily store", the internal buffers of the switch begin to fill up until further packets arriving from outside have to be discarded. Meaningful traffic then only makes up a small fraction of the packets in circulation, and the probability of successful delivery drops rapidly. The connected network is usually flooded with the broadcast packets within seconds. This situation is called a broadcast storm .

The same occurs if you connect two switches with two or more cables without logically bundling them or using a Spanning Tree Protocol . The same applies if a loop is formed across several switches.

Wrong address table entries ⇒ packet loss

A switch maintains a table of the network devices and the associated connections in order to only allow each device to receive the packets intended for it.

The duplicated broadcast packets from the previous section all carry the sender address of A. This will mean that the switch will alternately assign the physical address ( MAC address ) to the two connected connections at high frequency (since both packets have the sender address A received, the switch assumes that A is currently connected there). This means that all packets that are actually addressed to A may be randomly sent to ports B and C and are effectively lost for A.

Bridges

This situation can also occur in situations with several bridges , since a switch can logically be viewed as a bus with one bridge for each port. The rule here is that if there are several paths to a target, a loop is triggered . This can be explained by the fact that bridges forward broadcast packets transparently and in the worst case see a hardware address on both sides and thus reproduce them.

Avoidance

More powerful switches support loop detection at LLDP level or prevent loops via Spanning Tree Protocol or Shortest Path Bridging . Otherwise, a switching loop can only be avoided if the network administrator is always extremely careful not to create a loop.

Errors

It is wrong that the packets only circle until the end of their TTL . There is no TTL on OSI Layer II (Ethernet). The TTL introduced on layer III (network) does not work because a switch, unlike a router, does not take into account any content on layer III.

literature

  • Rüdiger Schreiner: "Computer Networks - From the Basics to Application", Carl Hanser Verlag Munich, 2009. P. 57ff