Example for Configuring Loopback Detection
Networking Requirements
As shown in Figure 13-3, if there is a loop on the network connected to the 10GE1/0/1 interface, broadcast storms will occur on the Switch or even the entire network.
To detect loops on the network connected to the switch and disabled downlink interfaces to reduce impacts on the switch and other networks, enable loopback detection on the Switch.
Configuration Roadmap
The configuration roadmap is as follows:
- Enable loopback detection on the interface to detect loops on downlink networks.
- Specify the VLAN ID for loopback detection packets.
- Set loopback detection parameters to enable the interface automatic recovery.
Procedure
- Enable loopback detection on the interface.
<HUAWEI> system-view [~HUAWEI] sysname Switch [*HUAWEI] commit [~Switch] interface 10ge 1/0/1 [~Switch-10GE1/0/1] loopback-detect enable [*Switch-10GE1/0/1] commit [~Switch-10GE1/0/1] quit
- Specify the VLAN ID for loopback detection packets.
[~Switch] vlan 100 [*Switch-vlan100] quit [*Switch] interface 10ge 1/0/1 [*Switch-10GE1/0/1] port link-type trunk [*Switch-10GE1/0/1] port trunk allow-pass vlan 100 [*Switch-10GE1/0/1] loopback-detect vlan 100 [*Switch-10GE1/0/1] commit [~Switch-10GE1/0/1] quit
- Set loopback detection parameters.
# Configure the action the interface when a loopback is detected.
[~Switch] loopback-detect action error-down [*Switch] commit
# Set the interval between sending loopback detection packets.
[~Switch] loopback-detect transmit interval 10 [*Switch] commit
- Check the configuration.
Run the display loopback-detect command to check the configuration.
[~Switch] display loopback-detect ------------------------------------------------------------ Loopback-detect transmit interval: 10s ------------------------------------------------------------ ------------------------------------------------------------ Interface Action Status ------------------------------------------------------------ 10GE1/0/1 Error-Down ErrorDown