37
Default level
2: System level
Parameters
count
: Specifies the maximum number of MAC addresses that can be learned on a port, ranging from 0
to 256. When the argument takes 0, the port is not allowed to learn MAC addresses.
disable-forwarding
: Disables the device from forwarding frames with unknown source MAC addresses
after the number of learned MAC addresses reaches the upper limit. Frames with the source MAC
addresses listed in the MAC address table are forwarded.
Description
Use
mac-address max-mac-count
count
to configure the maximum number of MAC addresses that can
be learned on a port.
Use
mac-address max-mac-count disable-forwarding
to disable the device from forwarding frames with
unknown source MAC addresses after the number of learned MAC addresses reaches the upper limit.
Use
undo mac-address max-mac-count
to restore the default maximum number of MAC addresses that
can be learned on an Ethernet port.
Use
undo mac-address max-mac-count disable-forwarding
to allow the device to forward frames
received on an Ethernet port with unknown source MAC addresses after the number of learned MAC
addresses reaches the upper limit.
The default maximum number of MAC addresses that can be learned on a port is 256. When the upper
limit is reached, frames received are not forwarded by default.
Related commands:
mac-address
(system view),
mac-address
(interface view), and
mac-address timer
.
Examples
# Set the maximum number of MAC addresses that can be learned on port GigabitEthernet 1/0/1 to
200. After this upper limit is reached, frames received with unknown source MAC addresses on the port
are not forwarded.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mac-address max-mac-count 200
[Sysname-GigabitEthernet1/0/1] mac-address max-mac-count disable-forwarding
mac-address timer
Syntax
mac-address timer
{
aging
seconds
|
no-aging
}
undo mac-address timer aging
View
System view
Default level
2: System level
Parameters
aging
seconds
: Sets an aging timer for dynamic MAC address entries, ranging from 10 to 630 seconds.