09-08-2023 02:10 AM
I've set up multiple interfaces (both access & trunk) on a switch with sticky learning like this:
switchport port-security maximum 10
switchport port-security mac-address sticky
switchport port-security
The trunk interfaces also run 8 VLANs.
The switch has learned 5 MAC addresses.
How can I now turn off sticky learning WITHOUT losing the already learned addresses?
Ideally, I want to turn it off and write the learned MACs to the startup-config.
"no switchport port-security mac-address sticky" deletes all the learned MACs.
What I'm trying to achieve (this isn't my idea of port-security but what the customer explicitly wants…):
Turn on port-security with sticky learning. Give the whole system an hour to learn all trustworthy MACs.
After one hour, have a PEBKAC user turn off learning and have a system with "static" MAC port-security going forward.
09-08-2023 02:55 AM
Personallu i will add stick mac address you want to retain in the learned on dynamically to static and remove dynamic sticky option.
switchport port-security mac-address sticky XXX1
switchport port-security mac-address sticky XXX2
09-08-2023 03:45 AM
Thanks for your answer.
This again would add the address as a "sticky" MAC - right?
And they would be deleted after "no switchport port-security mac-address sticky".
Wouldn't you want to do "switchport port-security mac-adress a.b.c" instead?
That way the addresses should be retained after "no switchport port-security mac-address sticky".
09-08-2023 10:52 AM
switchport port-security mac-address sticky - Dynamically learning
switchport port-security mac-address sticky xxx - you configuring statically only allowed in that port.
ouldn't you want to do "switchport port-security mac-adress a.b.c" instead?
yes that can be also used - If you enable sticky learning after you enter this command, the secure addresses that were dynamically learned are converted to sticky secure MAC addresses and are added to the running configuration.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide