Security

switchport port-security maximum <n>

Allow at most N MAC addresses on this port.

Works on: SwitchMode: iface
Watch out

Like 'violation' and 'mac-address', this is stored but not enforced until the bare 'switchport port-security' turns the feature on.

Run this command live

Don't just read it — type switchport port-security maximum <n> 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 maximum <n>" command do?

Allow at most N MAC addresses on this port.

What's the common gotcha with "switchport port-security maximum <n>"?

Like 'violation' and 'mac-address', this is stored but not enforced until the bare 'switchport port-security' turns the feature on.

More Security commands

← Back to the full command reference