cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
790
Views
0
Helpful
2
Replies

Port Security

omgjames1
Level 1
Level 1

Can you setup port security to automatically learn MAC addresses on a switch? If so, how?

2 Replies 2

sean_evershed
Level 7
Level 7

Ganesh Hariharan
VIP Alumni
VIP Alumni

Can you setup port security to automatically learn MAC addresses on a switch? If so, how?

Hi ,

Dynamic port security is great but what about when you connect switches to routers or other devices that need to be secured in a way to prevent unauthorized device swapping in the network.


There are two ways to configure a sticky port. The first way being that you configure a static MAC address when configuring port-security on a specific interface. The next way which is more convenient is to configure a “Sticky” MAC address and leave the max MAC addresses to its default value of one. When port-security is configured this way, the first MAC address learned on the switch port will be automatically statically configured into the running-configuration as if you manually specified the MAC address

switchport port-security mac-address h.h.h – This command is executed in interface configuration mode and statically sets a MAC address that allows traffic with the source MAC to traverse the switch.

switchport port-security mac-address sticky – This command is executed in interface configuration mode and configures the port to dynamically learn the MAC address and automatically configure the MAC address as a static MAC address associated with the port.

Hope to Help !!

Remember to rate the helpful post

Ganesh.H

Review Cisco Networking products for a $25 gift card