Configure single-interface loopback detection on S series switch

7

How to configure single-interface loopback detection on S series switches (except S1700)?
Among external loopback detection, only single-interface loopback detection is supported on switches. After external loopback detection is enabled on an Ethernet interface of a switch, the switch periodically checks whether external loopback occurs on each Ethernet interface. If an S series switch finds that external loopback occurs on an Ethernet interface, by default, it blocks the interface when it runs a version earlier than V200R001 or shuts down the interface when it runs V200R001 or a later version. If an E series switch finds that external loopback occurs on an Ethernet interface, by default, it shuts down the interface.

1. Application Scenario
In actual networking, single-interface loopback detection is often used on a downlink interface of a newly deployed or added access switch. You are advised to set the action taken after loopback is detected to block.

2. Configuration Procedure
Enable loopback detection globally. This function will then be enabled on all interfaces simultaneously.

[Huawei] loopback-detect enable
Modular switches running V200R001 or later support loopback detection in a maximum of eight VLANs.
Fixed switches running V100R005 or later support loopback detection in a maximum of eight VLANs.
E series switches support loopback detection in a maximum of eight VLANs.
The following example describes how to configure loopback detection on a fixed switch:
[Huawei-Ethernet0/0/1] loopback-detect packet vlan 20 21 22 23 24 25 26 27
[Huawei-Ethernet0/0/1] loopback-detect action block

Among E series switches, modular switches running V200R001 and fixed switches running V100R005 or later save loopback alarm information in the trap buffer, and the alarm information can also contain information about the VLAN in which loopback is detected.

Alarm information is as follows:
#Jan 1 2008 06:43:54-08:00 Quidway LDT/4/Porttrap:OID1.3.6.1.4.1.2011.5.25.174.3.3 Loopback does exist on interface(5) Ethernet0/0/1 ( VLAN 20 ) , loopback detect status: 4.(1:normal; 2:block;3:shutdown; 4:trap; 5:nolearn)

3. Precautions
Loopback detection will consume some system resources. After deploying or adding access switches, run the undo loopback-detect enable command to disable this function.

Other related questions:
Loopback detection usage scenario of S series switch
S series switches (except S1700) can detect self-loops on an interface, loops on the downstream network, and loops between interfaces. 1. Detect self-loops on an interface. During network deployment, Tx-Rx (fiber transmit end and fiber receive end) self-loops often occur on interfaces. For example, Tx-Rx self-loops often occur when the fiber is inserted incorrectly or the local interface is damaged by high voltage. A self-loop occurs on the interface of the Switch; as a result, packets sent by the interface are sent back to this interface. This may cause problems such as abnormal traffic forwarding and MAC address flapping. 2. A loop occurs on the downstream network or device of the Switch. As a result, packets sent by Interface1 are sent back to this interface after passing through the downstream network or device of the Switch. 3. A loop occurs on the network or between interfaces of the Switch. As a result, packets sent by Interface1 are sent back to Interface2.

Will logs be generated when loops are detected on S series switch' interfaces where loopback detection is enabled
Logs and alarms will be generated after loops are detected on modular switches' interfaces where loopback detection is enabled. To view the related alarms, run the display trapbuffer command. Only alarms will be generated after loops are detected on interfaces of fixed switches (except S1700). To view the related alarms, run the display trapbuffer command.

Can loopback detection be used together with VLAN-Mapping on interfaces of S series switch
When VLAN-Mapping is configured on interfaces of S series switches (except S1700), only loops in the translated VLAN can be detected, and loops in the original VLAN cannot be detected. The reason is that: When a switch receives a packet, it will replace the VLAN ID carried in the packet with the translated VLAN. If the VLAN configured in loopback detection is the original VLAN, the switch finds that the VLAN where a loop is detected is not the original VLAN and will consider that no loop exists.

How to configure loop detection on multiple ports on S series switches
Huawei S series (except the S1700) and E series switches support MAC address flapping detection, which can detect loops on multiple interfaces. You are advised to configure MAC address flapping detection on downlink interfaces and set the action to be taken after MAC address flapping occurs in alarm-only. If a loop occurs, an alarm will be sent to eSight, facilitating location of other faults. Enable MAC address flapping detection in VLANs. MAC address flapping detection in a maximum of 32 VLANs is supported. [Huawei] vlan 3 [Huawei-vlan3] loop-detect eth-loop block-time 30 retry-times 3 The alarm information consists of the interface name, VLAN ID, flapping time, and MAC address that flaps. Alarms can be generated consecutively. #Jan 1 2008 06:53:12-08:00 Huawei L2IFPPI/4/MFLPIFRESUME:OID1.3.6.1.4.1.2011.5.25.160.3.2 Loop does not exist in vlan 3, Interface Ethernet0/0/1 resumed, block-time is 30 for mac-flapping disappeared. #Jan 1 2008 06:52:22-08:00 Huawei L2IFPPI/4/MFLPIFBLOCK:OID1.3.6.1.4.1.2011.5.25.160.3.1 Loop exist in vlan 3, Interface Ethernet0/0/1 blocked, block-time is 30 for mac-flapping, Mac Address is 00e0-fc22-765a.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top