To do…
Use the command…
Remarks
Enter system view
system-view
—
Configure static or
dynamic MAC
address table
entries
mac-address
{
dynamic
|
static
}
mac
-
address
interface
interface
-
type
interface
-
number
vlan
vlan
-
id
Configure MAC
address table
entries
Configure
blackhole MAC
address table
entries
mac-address blackhole
mac
-
address
vlan
vlan
-
id
Required
Use either command.
Make sure that you
have created the VLAN
and assign the interface
to the VLAN.
Follow these steps to add or modify a MAC address table entry in interface view:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter interface view
interface
interface-type
interface-number
—
Configure a MAC address table
entry
mac
-
address
{
dynamic
|
static
}
mac
-
address
vlan
vlan
-
id
Required
Ensure that you have created the
VLAN and assign the interface to
the VLAN
Disabling MAC address learning
Sometimes, you might need to disable MAC address learning to prevent the MAC address table from
being saturated, for example, when your switch is being attacked by a large amount of packets with
different source MAC addresses.
Disabling MAC address learning on ports
After enabling global MAC address learning, you can disable the function on a single port, or on all
ports in a port group as needed.
Follow these steps to disable MAC address learning on an interface or a port group:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter Layer 2
Ethernet interface
view or Layer 2
aggregate interface
view
interface
interface-type
interface-number
Enter
interface view
or port group
view
Enter port group
view
port-group manual
port-group-name
Required
Use either command.
The configuration made in Layer
2 Ethernet or Layer 2 aggregate
interface view takes effect on the
current interface only. The
configuration made in port group
view takes effect on all the
member ports in the port group.
Disable MAC address learning on
the interface or all ports in the port
group
mac-address mac-learning
disable
Required
Enabled by default.
19