Sticky MAC Address Persistence and Behavior
When port security is configured with sticky MAC learning, the learned MAC addresses are automatically added to the running configuration under the interface settings. These sticky MAC addresses should persist across reboots if:
- The running configuration is saved to startup configuration (using
write
orcopy running-config startup-config
) - The
switchport port-security mac-address sticky
command remains configured on the interface
Even if sticky MAC addresses are not saved, when the switch powers back on, it will automatically relearn and add the MAC address as sticky once the host reconnects, as long as the sticky configuration is present on the interface.
This provides a way to dynamically secure ports while maintaining persistence of allowed MAC addresses across system restarts.
Links
https://networklessons.com/switching/how-to-configure-port-security-on-cisco-switch