Skip to main content
PacketMentor logo
← All topics
Security Fundamentals Intermediate

802.1X: Port-Based Network Access Control

Lock every switch port until the connected device proves identity. Covers the supplicant / authenticator / auth server roles, EAPOL on the wire, and how 802.1X plugs into RADIUS for enterprise Wi-Fi and wired auth.

Quick summary
  • 802.1X authenticates devices BEFORE they can use the network: the port stays closed until the device proves identity.
  • Three roles: supplicant (the device), authenticator (the switch / AP), auth server (RADIUS).
  • Used everywhere: enterprise Wi-Fi (WPA2/3-Enterprise), wired NAC, VPN onboarding. The CCNA exam tests this.

Studying for an exam? Get a free study plan from a Cisco NetAcad instructor. 20 minutes, no card.

802.1X · supplicant ↔ authenticator ↔ auth server Supplicant PC / phone Authenticator SW1 (port locked) Auth Server RADIUS EAPOL over LAN RADIUS EAP-encapsulated Port stays "controlled" (no traffic) until supplicant authenticates successfully Authenticator just relays: never sees the actual password
802.1X locks a switch port until the connected device proves identity to the RADIUS server. The switch is just the gatekeeper, not the password-checker.

Mental model

Port security locks a port by MAC address. That works, but a MAC is easily spoofed. 802.1X is the proper answer: a device must authenticate (with credentials, a certificate, or a token) before the switch port will pass any traffic.

The switch port is split into two virtual ports:

  • Uncontrolled port: always passes 802.1X authentication traffic (EAPOL)
  • Controlled port: stays unauthorized until authentication succeeds, then normal traffic flows.

Plug in an unauthorized device → the controlled port stays unauthorized → no DHCP, no anything. Plug in an authorized device → it authenticates → the port opens.

That’s the whole concept. The rest is the protocol mechanics.

Three roles

Role What it is In a typical deployment
Supplicant The device trying to connect, provides credentials Laptop, phone, IP camera
Authenticator The network device controlling the port Cisco switch (wired) or AP/WLC (wireless)
Authentication Server Validates the credentials, decides yes/no RADIUS server (Cisco ISE, FreeRADIUS, Microsoft NPS)

The authenticator is just the gatekeeper. It relays messages but never sees the actual password. This is important for security: an attacker compromising a switch can’t extract user credentials from it.

Supplicant  ←EAPOL→  Authenticator  ←RADIUS→  Auth Server
   (laptop)             (switch)            (FreeRADIUS)
  • EAPOL (EAP over LAN), between the device and the switch. Layer 2 only.
  • RADIUS: between the switch and the auth server. Layer 3 (UDP).

The switch acts as a translator: takes EAPOL frames from the supplicant, repackages the contents into RADIUS messages for the server, and reverses on the way back.

EAP methods you’ll see

EAP is a framework that supports many authentication methods. Common ones:

Method Auth type Used for
EAP-TLS Mutual certificates The gold standard. Strongest auth, hardest to deploy.
PEAP Server cert + username/password inside a TLS tunnel Most common in enterprises (especially with AD)
EAP-FAST Protected Access Credential (PAC); server cert optional Cisco’s replacement for LEAP
EAP-MD5 Username + MD5-hashed password Legacy. Don’t use.
EAP-MSCHAPv2 Inside PEAP/EAP-FAST The actual credential check used inside PEAP

For a Windows / Active Directory environment, the standard combo is PEAP-MSCHAPv2: domain credentials authenticate, all carried over a TLS tunnel that the supplicant verifies via the server’s certificate.

Commands: wired 802.1X on a Cisco switch

! Enable AAA and point to RADIUS
SW1(config)# aaa new-model
SW1(config)# radius server CORP-RAD
SW1(config-radius-server)# address ipv4 10.0.99.5 auth-port 1812 acct-port 1813
SW1(config-radius-server)# key supersecret123

SW1(config)# aaa group server radius RADGROUP
SW1(config-sg-radius)# server name CORP-RAD

SW1(config)# aaa authentication dot1x default group RADGROUP
SW1(config)# aaa authorization network default group RADGROUP

! Globally enable 802.1X
SW1(config)# dot1x system-auth-control

! On each access port
SW1(config)# interface GigabitEthernet0/5
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10              ! the "authorized" VLAN
SW1(config-if)# authentication port-control auto       ! the magic line
SW1(config-if)# dot1x pae authenticator

authentication port-control auto means: start in unauthorized state, only let the device in after successful 802.1X auth.

Three port-control modes

Mode Behavior
auto Standard 802.1X: port stays closed until auth succeeds
force-authorized Port stays open regardless. Default. Same as no 802.1X.
force-unauthorized Port stays closed forever. Used to lock a port.

Verification

SW1# show authentication sessions
SW1# show authentication sessions interface GigabitEthernet0/5
SW1# show dot1x interface GigabitEthernet0/5
SW1# debug dot1x events                  ! while troubleshooting only

show authentication sessions lists every authenticated device on every port, user, MAC, VLAN, auth method, session ID. The big picture in one command.

Guest / failure handling

What if 802.1X fails (no supplicant, wrong creds, RADIUS server down)? Three common options:

! Guest VLAN: fall through to a restricted VLAN if no supplicant responds
SW1(config-if)# authentication event no-response action authorize vlan 99

! Auth-fail VLAN: different VLAN for devices that try and fail
SW1(config-if)# authentication event fail action authorize vlan 100

! Critical auth: if RADIUS server unreachable, allow the device into a fallback VLAN
SW1(config-if)# authentication event server dead action authorize vlan 50

Use these carefully: they’re escape hatches. An attacker who knows about the guest VLAN can simply not respond and get network access.

Common mistakes

  1. Forgetting aaa new-model. Without it, none of the 802.1X commands work.

  2. No RADIUS server, then enabling 802.1X. Devices try to authenticate, can’t, get nothing. Always test RADIUS reachability before enabling on production ports.

  3. Forgetting to set the port to access mode. 802.1X works on access ports. Trunk ports use other mechanisms.

  4. Locking yourself out of management. Don’t enable 802.1X on management VLANs without a way back in. Always keep a console / OOB management path during rollout.

  5. No fallback for non-supplicant devices. Older printers and IoT devices can’t speak 802.1X. Use MAB (MAC Authentication Bypass) as a fallback: the switch sends the MAC to the RADIUS server, which whitelists it. Less secure than 802.1X but works for devices that can’t authenticate.

  6. Using EAP-MD5 in production. Trivially broken. Always pick PEAP, EAP-TLS, or EAP-FAST.

  7. Skipping the certificate validation step on PEAP clients. Without server cert validation, a man-in-the-middle attacker can spoof the RADIUS server and harvest credentials. Always deploy the correct CA cert to clients.

Lab to try tonight

  1. Set up FreeRADIUS with one test user.
  2. On a Cisco switch, configure AAA + RADIUS pointing to your FreeRADIUS server.
  3. Enable dot1x system-auth-control globally + authentication port-control auto on one access port.
  4. On a Windows / Linux laptop, configure an 802.1X supplicant with PEAP + your test credentials.
  5. Plug in. Watch show authentication sessions show the device move from “Authenticating” to “Authorized.”
  6. Try with wrong credentials → port stays unauthorized.
  7. Try with no supplicant configured → port stays unauthorized.
  8. Bonus: add MAB fallback for non-supplicant devices: mab plus authentication order dot1x mab on the interface. Verify a non-802.1X device authenticates by MAC.

Cheat strip

Concept Plain English
802.1X Authenticate the device BEFORE giving it network access
Supplicant The device trying to connect
Authenticator The switch / AP that gates the port
Auth server RADIUS: actually checks credentials
EAPOL Layer-2 protocol between supplicant and authenticator
RADIUS Layer-3 protocol between authenticator and server
EAP-TLS Mutual certs. Strongest, hardest.
PEAP TLS tunnel + username/password inside. Most common.
MAB MAC-based fallback for devices that can’t speak 802.1X
Guest VLAN Fallback for unauthenticated devices
port-control auto The magic line that turns on 802.1X enforcement

How 802.1X shows up on US network engineer interviews in 2026

Three questions keep coming up with US employers running Cisco ISE or Microsoft NPS as the RADIUS back-end:

  1. “A client plugs in but the switch port never authorizes. What are the first two commands you run?”
  2. “You have an IoT printer that cannot do EAP. Describe your fallback.”
  3. “Your WPA2-Enterprise clients keep failing. The RADIUS server is up. Where do you look first?”

For #1 the two commands are show authentication sessions interface <port> details and show dot1x interface <port> details. Read the method status for dot1x and MAB: if dot1x never gets an answer, the supplicant is silent (no 802.1X client on the device); if it shows a failure, RADIUS answered no.

For #2 the answer is MAB (MAC Authentication Bypass). Configured with mab under the interface AND the authentication order (authentication order dot1x mab). The exam loves this.

For #3 look at the RADIUS attribute User-Name on the server side. Nine times in ten the certificate CN does not match what the switch sent, usually because the Windows supplicant is sending the UPN instead of the SAM account name, or vice versa.

US employers paying $80K to $110K for a network engineer who can run their wired NAC rollout will test two things: can you read a show authentication sessions output, and can you explain Cisco’s three deployment modes: monitor mode, low-impact mode and closed mode. Memorize those three.

FAQ

What is dot1x?

Dot1x is short for IEEE 802.1X, the standard for port-based network access control. A switch port stays closed to normal traffic until the device on it proves who it is to a RADIUS server, usually Cisco ISE. Only EAP authentication traffic is allowed before that.

What does authentication port-control auto do?

It turns 802.1X on for the port. With auto the port starts unauthorized and opens only after the device authenticates. The other values are force-authorized (the default: the port is always open and 802.1X is effectively off) and force-unauthorized (the port never opens).

Is 802.1X the same as NAC?

802.1X is one building block of NAC (network access control). NAC is the whole system that decides who and what may connect: 802.1X for devices that can authenticate, MAB for devices that cannot (printers, cameras), and policies on a server such as Cisco ISE that assign a VLAN or a downloadable ACL after login.

Is 802.1X the same as port security?

No. Port security only limits which MAC addresses may use a port, and MAC addresses are easy to fake. 802.1X checks a user or device identity with a RADIUS server before the port opens.

Does 802.1X need certificates on every client?

For EAP-TLS yes (mutual certs). For EAP-PEAP or EAP-FAST only the server needs a cert; clients use a username and password. Most US enterprises start with PEAP for the Windows fleet and migrate to EAP-TLS as they get Entra ID (Azure AD) cert auto-enrollment working.

Can I run 802.1X alongside port security?

Yes but it is unusual. 802.1X supersedes port security on the same port: once a device authenticates, 802.1X owns the port. Keep port security on legacy ports that are not yet 802.1X-enrolled. Related: port security topic.

What is MAB and when do I use it?

MAC Authentication Bypass. The switch sends the device MAC as if it were a username, and RADIUS matches it against a known list. Use it for printers, cameras, and VoIP phones that cannot do EAP. Always configure MAB as a FALLBACK after dot1x, not as the primary.

Does 802.1X work on access points?

The AP (if autonomous) can be a supplicant to a wired switch upstream (then the switch is the authenticator). Separately, WPA2/3-Enterprise is 802.1X over Wi-Fi where the AP or WLC is the authenticator. The exam asks both.

Master this on a real network

Want this drilled into reflex?

1:1 weekly sessions, live feedback on your labs, and US interview prep: built around the CCNA® exam blueprint. Free first session. No card on file until you decide.

Claim my free session →
Free first session

Stuck on 802.1X: Port-Based Network Access Control?

Walk your plan with a Cisco NetAcad instructor in a free 20 minute call. We find the one thing blocking you and name the next step. No card. No pitch.

  • 20 minutes, 1:1 with a Cisco NetAcad instructor
  • No card, no obligation, no sales pitch
  • You pick the slot that fits your week
Book free session
Free first session

Get your study plan in a free 20-minute call

  • ✓ 1:1 with a senior network engineer, by video
  • ✓ You leave with a written study plan and a realistic exam date
  • ✓ No card, no sign-up, no sales pitch