Configuring loop detection for VLAN

This section presents a variety of examples that configure Layer 2 loop detection for VLAN.

Example

The following example enables loop detection on a VLAN and enters Protocol Loop Detection configuration mode.

device# configure terminal
device(config)# vlan 5
device(config-vlan-5)# loop-detection
device(config-loop-detect)#

Example

The following example enables ports associated with VLAN 8 and clears LD statistics for that VLAN.

device# clear loop-detection vlan 8

Example

The following example displays LD configuration values, including logical interfaces (LIFs), for a VLAN tunnel.

device# show loop-detection vlan 20
Number of LD instances: 1
LIF (Logical Interface) Disabled on Ports: eth2/2

Packet Statistics:
vlan            sent            rcvd
20              119             1

Example

The following example displays LD configuration values for a VLAN tunnel if LD shutdown is disabled.

device# show loop-detection vlan 20
Number of LD instances: 1
LIF (Logical Interface) ShutDown is disabled for VLAN 20

Packet Statistics:
vlan            sent            rcvd
20              10              10

Example

The following example disables the shutdown of a VLAN VLAN tunnel.

device# configure terminal
device(config)# vlan 20
device(config-vlan-20)# loop-detection-shutdown-disable

Example

You can control the auto-enable behavior of an LD-disabled logical interface (LIF), by using the shutdown-time command in Protocol Loopback Detection configuration mode. The following example specifies a shutdown time of 1 minute.

device# configure terminal
device(config)# loop-detection
device(config-loop-detect)# shutdown-time 1
2017/10/20-16:04:48, [ELD-1005], 3749, M2 | Active | DCE, INFO, SLX, Loop is detected on Ethernet 2/2 VLAN 20, the LIF (logical interface) is shutdown.
2017/10/20-16:05:46, [ELD-1007], 3750, M2 | Active | DCE, INFO, SLX, Loop detection disabled LIF (Logical interface) on Ethernet 2/2 VLAN 20 is auto-enabled.

By default the shutdown time is 0, which means that an LD-disabled LIF is never auto-enabled. If the shutdown time is configured with a nonzero value, the LD-disabled LIF is auto-enabled following the specified shutdown time.

Example

To enable LD-disabled ports and clear LD statistics on all interfaces, use the clear loop-detection command as in the following example.

device# clear loop-detection