< Home

Configuring an Action Taken After a Loop Is Detected

Context

By default, when a loop on an interface or the network connected to the interface, the device does not take any action on the interface. In this case, the interface needs to be shut down to prevent the impact of the loopback on the device and entire network.

You can preconfigure an action to be taken after LBDT detects a loop. After detecting a loop, the device takes the preconfigured action on the interface to prevent the impact of the loop on the device and entire network.

The device provides the following actions after LBDT detects a loop:
  • Trap: The device reports a trap to the NMS and records a log, but does not take any action on the interface.
  • Block: The device isolates an interface where a loop occurs from other interfaces, and can forward only BPDUs.
  • No learning: The interface is disabled from learning MAC addresses.
  • Shutdown: The device shuts down the interface.
  • Quitvlan: The interface is removed from the VLAN where a loop occurs.

For details about the actions, see Action Taken After a Loop Is Detected. You can configure one of the actions according to actual networking.

Procedure

  1. Run system-view

    The system view is displayed.

  2. (Optional) Run snmp-agent trap enable

    Or run snmp-agent trap enable feature-name lbdt

    The trap function is enabled for LBDT. This function allows the device to send traps of LBDT.

    By default, the trap function is enabled for LBDT.

  3. Run interface interface-type interface-number

    The interface view is displayed.

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

    An action taken on an interface where LBDT detects a loop is configured.

    By default, the shutdown action is taken on an interface where LBDT detects a loop.

    • When the Quitvlan action is used, the configuration file remains unchanged.

    • The LBDT action and MAC address flapping action affect each other, and cannot be configured simultaneously.

    • The Quitvlan action of LBDT conflicts with dynamic removal from VLANs (for example, GVRP and HVRP), and cannot be configured simultaneously.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >