switchport port-security violation {shutdown|restrict|protect}
What happens when a MAC the port doesn't allow sends a frame. shutdown (default) err-disables the port until 'shutdown' + 'no shutdown'; restrict drops and counts it; protect drops silently.
Enforced live: once 'maximum' addresses are known (learned, sticky or pinned) any other sender is refused. 'show port-security interface <id>' shows the violation count and the last offending address.
Don't just read it — type switchport port-security violation {shutdown|restrict|protect} in a real network simulator in your browser and watch it take effect. No install, no account needed to start.
Frequently asked
What does the "switchport port-security violation {shutdown|restrict|protect}" command do?
What happens when a MAC the port doesn't allow sends a frame. shutdown (default) err-disables the port until 'shutdown' + 'no shutdown'; restrict drops and counts it; protect drops silently.
What's the common gotcha with "switchport port-security violation {shutdown|restrict|protect}"?
Enforced live: once 'maximum' addresses are known (learned, sticky or pinned) any other sender is refused. 'show port-security interface <id>' shows the violation count and the last offending address.