I have a Cisco 3850 that has desktops and printers port secured by MAC address, I need to replace the desktops and printers.
What commands can I use for no port security, then replace the desktops and printers, then port secure by the new MAC adresse's?
I would first do
show run [interface interface_id]
show port-security [interface interface_id]
to see how port-security is already configured. It's important to note what is already configured .. sticky, max, violation, secure addresses ..
have a look at this document -
no switchport port-security to return the interface to the default condition as not a secure port
change the mac-address in the interface config and copy/paste
hope this helps
Close this, I was expecting an more mature answer I found at another site, come on guys!
Remove Old MAC Address
no switchport port-security
no switchport port-security mac-address sticky
no switchport port-security mac-address sticky 0023.044b.75b0 (Current MAC)
Add New MAC Address
switchport port-security mac-address sticky
switchport port-security mac-address sticky 0023.044b.75b0 (Whatever new MAC)
If you have not configured static or sticky MAC addresses, there is nothing to be done, just connect your new devices and the switch will learn the new "secure" MAC addresses. However, if you have used static, you would have to remove those MAC address from each port configuration, and manually configure the new ones; if you used sticky, shutdown the port, remove the sticky MAC addresses, connect the new devices, and reactive the port.