mac-address mac-learning priority
Use mac-address mac-learning priority to assign MAC learning priority to an interface.
Use undo mac-address mac-learning priority to restore the default.
Syntax
mac-address mac-learning priority { high | low }
undo mac-address mac-learning priority
Default
Low MAC address learning priority is used.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view
Predefined user roles
network-admin
Parameters
high: Assigns high MAC learning priority.
low: Assigns low MAC learning priority.
Usage guidelines
The MAC address learning priority values can be high and low. An interface with high MAC address learning priority can learn any MAC address. An interface with low MAC address learning priority can learn only the MAC addresses that have not been learned by high-priority interfaces.
The MAC learning priority mechanism can help defend your network against MAC address spoofing attacks. To prevent the downlink interface from learning the MAC address of an upper layer device (for example, the gateway), you can perform the following tasks:
Assign high MAC learning priority to an uplink interface.
Assign low MAC learning priority to a downlink interface .
Examples
# Assign high MAC learning priority to interface Ten-GigabitEthernet 1/0/1.
<Sysname> system-view [Sysname] interface ten-gigabitethernet 1/0/1 [Sysname-Ten-GigabitEthernet1/0/1] mac-address mac-learning priority high
# Assign high MAC learning priority to interface Bridge-Aggregation 1.
<Sysname> system-view [Sysname] interface bridge-aggregation 1 [Sysname-Bridge-Aggregation1] mac-address mac-learning priority high