Example for Configuring LBDT to Detect Loops on the Downstream Network
Networking Requirements
As shown in Figure 20-8, a new department of an enterprise connects to aggregation switch Switch, and this department belongs to VLAN 100. Loops may occur due to incorrect connections or configurations. As a result, communication on the Switch and uplink network may be 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.
Configuration Roadmap
The new department network has only VLAN 100, so configure LBDT on the Switch to detect loops. The configuration roadmap is as follows:
- Enable LBDT on the GE1/0/1 of the Switch to detect loops in a specified VLAN so that loops on the downstream network can be detected.
- 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.
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 on the new network and between the new network and the Switch.
Procedure
- Enable LBDT on the interface.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] interface gigabitethernet 1/0/1 [Switch-GigabitEthernet1/0/1] loopback-detect enable [Switch-GigabitEthernet1/0/1] quit
- 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 [Switch-GigabitEthernet1/0/1] port hybrid tagged vlan 100 [Switch-GigabitEthernet1/0/1] loopback-detect packet vlan 100 [Switch-GigabitEthernet1/0/1] quit
- Configure LBDT parameters.
# Set the interval for sending LBDT packets.
[Switch] loopback-detect packet-interval 10
# Configure an action taken after a loop is detected.
[Switch] interface gigabitethernet 1/0/1 [Switch-GigabitEthernet1/0/1] loopback-detect action shutdown [Switch-GigabitEthernet1/0/1] quit
- Verify the configuration.
Run the display loopback-detect command to check the LBDT configuration.
[Switch] display loopback-detect Loopback-detect sending-packet interval: 10 (A): Auto Loopback-detect ----------------------------------------------------------------- Interface RecoverTime Action Status ----------------------------------------------------------------- GigabitEthernet1/0/1 30 shutdown NORMAL -----------------------------------------------------------------
The preceding command output shows that the LBDT configuration is successful.
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 (A): Auto Loopback-detect ----------------------------------------------------------------- Interface RecoverTime Action Status ----------------------------------------------------------------- GigabitEthernet1/0/1 30 shutdown SHUTDOWN -----------------------------------------------------------------
The preceding command output shows that GE1/0/1 is shut down.