loop-detect
Syntax
loop-detect { enhanced { interface (name | all) { loop-detect-action (interface-down | laser-off); revert-interval seconds; transmit-interval (10m | 1m | 10s | 1s); vlan-id (all | vlan-id); } } }
Hierarchy Level
[edit logical-systems name protocols], [edit protocols]
Description
Configure lightweight provider edge (PE) to customer edge (CE) loop detection on server-facing logical interfaces in a Layer 2 (L2) network. We also call this feature lightweight leaf to server loop detect, lightweight PE-CE loop detect, or enhanced loop detect.
This feature can detect the following types of Ethernet loops:
-
A loop between two interfaces in different Ethernet segments (ESs). This loop is typically caused by miswiring fabric components.
-
A loop between two interfaces with the same Ethernet segment identifier (ESI). This loop is typically caused by miswiring a third-party switch to the fabric.
You enable this feature on logical interface names; we don't support this feature on physical interfaces.
With EVPN-VXLAN, we recommend that you enable lightweight PE-CE loop detect initially before you configure EVPN, so you can detect any loops and take corrective actions before EVPN traffic is flowing through the network. Otherwise, if you bring up an EVPN fabric with loops, even with this feature enabled, traffic can continue to flow through the loops for some time while the network stabilizes.
See Supported Interface Configurations in EVPN-VXLAN Lightweight Leaf to Server Loop Detection for details on supported logical interfaces.After you’ve enabled lightweight PE-CE loop detect, the interfaces periodically send
multicast loop detect protocol data units (PDUs). If a lightweight PE-CE loop
detect-enabled interface receives a PDU, it detects a loop and triggers the
configured action to break the loop. For example, if you configured the
interface-down action, the device brings the interface down. After you have repaired
the loop condition and the revert-interval
timer expires, the
device reverts the loop detect action and brings the interface up again.
Use the following command to manually revert (clear) the status on one or all logical interfaces where the device detected a loop:
clear loop-detect enhanced interface
or:
clear loop-detect enhanced interface interface-name
If you don't specify an interface name, the clear loop-detect
enhanced
command reverts the interface status for all logical
interfaces where the device performed a loop detection action. You can use the clear
command in the following cases:
-
When you didn't configure a
revert-interval
value. In that case, the interface loop detect status doesn't clear until you clear it manually. -
If you configured a
revert-interval
, but you want to revert the status before the interval expires.
Use the following command to see loop detect status information for an interface:
show loop-detect enhanced interface interface-name
or for all interfaces with loop detect enabled:
show loop-detect enhanced interface
Starting
with Junos 24.4 we’ve added support for monitoring all VLANs on a logical interface
with the vlan-id all
configuration statement option. This
enhancement detects network loops across multiple VLANs and interfaces, improving
network stability and performance.
When you configure the vlan-id all
option on supported devices, the
devices show the following behavioral changes for this feature:
-
The
revert-interval
configuration is not effective for scaledloop-detect
sessions, which makes them non-revertive. You must issue theclear loop-detect enhanced interface
command to clear the loop condition. -
The receive statistics for loop-detect PDUs do not increment for scaled
loop-detect
sessions during a loop condition. -
We support only a 1-second transmit interval for scaled
loop-detect
sessions.
See Feature Explorer for the platforms that support lightweight PE-CE loop detect as follows:
-
Lightweight PE-CE Loop Detection on EVPN-VXLAN Fabrics—Support for lightweight PE-CE loop detect
-
Lightweight Loop Detection with Scale—Support for scaled lightweight PE-CE loop detect with the
vlan-id all
option
Options
interface (name | all) |
Specify the name of a server-facing L2 logical interface on which you
want to enable lightweight loop detect, or use the |
loop-detect-action |
If the feature detects a loop, you can configure either of the following actions:
|
revert-interval |
(Optional) Specify the interval, in seconds, in which the interface will
revert to its previous state after the loop condition is fixed. For
example, if the
|
transmit-interval |
(Optional) The interval in seconds or minutes at which the interface transmits loop detect PDUs.
|
vlan-id (all | vlan-id) |
(Required for trunk interfaces, enterprise style interface configurations
or service provider style configurations) Specify
|
Required Privilege Level
routing
Release Information
Statement introduced in Junos OS Release 20.4R1.
Statement support added to ACX-Series (ACX7100-32C, ACX7100-48L) devices in Junos OS Evolved Release 22.4R1.
vlan-id all
option introduced in Junos OS Release 24.4R1.