Hands-on tutorial

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

Quick answer

802.1X keeps unknown devices off your network by authenticating every device before its switch port forwards traffic. The switch (authenticator) relays EAP messages between the device (supplicant) and a RADIUS server (authentication server), which decides access and can assign a VLAN.

Roll it out in monitor mode first, use MAC authentication bypass (MAB) only for devices that cannot run 802.1X, and make sure your RADIUS server is patched against Blast-RADIUS (CVE-2024-3596).

Key terms

Supplicant
The 802.1X client on the laptop, phone or IP phone.
Authenticator
The switch or access point that controls the port.
Authentication server
The RADIUS server that checks credentials and returns the policy.
EAP-TLS
Certificate-based EAP method; the strongest common choice.
MAB
MAC authentication bypass: the switch uses the device MAC address as its identity.

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.

Last reviewed:

FAQ

Frequently asked questions

What are the three parts of 802.1X?

The supplicant (client device), the authenticator (switch or access point) and the authentication server (RADIUS).

Can RADIUS change a port's VLAN after login?

Yes. With Change of Authorization (RFC 5176, UDP 3799) the RADIUS server can re-authenticate, move or disconnect a session. See our dynamic VLAN and CoA tutorial.

Is MAC authentication secure?

MAC addresses can be spoofed, so put MAB devices in tightly restricted VLANs with ACLs.

Stuck on a step?

Ask Navijin technical support or an authorised partner for help with your configuration.