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.
- 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.
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.
The protocols at each link
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
-
Forgetting
aaa new-model. Without it, none of the 802.1X commands work. -
No RADIUS server, then enabling 802.1X. Devices try to authenticate, can’t, get nothing. Always test RADIUS reachability before enabling on production ports.
-
Forgetting to set the port to access mode. 802.1X works on access ports. Trunk ports use other mechanisms.
-
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.
-
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.
-
Using EAP-MD5 in production. Trivially broken. Always pick PEAP, EAP-TLS, or EAP-FAST.
-
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
- Set up FreeRADIUS with one test user.
- On a Cisco switch, configure AAA + RADIUS pointing to your FreeRADIUS server.
- Enable
dot1x system-auth-controlglobally +authentication port-control autoon one access port. - On a Windows / Linux laptop, configure an 802.1X supplicant with PEAP + your test credentials.
- Plug in. Watch
show authentication sessionsshow the device move from “Authenticating” to “Authorized.” - Try with wrong credentials → port stays unauthorized.
- Try with no supplicant configured → port stays unauthorized.
- Bonus: add MAB fallback for non-supplicant devices:
mabplusauthentication order dot1x mabon 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:
- “A client plugs in but the switch port never authorizes. What are the first two commands you run?”
- “You have an IoT printer that cannot do EAP. Describe your fallback.”
- “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.
AAA · RADIUS & TACACS+
AAA (authentication, authorization and accounting) explained: RADIUS vs TACACS+, method lists, and why networks over 5 devices use centralized auth.
VPN Basics: IPsec & SSL
How two separated networks (or one user and a network) can talk privately over the public internet. Covers site-to-site IPsec, remote-access SSL/TLS VPNs, IKE phases, and what 'tunnel' actually means.
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.
Related topics
AAA · RADIUS & TACACS+
AAA (authentication, authorization and accounting) explained: RADIUS vs TACACS+, method lists, and why networks over 5 devices use centralized auth.
Security FundamentalsPort Security
Lock a switch port to a specific MAC address (or addresses). Covers static, dynamic, and sticky learning, violation modes (protect / restrict / shutdown), and the err-disable recovery dance.
WirelessWireless LAN Basics
CCNA Wi-Fi fundamentals: SSID, BSS, ESS and BSSID, autonomous vs lightweight APs, CAPWAP, WLC discovery (DHCP option 43, DNS), WPA2/WPA3 and roaming.
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
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