Layer 2 | 625
mac learning-limit mac-address-sticky
Using sticky MAC addresses allows you to associate a specific port with MAC addresses from trusted
devices. If sticky MAC is enabled, the specified port will retain any dynamically-learned addresses and
prevent them from being transferred or learned on other ports.
If
mac-learning-limit is configured and sticky MAC is enabled, all dynamically-learned addresses are
converted to sticky MAC addresses for the selected port. Any new MAC addresses learned on this port will
be converted to sticky MAC addresses.
To save all sticky MAC addresses into a configuration file that can be used as a startup configuration file,
use the
write config command. If the number of existing MAC addresses is fewer than the configured mac
learn limit, any additional MAC addresses will be converted to sticky MACs on that interface. To remove
all sticky MAC addresses from the running config file, disable sticky MAC and use the
write config
command.
When sticky mac is enabled on an interface, dynamically-learned MAC addresses will not age, even if
mac-learning-limit dynamic is enabled. If mac-learning-limit and mac-learning-limit dynamic are configured
and sticky MAC is disabled, any dynamically-learned MAC addresses will age.
mac learning-limit station-move
mac learning-limit station-move is available only on platforms: c s z
The station-move option, allows a MAC address already in the table to be learned off of another interface.
For example, if you disconnect a network device from one interface and reconnect it to another interface,
the MAC address is learned on the new interface. When the system detects this “station move,” the system
clears the entry learned on the original interface and installs a new entry on the new interface.
Learning Limit Violation Actions
Learning Limit Violation Actions are supported only on platforms: e .
You can configure the system to take an action when the MAC learning limit is reached on an interface and
a new address is received using one of the following options with the
mac learning-limit command:
Task Command Syntax Command Mode
Generate a system log message when the MAC learning
limit is exceeded.
learn-limit-violation log
INTERFACE
Shut down the interface and generate a system log
message when the MAC learning limit is exceeded.
learn-limit-violation shutdown
INTERFACE