Tutorials · Security
How to Lock Down Switch Ports With Port Security and Storm Control
Limit MAC addresses per port, block unauthorised devices, stop broadcast storms and disable unused ports: a practical access-layer hardening guide.
Before you start
- Managed access switches
- A port map showing what is connected where
Step by step
Shut unused ports
Every unused port is an open door. Disable them and move them to an unused VLAN.
interface range gigabitEthernet 0/30-48 switchport access vlan 999 shutdown
Limit MAC addresses per port
A desk normally needs one or two MACs (phone + PC). Limit it so a hidden switch cannot be plugged in.
interface range gigabitEthernet 0/1-24 switchport port-security switchport port-security maximum 2
Choose the violation action
'restrict' drops traffic and logs; 'shutdown' disables the port until an admin re-enables it. Use shutdown in high-security areas.
switchport port-security violation restrictUse sticky learning for fixed devices
For cameras and printers, let the switch learn and save the current MAC.
switchport port-security mac-address stickyEnable storm control
Cap broadcast and multicast so one faulty device cannot flood the network.
storm-control broadcast level 5 storm-control multicast level 10
Protect against loops
Combine with BPDU guard on edge ports (see the spanning-tree tutorial).
Monitor violations
Send port-security and storm-control events to syslog and review them weekly.
show port-security show storm-control
Commands are generic, industry-standard examples. Exact syntax and menu names vary by model and firmware; check your device's manual on the Documentation page.
Pro tips
- Label every port physically and in your documentation.
- For larger estates, 802.1X gives stronger control than MAC limits.
FAQ
Frequently asked questions
Can port security stop MAC spoofing?
Not completely, since MACs can be copied. It stops casual misuse; use 802.1X for strong authentication.
Keep learning
Related guides
802.1X port authentication
Read more →Spanning tree and BPDU guard
Read more →How to Enable 802.1X Port Authentication on Switches
Stop unknown devices from using your network ports: configure 802.1X with RADIUS and MAC-authentication bypass for printers and cameras.
Read more →How to Secure the Management of Switches, Routers and Access Points
A hardening checklist for every network device: strong credentials, SSH only, a management VLAN, access lists and logging.
Read more →How to Segment IoT and CCTV Devices From Your Main Network
Put cameras, smart TVs, sensors and building systems in their own VLANs so one compromised device cannot reach your business systems.
Read more →Stuck on a step?
Ask Navijin technical support or an authorised partner for help with your configuration.