Got it

Example for Configuring LBDT to Detect Loops on the Downstream Network

248 0 0 0 0


When a loop occurs on a network, broadcast, multicast, and unknown unicast packets are repeatedly transmitted on the network. This wastes network resources and may even cause a network breakdown. To minimize the impact of loops on a Layer 2 network, a detection technology that quickly notifies users of loops is required. When a loop occurs, users are requested to check network connections and configurations, and control the problematic interface.

Loopback detection (LBDT) periodically sends LBDT packets on an interface to check whether the packets return to the local device (receive and transmit interfaces can be different), and determines whether loops occur on the interface, local network, or downstream network.
  • If LBDT packets are received and sent by the same interface, a loopback occurs on the interface or a loop occurs on the network connected to the interface.

  • If LBDT packets are received by another interface on the same device, a loop occurs on the network connected to the interface or device.

After loops are detected, the device can send alarms to the NMS and record logs, and can control the interface status (the interface is shut down by default) according to the device configuration so that the impact of loops on the device and network is minimized. 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 blocks this interface, 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.

The problematic interface continues to send LBDT packets. After the configured recovery time expires, the system attempts to restore the problematic interface. If the device receives no LBDT packets from the problematic interface within the next recovery time, it considers that the loop is eliminated on the interface and restores the interface.

LBDT can only detect loops on a single node, but cannot eliminate loops on the entire network in the same manner as ring network technologies of ERPS, RRPP, SEP, Smart Link, and STP/RSTP/MSTP/VBST.

Configuration Notes

  • This example applies to all versions of all S series switches.
  • In V200R008C00 and earlier versions, LBDT does not take effect in dynamic VLANs. In V200R008C00 and later versions, the LBDT-enabled switch can detect loops in dynamic VLANs, but the Quitvlan action is invalid for dynamic VLANs.

  • LBDT needs to send a large number of LBDT packets to detect loops, occupying system resources. Therefore, disable LBDT if loops do not need to be detected.

  • LBDT cannot be configured on an Eth-Trunk or its member interfaces.

  • An interface can send LBDT packets with the specified VLAN tag only when the specified VLAN has been created.

  • LBDT can detect loops in a maximum of eight VLANs.

  • When the PVID of the interface in the loop is the detected VLAN ID or the interface joins the detected VLAN in untagged mode, VLAN tags of LBDT packets are removed. As a result, the packet priority changes and the system may fail to detect loops.

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

  • The blocked ports of LBDT cannot block GVRP packets. To ensure that GVRP runs normally and prevent GVRP loops, do not enable GVRP on the blocked port of LBDT.
  • On a modular switch, LBDT and loop detection (LDT) cannot be configured simultaneously.

Networking Requirements

In Figure 6-38, a new department of an enterprise connects to the aggregation switch Switch. This department belongs to VLAN 100. Loops occur due to incorrect connections or configurations. As a result, communication on the Switch and uplink network is affected.

It is required that the Switch should detect loops on the new network to prevent the impact of loops on the Switch and connected network.

Figure 6-38  Networking for configuring LBDT to detect loops on the downstream network 

Configuration Roadmap

The configuration roadmap is as follows:

  1. Enable LBDT on GE1/0/1 of the Switch to detect loops in a specified VLAN so that loops on the downstream network can be detected.
  2. Set LBDT parameters so that the Switch can immediately shut down GE1/0/1 after a loop is detected. This prevents the impact of the loop on the Switch and connected network.
imgDownload?uuid=4510eccee1154c419e40ec8 NOTE:

Configure interfaces on other switching devices as trunk or hybrid interfaces and configure these interfaces to allow packets from corresponding VLANs to pass through. This ensures Layer 2 connectivity on the new network and between the new network and the Switch.


  1. Enable LBDT on the interface.

    <HUAWEI> system-view[HUAWEI] sysname Switch[Switch] interface gigabitethernet 1/0/1[Switch-GigabitEthernet1/0/1] loopback-detect enable  //Enable LBDT on the interface.[Switch-GigabitEthernet1/0/1] quit

  2. Specify the VLAN ID of LBDT packets.

    [Switch] vlan 100[Switch-vlan100] quit[Switch] interface gigabitEthernet 1/0/1[Switch-GigabitEthernet1/0/1] port link-type hybrid  //In V200R005C00 and later versions, the default link type of a switch interface is not hybrid. You can choose run the port link-type hybrid command to configure the link type of the interface as hybrid.[Switch-GigabitEthernet1/0/1] port hybrid tagged vlan 100[Switch-GigabitEthernet1/0/1] loopback-detect packet vlan 100  //Enable LBDT to detect loops in VLAN 100.[Switch-GigabitEthernet1/0/1] quit

  3. Configure LBDT parameters.

    # Set the interval for sending LBDT packets.

    [Switch] loopback-detect packet-interval 10

    # Configure an action to be taken after a loop is detected.

    [Switch] interface gigabitethernet 1/0/1[Switch-GigabitEthernet1/0/1] loopback-detect action shutdown  //Configure the Shutdown action to be taken after a loop is detected.[Switch-GigabitEthernet1/0/1] quit

  4. Verify the configuration.

    1. Run the display loopback-detect command to check the LBDT configuration.

      [Switch] display loopback-detect Loopback-detect sending-packet interval:  10                                                                                         
      Interface                     RecoverTime  Action     Status                                                                        
      GigabitEthernet1/0/1          30            shutdown   NORMAL                                                                        

      The preceding command output shows that the LBDT configuration is successful.

    2. Construct loops on the downstream network and run the display loopback-detect command to check whether GE1/0/1 is shut down.

      [Switch] display loopback-detect Loopback-detect sending-packet interval:  10                                                                                         
      Interface                     RecoverTime  Action     Status                                                                        
      GigabitEthernet1/0/1          30            shutdown   SHUTDOWN(Loopback detected)                                                                        ----------------------------------------------------------------------------------

      The preceding command output shows that GE1/0/1 is shut down.

Configuration Files

Switch configuration file

sysname Switch
vlan batch 100
loopback-detect packet-interval 10
interface GigabitEthernet1/0/1 port link-type hybrid port hybrid tagged vlan 100
 loopback-detect packet vlan 100
 loopback-detect enable

See more please click

  • x
  • convention:


You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.