Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


loop-detect (EVPN)


Hierarchy Level


Configure loop detection on the server-facing Layer 2 interfaces of the leaf devices in an EVPN-VXLAN fabric. 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.

After you’ve enabled loop detection, the interfaces periodically send multicast loop-detection protocol data units (PDUs). If a loop detection-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-detection action and brings the interface up again.

If needed, you can revert the status on one or all interfaces where a loop was detected, either before the revert-interval timer expires or if you didn't configure revert-interval. To do so, use the following command:

If you don't specify an interface name, the clear command reverts the interface status for any interfaces where the device performed a loop detection action.

Use the following command to see loop detection status information for an interface or all interfaces with loop detection enabled:


interface name

Specify the name of the server-facing Layer 2 interface on which you are enabling loop detection.


If a loop is detected, you can configure the following action:

  • Values:

    • interface-down—The device brings down the interface on which the loop was detected.

    • laser-off—The device turns off the optics transmit laser.


      We do not support the laser-off action on EX4300-48MP, QFX51XX and QFX52XX switches.


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 loop-detect-action is interface-down, after the loop condition is repaired and the interval expires, the device brings the interface up again.

  • Default: 0


    If you retain this default setting (0) and a loop detection event triggers the interface-down action, you must enter the clear loop-detect enhanced interface <interface-name> command to bring the interface back up. Until you issue this command, the interface will remain down.

  • Range: 0 through 300 seconds


The interval in seconds or minutes at which the interface transmits loop detection PDUs.

  • Default: 1 second

  • Values:

    • 10 minutes

    • 10 seconds

    • 1 minute

    • 1 second

vlan-id vlan-id

(Required for trunk interfaces or interfaces with enterprise style configuration) Specify the VLAN identifier for the interface.

  • Range: 1 through 4094

Required Privilege Level


Release Information

Statement introduced in Junos OS Release 20.4R1.