loop detection

term

networking

Kept in this browser · My desk

A switch feature that finds layer 2 loops spanning tree cannot see by sending a probe frame out of a port and acting if the frame comes back.

Spanning tree only sees loops made of switches that speak it. An unmanaged switch that drops BPDUs, a hub, or a port whose 802.1X authentication ignores BPDUs from other addresses can hide a loop; Aruba gives those cases as the reason to use its probe-based loop protection. H3C (loopback-detection), Huawei (loopback-detect), Extreme (ELRP, the Extreme Loop Recovery Protocol) and Aruba (loop-protect) all send a frame and treat its return as proof. Defaults differ: Huawei shuts the port, H3C only logs, Aruba disables the sending port.

What it is. Loop detection (sold as loopback detection, loop protection, loop guard or ELRP, the Extreme Loop Recovery Protocol) is a switch feature that finds layer 2 loops by sending a probe frame out of a port and treating the frame's return as proof of a loop, then acting on the port. It complements spanning tree rather than replacing it: spanning tree only sees loops made of switches that speak it, while a probe finds a loop through anything that forwards frames.

Why spanning tree is not enough. An unmanaged switch that drops BPDUs (bridge protocol data units), a hub, or a port whose 802.1X authentication ignores BPDUs from other addresses can hide a loop; Aruba gives those cases as the reason to use its probe-based loop protection. A cable looped back through such a device sends no BPDU at all, so BPDU guard stays silent while the segment fills with copies.

How the probes work. H3C sends detection frames to the multicast address 010f-e200-0007 with EtherType 0x8918 and TLVs (type-length-value fields) carrying the sender's bridge MAC (media access control) address and port; it is disabled by default, runs every 30 seconds, and on a loop logs or, if configured, blocks, stops learning or shuts the port, recovering after three intervals without a returned frame; H3C warns that discarded detection frames can cause a wrong recovery. Huawei's loopback-detect is off on all interfaces by default, sends broadcast detection packets every 5 seconds (1 to 300), shuts the interface by default and can block, stop learning, trap or leave the VLAN (virtual local area network); it costs CPU (central processing unit), so Huawei advises turning it off where not needed. Extreme's standalone ELRP sends packets on chosen VLAN ports and can log, trap or disable the port. Aruba's AOS-CX loop-protect runs on ports, LAGs (link aggregation groups), VLANs and VXLANs (Virtual eXtensible LANs) every 5 seconds (5 to 10), disables the transmitting port by default (tx-disable) and states that N loops need protection on at least N-1 ports.

Fortinet adds a second test. FortiSwitchOS calls its feature loop guard and states that it is different from STP (Spanning Tree Protocol) loop protection and designed to work with STP rather than replace it: each port with loop guard periodically broadcasts loop guard data packets (LGDP), and if one comes back to the sending port a loop exists downstream. It can also count MAC address moves per second and declare a physical loop only when the rate stays above a threshold (0 to 100, 0 meaning the traditional packet test only) for 6 consecutive seconds. Loop guard is disabled by default; a port that detects a loop is taken out of service for loop-guard-timeout, 45 minutes by default (0 to 120, 0 meaning a manual reset with execute loop-guard reset), and the log reads that a loop was detected and the port is being shut down.

A worked case. A desk switch with no spanning tree is cabled twice to access switch S, on ports 7 and 8, both in VLAN 20. With probe-based detection on port 7, S sends a probe from port 7; the desk switch floods it back out of its other cable, and it arrives on port 8 carrying port 7's identity. S now knows that ports 7 and 8 are joined outside it and acts on one of them, by default disabling the sending port on Aruba (tx-disable), a shutdown on Huawei, only a log entry on H3C. Without the feature, the first broadcast from any host on the desk switch would circulate through S's two ports indefinitely, since the desk switch never sends a BPDU for BPDU guard to catch.

Defaults and costs. The defaults differ: Huawei shuts the port, H3C only logs, Aruba disables the sending port, Fortinet takes the port out of service for 45 minutes. Each probe is a frame the CPU must generate and inspect on return, so the features are rate-limited (every 5 to 30 seconds) and enabled per port, usually on access ports facing places where unmanaged equipment can appear. The detection is also only as good as the probe's path: a device that drops the vendor's probe frame, or a filter on the multicast address, hides the loop again, which is the failure H3C warns about.

Not to be confused with loop guard. Juniper also calls loop guard loop protection: that is a spanning tree feature for a blocked port that stops hearing BPDUs, which keeps the port from moving to forwarding on silence alone; Fortinet's own STP setting of that name (stp-loop-protection) is off by default and recommended on all nondesignated ports. Loop detection sends traffic of its own; loop guard only listens. Neighbours: bridging loop, loop guard, spanning tree, storm control, MAC flapping and broadcast storm.

Also known as: loopback detection, loopback-detect, loopback-detection, loop-protect, elrp, extreme loop recovery protocol, lbdt, detecção de loop

Sources

← Back to L Back to the glossary