By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
For CompTIA Security+ Engineers Who Need to Deploy, Troubleshoot, or Secure Networks
802.1X is the IEEE standard for port-based network access control (PNAC). It forces devices to authenticate before they get an IP address or access to the network. Network Access Control (NAC) is the broader framework that enforces security policies (e.g., "Is this laptop patched? Does it have AV?") before allowing access.
If you ignore 802.1X/NAC, you’re running a network with no front door.
wpa_supplicant
# Install FreeRADIUS on Ubuntu/Debian sudo apt update && sudo apt install freeradius -y # Edit the clients.conf file to add your switch sudo nano /etc/freeradius/3.0/clients.conf
Add this (replace 192.168.1.10 with your switch IP and MySharedSecret with a strong password):
192.168.1.10
MySharedSecret
client switch1 { ipaddr = 192.168.1.10 secret = MySharedSecret nas_type = cisco }
Restart FreeRADIUS:
sudo systemctl restart freeradius
enable configure terminal # Enable AAA (Authentication, Authorization, Accounting) aaa new-model # Define the RADIUS server radius server FreeRADIUS address ipv4 192.168.1.5 auth-port 1812 acct-port 1813 key MySharedSecret # Create an AAA group and add the RADIUS server aaa group server radius RADIUS_GROUP server name FreeRADIUS # Configure 802.1X authentication aaa authentication dot1x default group RADIUS_GROUP aaa authorization network default group RADIUS_GROUP aaa accounting dot1x default start-stop group RADIUS_GROUP # Enable 802.1X globally dot1x system-auth-control # Configure a test port (e.g., GigabitEthernet1/0/1) interface GigabitEthernet1/0/1 switchport mode access authentication port-control auto dot1x pae authenticator end # Save config write memory
testuser
testpass
On the switch:
show dot1x all
Expected output:
Interface PAE Client Status Gi1/0/1 AUTH 0011.2233.4455 AUTHORIZED
On the RADIUS server (check logs):
sudo tail -f /var/log/freeradius/radius.log
Auth: Login OK: [testuser] (from client switch1 port 1 cli 0011.2233.4455)
On the RADIUS server, edit /etc/freeradius/3.0/users:
/etc/freeradius/3.0/users
testuser Cleartext-Password := "testpass" Tunnel-Type = VLAN, Tunnel-Medium-Type = IEEE-802, Tunnel-Private-Group-ID = 10
Now, when testuser authenticates, they’ll be placed in VLAN 10.
Trap: PEAP is easier but less secure.
"What happens if a device fails posture assessment?"
Trap: Some answers say "blocked completely"—but best practice is to allow limited access for remediation.
"What’s the role of the authenticator in 802.1X?"
Trap: It’s not the RADIUS server (that’s the authentication server).
"Which protocol does 802.1X use for authentication?"
Trap: Some answers say "RADIUS"—but RADIUS is the transport for EAP.
"What’s the purpose of CoA (Change of Authorization)?"
You’re troubleshooting a user who can’t connect to the network. The switch shows:
Gi1/0/1 AUTH 0011.2233.4455 AUTHENTICATING
What’s the most likely issue, and how do you fix it?
Issue: The supplicant (user’s device) is not responding to EAP requests. Fix:1. Check if 802.1X is enabled on the supplicant (Windows: services.msc-"Wired AutoConfig" should be running).2. Verify the supplicant’s credentials (username/password or certificate).3. Check the RADIUS server logs for authentication failures.4. If using PEAP, ensure the RADIUS server’s certificate is trusted on the supplicant.
services.msc
Command to debug on the switch:
debug dot1x all
Expected fix: If the supplicant is misconfigured, re-enter credentials or reinstall the certificate.
dot1x system-auth-control
authentication port-control auto
/etc/freeradius/3.0/clients.conf
authentication mac-move permit
Tunnel-Private-Group-ID = 10
802.1X and NAC are your network’s bouncers. Without them, anyone can walk in. With them, you control who gets access—and what they can do once they’re inside.
Now go deploy it on a single switch port and break something (safely). ?
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.