In other words, when you want to manually configure a MAC address on a port, you use switchport port-security mac-address īut when you want the switch to automatically learn the first MAC seen on a port and remember that (even if there is no traffic seen from that MAC for a long time), then you use: switchport port-security mac-address stickyĪnd after the swich learns a MAC address, you will see that it has automatically added: switchport port-security mac-address sticky nnnn.nnnn.
#How to set dynamic mac address learning in cisco software
(source: Catalyst 4500 Series Switch Cisco IOS Software Configuration Guide, 12.2(20)EWA - emphasis is mine) Sticky learning was enabled, to sticky secure MAC addresses. CLI Book 1: Cisco ASA Series General Operations CLI Configuration Guide. MAC addresses, including those that were dynamically learned before About ARP Inspection and the MAC Address Table, page 1 Default Settings. You enter this command, the interface converts all the dynamic secure A really simple method to deal with this issue is to manually configure entries in the MAC address table, a static entry will always overrule dynamic. To enable sticky learning,Įnter the switchport port-security mac-address sticky command.
Sticky secure MAC addresses and to add them to the runningĬonfiguration by enabling sticky learning. You can configure an interface to convert the dynamic MAC addresses to Verify port security is enabled and the MAC addresses of PC1 and PC2 were added to the running configuration with show run command.
Manually configured, it is not recommended. Try to test your switch port security configuration with ping command and testing with the rogue laptop on the lab. The MAC address table is a way to map each port to a MAC address. Each host connecting to a switch port will have its MAC address entered into the switch’s MAC address table. Whether 1 Gbps or 10 Gbps Ethernet ports, MAC address learning is performed the same way. If these addresses are saved in theĬonfiguration file, the interface does not need to dynamically relearn We don’t think much about connecting our hosts to a Cisco switch. Learned or manually configured, stored in the address table, and added You can configure MAC addresses to be sticky. While you can manually configure a sticky address, it is not usually used that way (and in fact Cisco recommends against it):