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 →Private 5G vs Wi-Fi for Enterprises: Which Wireless Technology Fits?
Compare private cellular networks and enterprise Wi-Fi for factories, ports, campuses and warehouses: coverage, mobility, device support, spectrum, cost and when to combine both.
Read more →Warehouse and Logistics Network Design: Scanners, Cameras and Automation
How to design networks for warehouses and logistics centres: Wi-Fi for scanners and vehicles, outdoor yards and docks, CCTV, industrial switches for automation, and resilience.
Read more →What Is ARP? How Devices Find Each Other on a Local Network
ARP explained: how devices map IP addresses to MAC addresses on a LAN, ARP tables and caches, gratuitous ARP, ARP spoofing attacks and how dynamic ARP inspection protects you.
Read more →Need help designing your network?
Navijin engineers provide free design consultations, bills of materials and quotations for business projects.