< Home

Example for Configuring LBDT to Detect Loopbacks on an Interface

Networking Requirements

As shown in Figure 1, aggregation switch SwitchA on an enterprise network connects to a new access switch SwitchB. To prevent a loopback from occurring between the Tx and Rx ends of GE0/0/1 due to incorrect fiber connection or high voltage damage, SwitchA is required to detect loopbacks on GE0/0/1. Furthermore, it is required that the interface be blocked to reduce the impact of the loopback on the network when a loopback is detected, and the interface be restored after the loopback is removed.

Figure 1 Networking for configuring LBDT to detect loopbacks on an interface

Configuration Roadmap

To detect loopbacks on downlink interface GE0/0/1 of SwitchA, configure LBDT on GE0/0/1 of SwitchA. The configuration roadmap is as follows:

  1. Enable LBDT on GE0/0/1 of SwitchA to detect loopbacks.
  2. Configure an action taken after a loopback is detected and set the recovery time. After a loopback is detected, the system blocks the interface to reduce the impact of the loopback on the network. After a loop is eliminated, the system restores the interface.

Procedure

  1. Enable LBDT on an interface.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] loopback-detect enable
    [SwitchA-GigabitEthernet0/0/1] quit

  2. Configure an action taken after a loopback is detected and set the recovery time.

    [SwitchA] interface gigabitethernet 0/0/1
    [SwitchA-GigabitEthernet0/0/1] loopback-detect action block
    [SwitchA-GigabitEthernet0/0/1] loopback-detect recovery-time 30
    [SwitchA-GigabitEthernet0/0/1] quit

  3. Verify the configuration.

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

      [SwitchA] display loopback-detect
      Loopback-detect sending-packet interval: 5                                     
                                                                                      
      (A): Auto Loopback-detect                                                                                                           
      -----------------------------------------------------------------                                                                   
      Interface                     RecoverTime  Action     Status                                                                        
      -----------------------------------------------------------------
      GigabitEthernet0/0/1          30           block      NORMAL
      -----------------------------------------------------------------

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

    2. After about 5s, run the display loopback-detect command to check whether GE0/0/1 is blocked.

      [SwitchA] display loopback-detect 
      Loopback-detect sending-packet interval:  5 
                                          
      (A): Auto Loopback-detect                                                                                                           
      -----------------------------------------------------------------                                                                   
      Interface                     RecoverTime  Action     Status                                                                        
      -----------------------------------------------------------------
      GigabitEthernet0/0/1          30           block      BLOCK
      -----------------------------------------------------------------

      The preceding command output shows that GE0/0/1 is blocked, indicating that a loopback occurs on GE0/0/1.

    3. Manually remove the loopback. Run the display loopback-detect command to check whether GE0/0/1 is restored.

      [SwitchA] display loopback-detect
      Loopback-detect sending-packet interval: 5                                     
                                          
      (A): Auto Loopback-detect                                                                                                           
      -----------------------------------------------------------------                                                                   
      Interface                     RecoverTime  Action     Status                                                                        
      -----------------------------------------------------------------
      GigabitEthernet0/0/1          30           block      NORMAL
      -----------------------------------------------------------------

      The preceding command output shows that GE0/0/1 is restored.

Configuration Files

SwitchA configuration file

#
sysname SwitchA
#
interface GigabitEthernet0/0/1
 loopback-detect recovery-time 30
 loopback-detect enable
 loopback-detect action block
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >