I have come across link flapping protection feature recently. It is available on S5700 switches. It looks like it is a new feature on Huawei switches. I had not met it in older hardware versions. That’s why I decided to write a few words about it. Unfortunatelly, although this command is available in Huawei network simulator eNSP, it does not work properly. But maybe you will have possibility check it on your real devices.
Port flapping (port going UP and DOWN continually) can be caused by a faulty cable, link failure, active/standby switchover, port hardware failure, etc. Frequent status changes on an interface can lead to:
- STP topology recalculation and changes,
- ARP entries updates,
- dynamic routing instability and convergence problems.
All these issues can negatively affect switch performance and should be avoided.
Link Flapping Protection is a feature that can be implemented on an interface to solve problems caused by the flapping port or link. It checks the interface flapping frequency and link flapping detection interval. If the number of interface flapping times reaches the limit, in a specified period, the interface is shut down.
How to configure Link Flapping Protection? Please see below:
<labnarioSW1>sys Enter system view, return user view with Ctrl+Z. [labnarioSW1]int e0/0/1 [labnarioSW1-Ethernet0/0/1]port link-flap protection enable
By default this functionality is disabled on the interface. When enabled, default link flapping interval is set to 10 seconds and the number of flapping events is set to 5. This can be easily changed using the following commands:
[labnarioSW1-Ethernet0/0/1]port link-flap threshold 6 [labnarioSW1-Ethernet0/0/1]port link-flap interval 18
To bring the interface back to UP state, manual interface undo shutdown command is required or automatic error-down auto-recovery feature, described a few weeks ago.