Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

loop-detect

Syntax

Hierarchy Level

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.

Note:

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:

or:

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:

or for all interfaces with loop detect enabled:

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 scaled loop-detect sessions, which makes them non-revertive. You must issue the clear 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:

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 all keyword to enable this feature on all such logical interfaces.

loop-detect-action

If the feature detects a loop, you can configure either of the following actions:

  • 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.

      Note:

      Platforms that support the laser-off port capability support this action.

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 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

    Note:

    If you retain this default setting (0) and a loop detect 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 enter the clear command, the interface remains down.

  • Range: 0 through 300 seconds

transmit-interval

(Optional) The interval in seconds or minutes at which the interface transmits loop detect PDUs.

  • Default: 1 second (1s)

  • Values:

    • 10 minutes (10m)

    • 1 minute (1m)

    • 10 seconds (10s)

    • 1 second (1s)

vlan-id (all | vlan-id)

(Required for trunk interfaces, enterprise style interface configurations or service provider style configurations) Specify all or the VLAN identifier for the interface.

  • all—All VLANs

  • vlan-id—VLAN id

    • Range: 1 through 4094

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.