< Home

Example for Configuring LBDT to Detect Loops on the Local Network

Networking Requirements

As shown in Figure 1, a small-scale enterprise uses Layer 2 networking and belongs to VLAN 100. Because employees often move, the network topology changes frequently. Loops may occur due to incorrect connections or configurations during the change. As a result, broadcast storms may occur and affect communication of the Switch and entire network.

The requirements are as follows: The Switch detects loops. When a loop exists, the interface is blocked to reduce the impact of the loop on the Switch and network. When the loop is eliminated, the interface can be restored.

Figure 1 Networking for configuring LBDT to detect loops on the local network

Configuration Roadmap

To detect loops on the network where the Switch is deployed, configure LBDT on GE0/0/1 and GE0/0/2 of the Switch. In this example, untagged LBDT packets sent by the Switch will be discarded by other switches on the network. As a result, the packets cannot be sent back to the Switch, and LBDT fails. Therefore, LBDT is configured in a specified VLAN. The configuration roadmap is as follows:

  1. Enable LBDT on an interface and configure the Switch to detect loops in VLAN 100 to implement LBDT on the network where the Switch is deployed.
  2. Configure an action taken after a loop is detected and set the recovery time. After a loop is detected, the Switch blocks the interface to reduce the impact of the loop on the network. After a loop is eliminated, the Switch restores the interface.

Configure interfaces on other switching interfaces as trunk or hybrid interfaces and configure these interfaces to allow packets from VLANs to pass through to ensure Layer 2 connectivity.

Procedure

  1. Enable LBDT on an interface.

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

  2. Specify the VLAN ID of LBDT packets.

    [Switch] vlan 100
    [Switch-vlan100] quit
    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] port link-type hybrid
    [Switch-GigabitEthernet0/0/1] port hybrid tagged vlan 100
    [Switch-GigabitEthernet0/0/1] loopback-detect packet vlan 100
    [Switch-GigabitEthernet0/0/1] quit
    [Switch] interface gigabitethernet 0/0/2
    [Switch-GigabitEthernet0/0/2] port link-type hybrid
    [Switch-GigabitEthernet0/0/2] port hybrid tagged vlan 100
    [Switch-GigabitEthernet0/0/2] loopback-detect packet vlan 100
    [Switch-GigabitEthernet0/0/2] quit

  3. Configure an action taken after a loop is detected and set the recovery time.

    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] loopback-detect action block
    [Switch-GigabitEthernet0/0/1] loopback-detect recovery-time 30
    [Switch-GigabitEthernet0/0/1] quit
    [Switch] interface gigabitethernet 0/0/2
    [Switch-GigabitEthernet0/0/2] loopback-detect action block
    [Switch-GigabitEthernet0/0/2] loopback-detect recovery-time 30
    [Switch-GigabitEthernet0/0/2] 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:  5   
                                        
      (A): Auto Loopback-detect                                                                                                           
      -----------------------------------------------------------------                                                                   
      Interface                     RecoverTime  Action     Status                                                                        
      -----------------------------------------------------------------
      GigabitEthernet0/0/1          30           block      NORMAL
      GigabitEthernet0/0/2          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 or GE0/0/2 is blocked.

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

      The preceding command output shows that GE0/0/2 is blocked.

    3. Shut down GE0/0/1. After 30s, run the display loopback-detect command to check whether GE0/0/2 is restored.

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

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

Configuration Files

Switch configuration file

#
sysname Switch
#
vlan batch 100
#
interface GigabitEthernet0/0/1
 port link-type hybrid
 port hybrid tagged vlan 100
 loopback-detect recovery-time 30
 loopback-detect packet vlan 100
 loopback-detect enable
 loopback-detect action block
#
interface GigabitEthernet0/0/2
 port link-type hybrid
 port hybrid tagged vlan 100
 loopback-detect recovery-time 30
 loopback-detect packet vlan 100
 loopback-detect enable
 loopback-detect action block
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic