A sticky secure MAC address combines dynamic learning with static persistence: the switch learns the address automatically, stores it in the running configuration, and retains it when the port goes down. section 12.2.3
Sticky learning provides these operational rules:
- Enable it per port with switchport port-security mac-address sticky in interface configuration mode. section 12.2.3
- Convert all current and future dynamically learned secure MAC addresses on the port into running-configuration entries. section 12.2.3
- Do not age sticky secure MAC addresses out; disabling sticky learning converts them back to dynamic addresses. section 12.3
Configure and inspect sticky learning
SW1(config)# interface f0/1 SW1(config-if)# switchport port-security mac-address sticky SW1(config-if)# do show running-config The configuration displays the sticky-learning command and any learned sticky MAC address, such as switchport port-security mac-address sticky 00e0.4c68.92ff. section 12.2.3
SW1(config)# interface f0/1 SW1(config-if)# switchport port-security mac-address sticky #1 SW1(config-if)# do show running-config . . . interface FastEthernet0/1 switchport mode access switchport port-security mac-address sticky switchport port-security mac-address sticky 00e0.4c68.92ff #2 switchport port-security #1 Enables sticky secure MAC address learning #2 A sticky secure MAC address was added to the running-config.
Browse the annotated Cisco IOS configuration showing sticky learning and an automatically added secure MAC address. section 12.2.3
