Security

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.

Works on: SwitchMode: iface
Watch out

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.

Run this command live

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.

Open the lab

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.

More Security commands

← Back to the full command reference

switchport port-security violation {shutdown|restrict|protect} — network CLI command reference · NetForge-AI