Security · 4 min read · 19 November 2026
What Is Port Security on a Switch? Stop Unknown Devices From Connecting
Switch port security explained: limiting MAC addresses per port, sticky learning, violation modes (protect, restrict, shutdown), when to use it and how it compares with 802.1X.
Port security limits which and how many devices can use a switch port, based on MAC address. If an unknown device connects, the switch can drop its traffic, log the event or shut the port down.
How it works
- Maximum MAC addresses: for example one per desk port, two where a phone has a PC behind it.
- Sticky learning: the switch remembers the first devices it sees and saves them to the configuration.
- Violation modes: protect (drop silently), restrict (drop and log), shutdown (disable the port until an admin resets it).
Port security vs 802.1X
| Port security | 802.1X / NAC | |
|---|---|---|
| Identifies | MAC address (can be spoofed) | User or device credentials |
| Needs a server | No | Yes (RADIUS) |
| Dynamic VLANs | No | Yes |
| Effort | Low | Higher |
Port security is a quick, effective control for cameras, printers and fixed devices; 802.1X is stronger for user devices. Hands-on: port security and MAC limiting.
FAQ
Frequently asked questions
Will port security break IP phones?
Not if you allow enough MAC addresses for the phone and the PC behind it.
What happens when a camera is replaced?
Its MAC changes; clear the old sticky address or the port will block the new camera.
Can attackers bypass it?
By copying an allowed MAC address. Combine with 802.1X or monitoring for stronger protection.
Related
Keep reading
Port security and MAC limiting
Read more →What is NAC?
Read more →Secure meeting room ports
Read more →Will My Network Keep Working if Cloud Management Goes Down?
Cloud management is convenient, but the network must not depend on it. What should keep working during a cloud outage, what pauses, and what to check when you choose equipment.
Read more →NOC vs SOC: What Is the Difference and Do You Need Both?
A NOC keeps the network running; a SOC keeps attackers out. Compare their goals, tools, alerts and metrics, and see how small and mid-size organisations can combine them.
Read more →The CIA Triad in Practice: Confidentiality, Integrity and Availability on Real Networks
Confidentiality, integrity and availability are the base of information security. See what each one means for switches, Wi-Fi, gateways and cameras, with practical controls for each.
Read more →Need help designing your network?
Navijin engineers provide free design consultations, bills of materials and quotations for business projects.