0% found this document useful (0 votes)
31 views25 pages

01-20 LBDT Configuration

This document provides a configuration guide for the Loopback Detection (LBDT) function in S1720, S2700, S5700, and S6720 Series Ethernet switches, detailing how to detect and manage network loops. It explains the operation of LBDT, including automatic and manual configurations, the actions taken when loops are detected, and the recovery process for interfaces. The guide also includes application scenarios, licensing requirements, and limitations for LBDT functionality.

Uploaded by

Bacof16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views25 pages

01-20 LBDT Configuration

This document provides a configuration guide for the Loopback Detection (LBDT) function in S1720, S2700, S5700, and S6720 Series Ethernet switches, detailing how to detect and manage network loops. It explains the operation of LBDT, including automatic and manual configurations, the actions taken when loops are detected, and the recovery process for interfaces. The guide also includes application scenarios, licensing requirements, and limitations for LBDT functionality.

Uploaded by

Bacof16
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

S1720, S2700, S5700, and S6720 Series Ethernet

Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

20 LBDT Configuration

About This Chapter

This chapter describes how to configure loopback detection (LBDT) function,


which allows the device to detect loopbacks on an interface, loops on the
downstream network or device and loops between two device interfaces. When
detecting a loop, the device notifies users in a timely manner and takes a
preconfigured action on the problematic interface to minimize the impact of the
loop on the device and network.

20.1 Overview of LBDT


20.2 Understanding LDT and LBDT
20.3 Application Scenarios for LDT and LBDT
20.4 Licensing Requirements and Limitations for LDT and LBDT
20.5 Default Settings for LDT and LBDT
20.6 Configuring Automatic LBDT
20.7 Configuring Manual LBDT
20.8 Configuration Examples for LBDT

20.1 Overview of LBDT


LBDT periodically sends detection packets through an interface to detect loops on
the interface, on the downstream network or device, or between two device
interfaces.
When a loop occurs on a network, broadcast, multicast, and unknown unicast
packets are circulated on the network. This wastes network resources and can
result in network breakdowns. Quickly detecting loops on a Layer 2 network is
crucial for users to minimize the impact of loops on a network. LDT and LBDT
help users check network connections and configurations, and control the looped
interface.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1174


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

LBDT periodically sends detection packets on an interface to check whether the


packets return to the local device (through the same interface or another
interface), and determines whether a loop occurs on the interface, on the
downstream network or device, or between two device interfaces. After a loop is
detected, the device sends a trap to the NMS and records a log, and takes a
preconfigured action on the looped interface (the interface is shut down by
default) to minimize impact of the loop on the device and entire network.

NOTE

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

20.2 Understanding LDT and LBDT


LBDT periodically sends detection packets on an interface (see Detection Packet)
to check whether the packets return to the local device (through the same
interface or another interface), and determines whether a loop occurs on the
interface, on the downstream network or device, or between two device interfaces.
● If detection packets are received by the same interface, a loopback occurs on
the interface or a loop occurs on the downstream network or device
connected to the interface.
● If detection packets are received by another interface on the same device, a
loop occurs on the device or network connected to the interface.
Once a loop is detected, a Huawei switch sends a trap to the NMS and records a
log. It then takes a preconfigured action on the interface (see Action Taken After
a Loop Is Detected) to minimize the impact of the loop on the device and entire
network.
When the device does not receive detection packets from the interface within the
recovery time, the device considers that the loop is eliminated and restores the
interface (see Automatic Recovery of an Interface).

Detection Packet
LBDT periodically sends detection packets on an interface to check whether the
packets return to the local device to determine whether loops occur on the
interface, on the downstream network or device, or between two device interfaces.
The following conditions must be met:
● Detection packets sent from an interface are sent back to the local device
when a loop occurs on an interface, or network connected to the interface.
● The system identifies detection packets sent from the local device, and
detection packets that the interface sends.
Detection packets sent from a device carry the device's MAC address and
outbound interface number. The device can identify the packets sent by itself as
well as the source interface. The packets also carry the broadcast or multicast
destination MAC address to ensure that the packets can be sent back to the local
device when a loop occurs on the interface or network connected to the interface.
Figure 20-1 shows the format of LBDT packets.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1175


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Figure 20-1 Format of LBDT packets

DMAC SMAC 802.1Q Tag LDT-Type PortInfo Flag

Table 20-1 describes the fields.

Table 20-1 Description of each field


Item Description

DMAC The destination MAC address of a tagged packet is all Fs; the
destination MAC address of an untagged packet is a BPDU MAC
address, broadcast MAC address (all Fs), or multicast MAC
address.
The broadcast destination MAC address, multicast destination
MAC address, or BPDU MAC address ensures that the detection
packet can be sent back to the local device when a loop occurs
on the interface or network connected to the interface.

SMAC Source MAC address. The value is the system MAC address of the
device, which identifies packets sent from the local device.

802.1Q Tag Tag Protocol Identifier (TPID). The value of the TPID is 0x8100,
representing the 802.1Q tagged frame.

LDT-Type Detection packet type, including the protocol number and


subprotocol number.
The protocol number and subprotocol number are 0x9998 and
0x0001 respectively, indicating LBDT packets.

PortInfo Information about the interface that sends detection packets,


which is used by the device to determine whether packets are
sent from the interface.

Flag Untagged detection packet flag:


● 0x0003: indicates untagged packets.
● 0x0004: indicates tagged packets.

LBDT sends both tagged and untagged detection packets, so it can detect loops
based on interfaces and VLANs.

Action Taken After a Loop Is Detected


When the system detects a loop on an interface, it can take a preconfigured
action on the interface. Table 20-2 describes these preconfigured actions.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1176


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Table 20-2 Actions taken after a loop is detected


Action Description Usage Scenario

Trap The device only sends a trap to Select this action when only traps
the NMS and records a log. need to be reported without
affecting traffic forwarding on the
interface.
This action cannot suppress
broadcast storms.

Block The device sends a trap to the Select this action when the
NMS, blocks the interface, and interface needs to be disabled
allows only BPDUs to pass from forwarding data packets and
through. needs to forward BPDUs such as
Link Layer Discovery Protocol Data
Units (LLDPDUs).
This action can suppress broadcast
storms.

Shutdo The device sends a trap to the Select this action to prevent
wn NMS and shuts down the broadcast storms when the
interface. interface does not participate in
any calculation or forwarding.
This action can suppress broadcast
storms.

No The device sends a trap to the Select this action when the
learnin NMS and disables the interface interface needs to process data
g from learning new MAC packets and send them to the
addresses. correct link.
This action cannot suppress
broadcast storms.

Quitvl The device sends a trap to the Select this action when loops in a
an NMS and removes the interface VLAN need to be eliminated
from the VLAN where the loop without affecting traffic
occurs. forwarding in other VLANs.
This action can suppress broadcast
storms.

LBDT can only detect loops on a single node, but cannot eliminate loops on the
entire network. After a loop is detected, you are advised to eliminate the loop
immediately.

Automatic Recovery of an Interface


The automatic recovery mechanism of LBDT allows the looped interface to be
restored immediately after a loop is eliminated. After the configured recovery time
expires, the system attempts to restore the looped interface. If the device does not
receive detection packets from the looped interface within the next recovery time,
it considers that the loop is eliminated on the interface and restores the interface.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1177


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

NOTE

● The interface that is disabled by LBDT cannot be restored after the recovery time.
● After the LBDT action of an interface is changed, the interface is restored. Then the
changed LBDT action is taken when a loop is detected.
● When VLAN-based LBDT is configured on an interface:
● If detection of this VLAN is canceled, the interface is restored automatically.
● If GVRP is not enabled on the interface and the interface is removed from the
VLAN manually, the interface is restored automatically.
● If GVRP is enabled on the interface, the interface is manually removed from the
VLAN or dynamically removed from the VLAN through GVRP, and the action to be
taken is not shutdown, the interface can be restored automatically.
● If GVRP is enabled on the interface, the interface is manually removed from the
VLAN or dynamically removed from the VLAN through GVRP, and the action to be
taken is shutdown, the interface cannot be restored automatically. In the alarm
periodically reported by the device, information about the VLAN where loops are
detected is empty. You must run the shutdown and undo shutdown commands to
manually restore the interface or run the restart command to enable the interface
again.

20.3 Application Scenarios for LDT and LBDT


LBDT can be used to detect loopbacks on an interface, a loop on the
downstream network or device or a loop between two device interfaces.
Automatic loop detection is enabled in the VLAN specified by the PVID on an
interface by default.

Detecting Loopbacks on an Interface


Figure 20-2 shows a loopback on an interface of the Switch. During network
deployment, incorrect fiber connection or high voltage damage on the interface
causes loopbacks to occur between the Tx (transmit end) and Rx (receive end)
ends of an interface. Packets sent from one interface are forwarded back to the
same interface, resulting in possible traffic forwarding errors or MAC address
flapping on the interface.

Figure 20-2 Detecting loopbacks on an interface


Switch

Tx Rx

You can configure LBDT on the interface of the Switch to detect loopbacks. When
detecting a loopback on the interface, the Switch reports a trap and records a log,
and takes a preconfigured action (such as Shutdown, Block, No learning, or

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1178


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Quitvlan) on the interface to reduce the impact of the loopback on the Switch.
When the Switch detects that the loopback is eliminated on the interface, the
interface can be restored. However, the interface shut down cannot be restored.

Detecting a Loop on the Downstream Network or Device


Figure 20-3 shows two network examples whereas a loop is detected on a
downstream network or device connected to the Switch. Packets sent from
Interface1 that pass through the downstream network or device are sent back to
Interface1.

Figure 20-3 Detecting a loop on the downstream network or device


Switch
Switch

Interface1
Interface1

a. Loop on the b. Loop on the


downstream network downstream device

You can configure LBDT on Interface1 of the Switch to detect whether a loop
occurs on the downstream network or device. When detecting a loop on the
downstream network or device, the Switch reports a trap and records a log, and
takes a preconfigured action (such as Shutdown, Block, No learning, or
Quitvlan) on the interface to reduce the impact of the loop on the Switch. When
the Switch detects that the loop is eliminated on the downstream network or
device, the interface can be restored. However, the interface shut down cannot be
restored.

Detecting a Loop Between Two Device Interfaces


As shown in Figure 20-4, a loop occurs on the network where the Switch resides.
Packets sent from Interface1 are forwarded by devices on other networks and
looped back to Interface2.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1179


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Figure 20-4 Detecting a loop between two device interfaces

Switch

Interface1 Interface2 Switch

Interface1 Interface2

a. Loop on the local b. Loop between two


network device interfaces

You can configure LBDT on Interface1 and Interface2 of the Switch to detect
whether a loop occurs on the local network or between two device interfaces.
When detecting a loop, the Switch reports a trap and records a log, and takes
preconfigured actions (such as Shutdown, Block, No learning, or Quitvlan) on
Interface1 and Interface2 to reduce the impact of the loop on the Switch. When
the Switch detects that the loop is eliminated on the local network or between
two interfaces, Interface1 or Interface2 can be restored. However, the interface
shut down cannot be restored.

Automatically Detecting Loops in the VLAN Specified by the PVID on an


Interface
The switch joins VLAN 1 by default, and the PVID of all interfaces is VLAN 1.
When an interface changes from Down to Up, a loop may occur. You can
configure the switch to automatically detect loops in the VLAN specified by the
PVID on the interface. When a loop is detected, only an alarm is reported.

By default, the switch is configured to automatically detect loops in the VLAN


specified by the PVID on an interface. You can run the loopback-detect auto
disable command to disable automatic loop detection.

Automatically Detecting Loops in the VLAN Where MAC Address Flapping Is


Detected
The device is enabled with MAC address flapping detection by default. When the
device detects MAC address flapping in a VLAN, automatic LBDT is triggered to
detect loops in the VLAN. The device sends LBDT packets in the VLAN specified in
the MAC address flapping record to detect whether there are loops. If loops exist
in the VLAN where MAC address flapping occurs, a trap is only sent by default. For
a loop between two device interfaces, you can run the loopback-detect auto
action command to configure an action.

20.4 Licensing Requirements and Limitations for LDT


and LBDT

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1180


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Involved Network Elements


Other network elements are not required.

Licensing Requirements
LBDT configuration commands are available only after the S1720GW, S1720GWR,
and S1720X have the license (WEB management to full management Electronic
RTU License) loaded and activated and the switches are restarted. LBDT
configuration commands on other models are not under license control.
For details about how to apply for a license, see S Series Switch License Use
Guide.

Version Requirements

Table 20-3 Products and versions supporting LBDT


Product Product Software Version
Model

S1700 S1720GFR V200R006C10, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

S1720GW, V200R010C00, V200R011C00, V200R011C10


S1720GWR

S1720GW- V200R010C00, V200R011C00, V200R011C10


E,
S1720GWR
-E

S1720X, V200R011C00, V200R011C10


S1720X-E

Other Models that cannot be configured using commands.


S1700 For details about features and versions, see S1700
models Documentation Bookshelf.

S2700 S2700SI V100R005C01, V100R006(C00&C01&C03&C05)

S2700EI V100R005C01, V100R006(C00&C01&C03&C05)

S2710SI V100R006(C03&C05)

S2720EI V200R006C10, V200R009C00, V200R010C00,


V200R011C10

S2750EI V200R003C00, V200R005C00SPC300, V200R006C00,


V200R007C00, V200R008C00, V200R009C00,
V200R010C00, V200R011C00, V200R011C10

S3700 S3700SI V100R005C01, V100R006(C00&C01&C03&C05)

S3700EI V100R005C01, V100R006(C00&C01&C03&C05)

S3700HI V100R006C01, V200R001C00

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1181


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Product Product Software Version


Model

S5700 S5700LI V200R001C00, V200R002C00,


V200R003(C00&C02&C10), V200R005C00SPC300,
V200R006C00, V200R007C00, V200R008C00,
V200R009C00, V200R010C00, V200R011C00,
V200R011C10

S5700S-LI V200R001C00, V200R002C00, V200R003C00,


V200R005C00SPC300, V200R006C00, V200R007C00,
V200R008C00, V200R009C00, V200R010C00,
V200R011C00, V200R011C10

S5710-C-LI V200R001C00

S5710-X-LI V200R008C00, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

S5700EI V100R005C01, V100R006(C00&C01),


V200R001(C00&C01), V200R002C00, V200R003C00,
V200R005(C00&C01&C02&C03)

S5700SI V100R005C01, V100R006C00, V200R001C00,


V200R002C00, V200R003C00, V200R005C00

S5710EI V200R001C00, V200R002C00, V200R003C00,


V200R005(C00&C02)

S5720EI V200R007C00, V200R008C00, V200R009C00,


V200R010C00, V200R011C00, V200R011C10

S5720LI, V200R010C00, V200R011C00, V200R011C10


S5720S-LI

S5720SI, V200R008C00, V200R009C00, V200R010C00,


S5720S-SI V200R011C00, V200R011C10

S5700HI V100R006C01, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00SPC500&C01&C02)

S5710HI V200R003C00, V200R005(C00&C02&C03)

S5720HI V200R006C00, V200R007(C00&C10), V200R008C00,


V200R009C00, V200R010C00, V200R011C00,
V200R011C10

S5730SI V200R011C10

S5730S-EI V200R011C10

S6700 S6700EI V100R006C00, V200R001(C00&C01), V200R002C00,


V200R003C00, V200R005(C00&C01&C02)

S6720EI V200R008C00, V200R009C00, V200R010C00,


V200R011C00, V200R011C10

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1182


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Product Product Software Version


Model

S6720S-EI V200R009C00, V200R010C00, V200R011C00,


V200R011C10

S6720LI, V200R011C00, V200R011C10


S6720S-LI

S6720SI, V200R011C00, V200R011C10


S6720S-SI

NOTE
To know details about software mappings, see Hardware Query Tool.

Feature Limitations
● 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 requires that the device should send a large number of detection
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.
● 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.
● The S2700SI and S2710SI support only detection of self-loops on an interface,
and do not support detection loops on the downstream device or between
interfaces.

20.5 Default Settings for LDT and LBDT

Table 20-4 Default setting for LBDT

Parameter Default Setting

Automatic LBDT Enable

Manual LBDT Disabled on an interface and in a


VLAN

Action after a loop is detected Shutdown

Interval for sending LBDT packets 5s

Interface recovery time 3 times the interval for sending


detection packets

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1183


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

20.6 Configuring Automatic LBDT


LBDT technology detects loops. To enable the switch to detect loops in the VLAN
specified by the PVID or in the VLAN where MAC address flapping is detected, you
can configure automatic LBDT. Then the switch can immediately detect loops on
the downstream network or between two interfaces and send traps to notify users
to minimize the impact of loops on the switch or the network.

20.6.1 Enabling Automatic LBDT

Context
The switch joins VLAN 1 by default, and the PVID of all interfaces is VLAN 1.
When an interface changes from Down to Up, a loop may occur. You can
configure automatic LBDT to detect loops in the VLAN specified by the PVID on an
interface. When the switch is enabled with MAC address flapping detection, if
MAC address flapping is detected in a VLAN, automatic LBDT is triggered to detect
loops in the VLAN.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run undo loopback-detect auto disable

Automatic LBDT is enabled on all interfaces.

By default, automatic LBDT is enabled on all interfaces. When a loop is detected in


the VLAN specified by the PVID on an interface, a trap is reported.

NOTE

● To disable automatic LBDT, run the loopback-detect auto disable command.


● When the loopback-detect enable command is used to configure manual LBDT,
automatic LBDT becomes invalid.
● When the loopback-detect enable command is used to configure manual LBDT,
automatic LBDT on the corresponding interface becomes invalid.

----End

Follow-up Procedure
To enable LBDT triggered by MAC address flapping, first configure MAC address
flapping detection. For details on how to configure MAC address flapping
detection, see 3.9 Configuring MAC Address Flapping Detection.

By default, global MAC address flapping detection is enabled. The switch detects
MAC address flapping in all VLANs.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1184


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

When automatic LBDT is triggered to automatically detect loops in the VLAN


where MAC address flapping is detected, you can configure either of the following
actions on the interface:
● trap: The interface only sends a trap.
● quitvlan: The interface is removed from the VLAN where a loop occurs.
You can run the loopback-detect auto action { quitvlan | trap } command in the
system view to configure the action when automatic LBDT is triggered to
automatically detect loops in the VLAN where MAC address flapping is detected.
By default, the action is trap when automatic LBDT is triggered to detect loops in
the VLAN where MAC address flapping is detected.

NOTE

The quitvlan action that is configured using this command takes effect only in the scenario
where automatic LBDT is triggered to detect a loop between interfaces in the VLAN where
MAC address flapping is detected. The trap action is used in the scenario where automatic
LBDT is triggered to detect a loop on the downstream network or device in the VLAN
where MAC address flapping is detected.

20.6.2 (Optional) Setting the Interval for Sending LBDT


Packets

Context
An LBDT-enabled interface sends LBDT packets at intervals. A shorter interval
indicates that the system sends more LBDT packets in a given period and detects
loops more accurately. However, more system resources are consumed and system
performance is affected. You can adjust the interval for sending LBDT packets
according to actual networking to balance system performance and LBDT
accuracy.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run loopback-detect packet-interval packet-interval-time
The interval for sending LBDT packets is set.
By default, the interval for sending LBDT packets is 5s.

----End

20.6.3 (Optional) Setting the Recovery Time of an Interface

Context
An LBDT-enabled interface periodically sends LBDT packets to detect loops. After a
loop is detected, an action configured by the loopback-detect action command is

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1185


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

taken on the interface. In addition, the system counts the time. After the
configured recovery time expires, the system attempts to restore the problematic
interface. If the device does not receive detection packets from the problematic
interface within the next recovery time, it considers that the loop is eliminated on
the interface and restores the interface.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run loopback-detect recovery-time recovery-time
The interface recovery time after a loop is removed is set.
By default, the interface recovery time is three times the interval for sending LBDT
packets.

NOTE

It is recommended that the interface recovery time be three times the packet sending
interval at least. If the packet sending interval has been set to a small value, the interface
recovery time should be at least 10 seconds longer than the packet sending interval.

----End

20.6.4 Verifying the Automatic LBDT Configuration


Procedure
● Run the display loopback-detect command to check the LBDT configuration
and status of LBDT-enabled interfaces.
----End

20.7 Configuring Manual LBDT

20.7.1 Enabling Manual LBDT


Context

NOTICE

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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1186


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

An LBDT-enabled interface periodically sends untagged LBDT packets with the


destination MAC address as the BPDU MAC address to detect loops. Generally, the
switch does not allow BPDUs to pass through, so LBDT can only detect loopbacks
on an Interface, but cannot detect a loop on the downstream network or
device or between two device interfaces.
To enable LBDT to detect a loop on the downstream network or device,
configure LBDT in a specified VLAN. When the connected interface is an access
interface or the PVIDs of the inbound and outbound interfaces are the same, you
can also run the loopback-detect untagged mac-address command to detect
loops.
To enable LBDT to detect a loop between two device interfaces, configure LBDT
in a specified VLAN.
On the switch, you can enable LBDT on all interfaces in the system view or on an
interface.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run the following commands as required.
● Enable LBDT on all interfaces.
Run the loopback-detect enable command to enable LBDT on all interfaces.
When LBDT needs to be configured on most interfaces, perform this
operation. This operation simplifies the configuration.
● Enable LBDT on an interface.
a. Run the interface interface-type interface-number command to enter the
interface view.
b. Run the loopback-detect enable command to enable LBDT on the
interface.
By default, LBDT is disabled on an interface.
Step 3 Run the following commands as required.
If LBDT Detecting Loopbacks on an Interface is required, skip this step.
If Detecting a Loop on the Downstream Network or Device or Detecting a
Loop Between Two Device Interfaces is required, perform this step.
● Configuring LBDT in a specified VLAN
a. Run interface interface-type interface-number
The interface view is displayed.
b. Select either of the following configurations to add the VLAN where
loops need to be detected.

▪ Access interface
1) Run port link-type access
The link type of the interface is configured as access.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1187


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

2) Run port default vlan vlan-id


The access interface is added to the VLAN where loops need to
be detected.

▪ Hybrid interface
1) Run port link-type hybrid
The link type of the interface is configured as hybrid.
2) Run port hybrid tagged vlan { { vlan-id1 [ to vlan-
id2 ] }&<1-10> | all } or port hybrid untagged vlan { { vlan-id1
[ to vlan-id2 ] }&<1-10> | all }
The hybrid interface is added to the VLAN where loops need to
be detected.

▪ Trunk interface
1) Run port link-type trunk
The link type of the interface is configured as trunk.
2) Run port trunk allow-pass vlan { { vlan-id1 [ to vlan-
id2 ] }&<1-10> | all }
The trunk interface is added to the VLAN where loops need to
be detected.
c. Run loopback-detect packet vlan { vlan-id1 [ to vlan-id2 ] } &<1-8>
Configure LBDT in a specified VLAN.
By default, LBDT is disabled in a VLAN.

NOTE

– An interface sends tagged LBDT packets only when the specified VLAN has been
created.
– 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.
● Configuring the destination MAC address of untagged LBDT packets
Run the loopback-detect untagged mac-address mac-address command to
set the destination MAC address of untagged LBDT packets.
By default, the destination MAC address of untagged LBDT packets is 0180-
C200-000A.
Do not configure the destination MAC address of untagged LBDT packets as
the destination MAC address of other protocols. You are advised to set the
destination MAC address of untagged LBDT packets to a broadcast MAC
address (all Fs).

----End

20.7.2 (Optional) Setting the Interval for Sending LBDT


Packets

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1188


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Context
An LBDT-enabled interface sends LBDT packets at intervals. A shorter interval
indicates that the system sends more LBDT packets in a given period and detects
loops more accurately. However, more system resources are consumed and system
performance is affected. You can adjust the interval for sending LBDT packets
according to actual networking to balance system performance and LBDT
accuracy.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run loopback-detect packet-interval packet-interval-time

The interval for sending LBDT packets is set.

By default, the interval for sending LBDT packets is 5s.

----End

20.7.3 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
Step 1 Run system-view

The system view is displayed.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1189


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Step 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.
Step 3 Run interface interface-type interface-number
The interface view is displayed.
Step 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.

NOTE

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

----End

20.7.4 (Optional) Setting the Recovery Time of an Interface

Context
An LBDT-enabled interface periodically sends LBDT packets to detect loops. After a
loop is detected, an action configured by the loopback-detect action command is
taken on the interface. In addition, the system counts the time. After the
configured recovery time expires, the system attempts to restore the problematic
interface. If the device does not receive detection packets from the problematic
interface within the next recovery time, it considers that the loop is eliminated on
the interface and restores the interface.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface interface-type interface-number
The interface view is displayed.
Step 3 Run loopback-detect recovery-time recovery-time
The interface recovery time after a loop is removed is set.
By default, the interface recovery time is three times the interval for sending LBDT
packets.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1190


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

NOTE

● It is recommended that the interface recovery time be three times the packet sending
interval at least. If the packet sending interval has been set to a small value, the
interface recovery time should be at least 10 seconds longer than the packet sending
interval.
● Automatic recovery is valid for Trap, Quitvlan, Block, and No learning. After a loop is
eliminated, the shutdown interface cannot be restored automatically. You must run the
shutdown and undo shutdown commands or run the restart command to restore the
interface.

----End

20.7.5 Verifying the Manual LBDT Configuration

Procedure
● Run the display loopback-detect command to check the LBDT configuration
and status of LBDT-enabled interfaces.

----End

20.8 Configuration Examples for LBDT

20.8.1 Example for Configuring LBDT to Detect Loopbacks on


an Interface

Networking Requirements
As shown in Figure 20-5, 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 20-5 Networking for configuring LBDT to detect loopbacks on an interface


SwitchA

GE0/0/1

Tx Rx

GE0/0/1

SwitchB

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1191


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

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
Step 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

Step 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

Step 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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1192


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

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

----End

Configuration Files
SwitchA configuration file
#
sysname SwitchA
#
interface GigabitEthernet0/0/1
loopback-detect recovery-time 30
loopback-detect enable
loopback-detect action block
#
return

20.8.2 Example for Configuring LBDT to Detect Loops on the


Downstream Network

Networking Requirements
As shown in Figure 20-6, 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.

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

GE0/0/1

New department
VLAN 100

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1193


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

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:

1. Enable LBDT on the GE0/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 GE0/0/1
after a loop is detected. This prevents the impact of the loop on the Switch
and connected network.

NOTE

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
Step 1 Enable LBDT on the 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

Step 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

Step 3 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 0/0/1
[Switch-GigabitEthernet0/0/1] loopback-detect action shutdown
[Switch-GigabitEthernet0/0/1] quit

Step 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

(A): Auto Loopback-detect


-----------------------------------------------------------------
Interface RecoverTime Action Status
-----------------------------------------------------------------
GigabitEthernet0/0/1 30 shutdown NORMAL
-----------------------------------------------------------------

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1194


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

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 GE0/0/1 is shut down.
[Switch] display loopback-detect
Loopback-detect sending-packet interval: 10

(A): Auto Loopback-detect


-----------------------------------------------------------------
Interface RecoverTime Action Status
-----------------------------------------------------------------
GigabitEthernet0/0/1 30 shutdown SHUTDOWN
-----------------------------------------------------------------

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

----End

Configuration Files
Switch configuration file
#
sysname Switch
#
vlan batch 100
#
loopback-detect packet-interval 10
#
interface GigabitEthernet0/0/1
port link-type hybrid
port hybrid tagged vlan 100
loopback-detect packet vlan 100
loopback-detect enable
#
return

20.8.3 Example for Configuring LBDT to Detect Loops on the


Local Network

Networking Requirements
As shown in Figure 20-7, 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.

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1195


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

Figure 20-7 Networking for configuring LBDT to detect loops on the local network

Switch

GE0/0/1 GE0/0/2

VLAN 100

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.

NOTE

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
Step 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

Step 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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1196


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

[Switch-GigabitEthernet0/0/2] port hybrid tagged vlan 100


[Switch-GigabitEthernet0/0/2] loopback-detect packet vlan 100
[Switch-GigabitEthernet0/0/2] quit

Step 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

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

----End

Configuration Files
Switch configuration file

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1197


S1720, S2700, S5700, and S6720 Series Ethernet
Switches
Configuration Guide - Ethernet Switching 20 LBDT Configuration

#
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

Issue 13 (2021-10-20) Copyright © Huawei Technologies Co., Ltd. 1198

You might also like