port-security mac-address dynamic
Syntax
port-security mac-address dynamic
undo port-security mac-address dynamic
View
Layer 2 Ethernet interface view
Default level
2: System level
Parameters
None
Description
Use port-security mac-address dynamic to enable the dynamic secure MAC function. This function converts sticky MAC addresses to dynamic, and disables saving them to the configuration file.
Use undo port-security mac-address dynamic to restore the default.
By default, sticky MAC addresses can be saved to the configuration file, and once saved, survive a device reboot.
After you execute the port-security mac-address dynamic command on a port, you cannot manually configure sticky MAC address, and secure MAC addresses automatically learned by the port in autoLearn mode are also dynamic. All dynamic MAC addresses are lost at reboot. Use this command when you want to clear all sticky MAC addresses after a device reboot.
After you execute the undo port-security mac-address dynamic command on a port, all dynamic secure MAC addresses on the port are converted to sticky MAC addresses, and you can manually configure sticky MAC address.
You can display dynamic secure MAC addresses by using the display port-security mac-address security command.
Related commands: display port-security mac-address security, mac-address dynamic.
Examples
# Enable the dynamic secure MAC function on interface Ethernet 1/0/1.
<Sysname> system-view [Sysname] interface ethernet1/0/1 [Sysname-Ethernet1/0/1] port-security mac-address dynamic