Preventing MAC Address Flapping Between Interfaces with the Same Priority
Context
Preventing MAC address flapping between interfaces with the same priority can improve network security.
If the switch is configured to prevent MAC address flapping between interfaces with the same priority, the following problem may occur: If the network device (such as a server) connected to an interface of switch is powered off and the same MAC address is learned on another interface, the switch cannot learn the correct MAC address on the original interface after the network device is powered on.
Procedure
- Run:
system-view
The system view is displayed.
- Run:
undo mac-learning priority priority-id allow-flapping
The device is configured to prevent MAC address flapping between interfaces with the same priority.
By default, the device allows MAC address flapping between interfaces with the same priority.
- Run:
mac-learning priority flapping-defend action discard
The switch is configured to discard packets when the switch is configured to prohibit MAC address flapping.
By default, the action is forward when the switch is configured to prohibit MAC address flapping.