Tutorials · Security

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.

Advanced18 min6 steps

Before you start

  • Managed switches with 802.1X support
  • A RADIUS server
  • A test port and a test laptop

Step by step

  1. Point the switch to RADIUS

    radius-server host 10.99.0.20 key <shared-secret>
    aaa authentication dot1x default group radius
    
  2. Enable 802.1X globally

    dot1x system-auth-control
    
  3. Enable it on access ports

    Start with a few ports in monitor mode if your switch supports it.

    interface range gigabitEthernet 0/1-20
     dot1x port-control auto
    
  4. Handle devices without 802.1X

    Use MAC authentication bypass (MAB) for printers, phones and cameras, and place them in restricted VLANs.

    interface gigabitEthernet 0/21
     mab
    
  5. Assign VLANs from RADIUS

    Return the VLAN in the RADIUS reply so staff, contractors and IoT land in the right network.

  6. Verify

    show dot1x all
    

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

  • Roll out in phases: monitor first, then enforce.
  • Keep a guest or remediation VLAN for devices that fail authentication.
How to Enable 802.1X Port Authentication on Switches | Navijin Tutorials