How to configure MAC address flapping detection


To configure MAC address flapping detection, use this following method.
[HUAWEI-vlan10] loop-detect eth-loop alarm-only
In V200R001 and later versions, run the following command in the system view to enable MAC address flapping detection.
[HUAWEI] mac-address flapping detection
This function is enabled by default.

Other related questions:
Does the switch support MAC-FLAPPING detection
MAC-FLAPPING detection indicates detection of MAC address flapping. The S2700 does not support any modes of MAC-FLAPPING detection. The S2750, S3700, S5700, or S6700 switch supports VLAN-based MAC-FLAPPING detection. The VLAN-based MAC-FLAPPING detection function is disabled by default. Flapping actions can be enabled through command configuration. The actions include blocking ports, blocking MAC addresses, or only reporting alarms after the flapping. For example, configure the command as follows to enable the MAC address flapping detection on VLAN10. In this detection, the action is block with 10s block duration and three attempt times. [HUAWEI] loop-detect eth-loop alarm-only [HUAWEI] vlan 10 [HUAWEI-vlan10] loop-detect eth-loop block-time 10 retry-times 3 In V200R001 and later versions, the switches support globally enabled MAC-FLAPPING detection. The configuration command is as follows: [HUAWEI] mac-address flapping detection Run the mac-address flapping detection in the system view.

How to solve MAC address flapping on S series switch
Firstly, check whether a loop occurs on the network. Secondly, use one of the following methods to prevent MAC address flapping: 1. Run the mac-address static mac-address command in the system view to configure static MAC addresses on an interface. 2. Configure the MAC address learning priority on an interface. That is, run the mac-learning priority priority-id command in the interface view on modular switches or S5720HI, S6720EI, and S5720EI fixed switches or run the mac-spoofing-defend enable command in the interface view on S5700LI, S5700S-LI, S5710-X-LI, S2750EI, S5720S-SI, and S5720SI fixed switches. After different MAC address learning priorities are configured for interfaces, only the MAC address entry learned by a high-priority interface can overwrite that learned by a low-priority interface if different interfaces have learned the same MAC address entry. This prevents MAC address flapping. Note that SA cards of modular switches do not support the MAC address learning priority configuration. You can run the undo mac-learning priority priority-id allow-flapping command in the system view to prohibit MAC address flapping between interfaces with the same priority.

After an interface on a CE switch becomes Up during the aging time, will the switch still detect MAC address flapping during the remaining aging time
The default aging time of flapped MAC addresses is 300 seconds. You can run the error-down auto-recovery cause mac-address-flapping interval interval-value command to configure it. After the command is executed, if MAC address flapping stops and the interface becomes Up after the delay, the CE switch no longer detects MAC address flapping during the remaining aging time. This is because the aging time does not expire. If detection on MAC address flapping is required, it is recommended that the delay for an interface to automatically become Up be set greater than the aging time of flapped MAC addresses.

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