< Home

loopback-detect action

Function

The loopback-detect action command configures an action to be taken when a loopback is detected on an interface.

The undo loopback-detect action command restores the default action.

By default, an interface is shut down when a loopback is detected on the interface.

Format

loopback-detect action { block | nolearn | shutdown | trap | quitvlan }

undo loopback-detect action [ block | nolearn | shutdown | trap | quitvlan ] (Ethernet interface view, GE interface view, XGE interface view, 40GE interface view, MultiGE interface view, 25GE interface view, 100GE interface view, Eth-Trunk interface view)

undo loopback-detect action (port group view)

Parameters

Parameter

Description

Value

block

Blocks an interface when a loopback is detected.

-

nolearn

Disables MAC address learning on an interface when a loopback is detected on the interface.

-

shutdown

Shuts down an interface when a loopback is detected on the interface.

-

trap

Only sends a trap message when a loopback is detected.

-

quitvlan

The interface exits from the VLAN in which a loop occurs When a loopback is detected on an interface.

-

Views

Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, 100GE interface view, 40GE interface view, MultiGE interface view, port group view, Eth-Trunk interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After loopback detection is enabled on an interface, the interface sends loopback detection packets at intervals. When a loopback is detected on the interface, the system performs an action to minimize the impact on the entire network. The loopback-detect action command configures the action.

The system performs any of the following actions after detecting a loopback on an interface:
  • block: blocks the interface. After the interface is blocked, it is isolated from other interfaces and does not forward received data packets to other interfaces.
  • nolearn: disables MAC address learning on the interface. When a loopback is detected on the interface, the interface stops learning MAC addresses.
  • shutdown: shuts down the interface.
  • trap: only sends a trap.
  • quitvlan: When a loopback is detected on an interface, the interface exits from the VLAN in which a loop occurs.

Prerequisites

Enable loopback detection in the interface view or system view.

Follow-up Procedure

  • If the action is set to block, nolearn, trap or quitvlan, you can run the loopback-detect recovery-time command to set the interface recovery time.

  • If the action is set to shutdown, the shutdown interface cannot be automatically restored after a loopback is eliminated. You must run the shutdown and undo shutdown commands or run the restart command to enable the interface again. In addition to the preceding methods, the interface that is manually shut down or enters the Error-Down state due to other protocols will be automatically restored after the recovery time. However, the interface that is disabled only by LBDT cannot be restored after the recovery time.

Example

# Configure the system to shut down GigabitEthernet0/0/1 when a loopback occurs.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] loopback-detect action shutdown
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >