If there are multiple layer 2 path occurs between two endpoints in the computer network, a switching Loop may occur. This can be also be referred by using the term, bridge loop.
Example:
- Two ports are connected to each other on the same switch.
- Two networks having multiple connections.
This loop may lead to the generation of broadcast storms. This is by forwarding the multicasts and broadcasts by the switch from every port. And flooding the network may eventually occur by broadcasting and rebroadcasting repeatedly by the switches. One important thing is that when a frame came into loop topology, it can loop forever. The reason behind this is, time to live value is not supported by the Layer 2 header.
A switched network should not contain any loops, because, if a physical topology has loops or any bridge loops, it may lead to redundancy. The best way to avoid this problem is by allowing physical loops, but we have to care about creating a logical topology that is loop-free. This can be done by using protocols such as:
- shortest path bridging (SPB) protocol
- older spanning tree protocols(STP).
In the case of a Local Area Network’s practical work, redundancy is achieved by interconnecting all the switches. The advantage of this interconnection is that, if any of the connected links fails, the network will not fail.
Our topic, layer 2 switching loop, is one of the major problems that arises when all switches are interconnected for redundancy purposes.
There are three classifications of layer 2 traffic:
- Unicast (referred as one to one).
- Multicast (referred as one to many).
- Broadcast (referred as one to all).
All the above three are different kinds of network communication. The normal operation of the network is achieved by using them. There is a MAC address for them.
MAC address of multicast destination: 01:00:5E:00:00:00 to 01:00:5E:7F:FF:FF
MAC address of broadcast destination: FF:FF:FF:FF:FF:FFF
The Ethernet frame has to be forwarded out of its ports in the case of a multicast or broadcast switch.
The layer 2 switching loop can be described by using the diagram given below:
If an Ethernet frame starts from the workstation to reach to the File Server, it first arrived at the switch 4(SW4).
The next step is to forward this packet to all other switches other than the source. This is done because the MAC address of the destination device is not present in the MAC address table.
The switch 1(SW1) and switch 2(SW2) receives the packet and the again search for the matching of MAC address in their corresponding MAC address table.
Also Read:
- Per-VLAN Spanning Tree (PVST), Per-VLAN Spanning Tree Plus (PVST+)
- What Is The Maximum Supported Throughput Of A Cat6 Cable?
- What is the Aim of an ARP Spoofing Attack?
If it cannot find the MAC address in the MAC address table, the above process will repeat.
That is the packet will be forwarded to the other switches excepts the source. Here, in this case, the packet may reach again in the switch 4(SW4) through switch 3 to switch1 to switch 4 or through switch1 to switch 3 to switch 4. And this process leads to the circulation of the network in a looping. This process is the switching loop.