R0106-HP MSR Router Series Layer 2 - LAN Switching Command Reference(V7)
6
To drop frames with the specified destination MAC addresses, you can configure blackhole MAC
address entries.
A static or blackhole MAC address entry can overwrite a dynamic MAC address entry, but not vice
versa.
If you execute the undo mac-address command without specifying any parameters, this command
deletes all unicast MAC address entries and static multicast MAC address entries.
You can delete all the MAC address entries (including unicast MAC address entries and static multicast
MAC address entries) of the specified VLAN. You can also delete only one type (dynamic, static, or
blackhole) of MAC address entries. You can single out an interface and delete the corresponding unicast
MAC address entries, but not the corresponding static multicast MAC address entries.
The MAC address entry configuration cannot survive a reboot unless you save it. The dynamic MAC
address entries, however, are lost upon reboot whether or not you save the configuration.
Examples
# Add a static entry for MAC address 000f-e201-0101. Then, all frames that are destined for this MAC
address are sent out of interface GigabitEthernet 2/1/1, which belongs to VLAN 2.
<Sysname> system-view
[Sysname] mac-address static 000f-e201-0101 interface gigabitethernet 2/1/1 vlan 2
Related commands
• display mac-address
• mac-address (interface view)
mac-address mac-learning enable
Use mac-address mac-learning enable to enable MAC address learning on an interface.
Use undo mac-address mac-learning enable to disable MAC address learning on an interface.
Syntax
mac-address mac-learning enable
undo mac-address mac-learning enable
Default
MAC address learning is enabled.
Views
Layer 2 Ethernet interface
Predefined user roles
network-admin
Usage guidelines
To prevent the MAC address table from becoming saturated, you can disable MAC address learning.
For example, a number of packets with different source MAC addresses reaching a device can affect the
MAC address table update. To avoid such attacks, you can disable MAC address learning by following
these guidelines:
• You can disable MAC address learning on a per-interface basis. When you disable MAC address
learning on an interface, the interface then stops learning MAC addresses and cannot dynamically
update the MAC address table.