802.1X Port-Based Authentication — RADIUS Server, Host-Mode & Supplicant Verification
Plugging a device into a switch port has historically meant immediate network access — the device gets a DHCP address and starts communicating before any identity has been verified. In a campus with hundreds of switch ports across office floors, server rooms, and conference rooms, this creates a significant attack surface: a rogue laptop, an unauthorised visitor, or a compromised IoT device plugged into any accessible port gains full LAN access instantly. IEEE 802.1X port-based network access control (PNAC) closes this gap by making the switch port itself the enforcement point — no traffic is permitted until the connected device (the supplicant) presents valid credentials to an authentication server.
The 802.1X framework uses a three-party model. The supplicant is the end device (laptop, IP phone, printer) running an EAP client. The authenticator is the Cisco switch — it intercepts EAP messages from the supplicant, relays them to the authentication server using RADIUS, and enforces the access decision by opening or blocking the port. The authentication server is the RADIUS server (Cisco ISE, FreeRADIUS, or Microsoft NPS) — it validates credentials, applies policy, and returns an Access-Accept or Access-Reject. The switch has no knowledge of the credentials themselves — it only sees whether the server granted or denied access.
This lab configures 802.1X end-to-end: RADIUS server definition, global 802.1X enabling, per-port authentication, host-mode selection, fallback options (guest VLAN, auth-fail VLAN, critical VLAN), and complete verification. For the AAA framework that underpins 802.1X see AAA Configuration and AAA Overview. For VLAN infrastructure see VLANs and VLAN Creation & Management. For the storm protection that should accompany access port security see Storm Control & Traffic Shaping. For Control Plane Policing that protects the switch's own management plane see CoPP Configuration.
1. Core Concepts — 802.1X Framework, EAP, and Port States
The Three-Party 802.1X Model
┌──────────────┐ EAP over LAN (EAPOL) ┌──────────────┐ RADIUS (UDP 1812/1813) ┌────────────────┐ │ SUPPLICANT │ ◄──────────────────────► │AUTHENTICATOR │ ◄──────────────────────► │ AUTH SERVER │ │ (End Host) │ │ (Switch) │ │ (RADIUS/ISE) │ │ │ │ │ │ │ │ 802.1X client│ │ Gi0/1 port │ │ 10.0.0.100 │ │ EAP method │ │ Controls │ │ User DB │ │ credentials │ │ port state │ │ Policy engine │ └──────────────┘ └──────────────┘ └────────────────┘ FLOW SUMMARY: 1. Device plugs in → Switch sends EAP-Request/Identity to supplicant 2. Supplicant replies with EAP-Response/Identity (username) 3. Switch encapsulates EAP in RADIUS Access-Request → sends to server 4. Server challenges supplicant (e.g., sends EAP-TLS certificate request) 5. Supplicant responds with credentials (password, certificate, etc.) 6. Server validates → returns RADIUS Access-Accept or Access-Reject 7. Switch opens port (Authorized) or keeps blocked (Unauthorized) 8. (Optional) Server returns VLAN assignment in Access-Accept attributes
802.1X Port States
| State | Traffic Permitted | When It Occurs |
|---|---|---|
| Unauthorized | EAPOL only (EAP authentication packets). All other traffic dropped. | Default state when device connects. Port remains here until authentication succeeds. |
| Authorized | All traffic permitted (subject to normal VLAN/ACL policy). | RADIUS returns Access-Accept. Port opens and may be assigned a specific VLAN. |
| Guest VLAN | Traffic on the configured Guest VLAN only. | No EAP response received from connected device (non-802.1X capable). Device gets limited network access. |
| Auth-Fail VLAN | Traffic on the configured Auth-Fail VLAN only. | Supplicant responded but authentication failed (wrong credentials). Restricted access — e.g., remediation network. |
| Critical VLAN | Traffic on the configured Critical (inaccessible auth bypass) VLAN. | All RADIUS servers are unreachable. Device gets access so work is not interrupted — used for servers and critical endpoints. |
EAP Methods Comparison
| EAP Method | Credentials Used | Server Certificate | Client Certificate | Security Level | Common Use Case |
|---|---|---|---|---|---|
| EAP-MD5 | Username + password | No | No | Low — vulnerable to offline dictionary attacks | Legacy / lab only |
| PEAP (MSCHAPv2) | Username + password inside TLS tunnel | Yes (server) | No | High — password protected by TLS tunnel | Enterprise users with AD credentials |
| EAP-TLS | Digital certificates (mutual) | Yes (server) | Yes (client) | Highest — certificate-based, no password | Corporate devices, PKI environments |
| EAP-FAST | Password or certificate inside PAC tunnel | Optional | No | High | Cisco environments without full PKI |
| EAP-TTLS | Any inner method inside TLS tunnel | Yes (server) | No | High | Multi-vendor environments |
Authentication Host-Mode Options
| Host-Mode | Devices Allowed | Typical Use | Behaviour |
|---|---|---|---|
| single-host | 1 authenticated device | Simple access port — one PC | First device authenticates; additional MACs on the port are blocked. Most restrictive. |
| multi-host | Multiple devices, but only 1 authentication | PC behind a hub or unmanaged switch | One device authenticates; all other devices on the same port get free access using the authenticated state. Least secure — once one device authenticates, others ride along. |
| multi-auth | Multiple devices, each individually authenticated | Multiple PCs on a hub, or IP phone + PC | Each MAC address must independently authenticate. Most granular control. Separate RADIUS sessions per device. |
| multi-domain | 2 devices: 1 in data domain, 1 in voice domain | IP phone + PC on the same port | Dedicated support for IP phone + PC co-location. Phone authenticates in the voice domain (Voice VLAN), PC authenticates in the data domain. Each gets its own RADIUS session and VLAN assignment. |
2. Lab Topology
┌──────────────────────────────────────────┐
│ NetsTuts_SW1 (Catalyst 3560) │
│ │
│ Gi0/0 ── Uplink to Core (Trunk) │
│ │
│ Gi0/1 ── PC-A (802.1X - single-host) │
│ Gi0/2 ── PC-B (802.1X - multi-auth) │
│ Gi0/3 ── IP Phone (802.1X - multi-domain) │
│ Gi0/4 ── Printer (MAB - no supplicant) │
│ Gi0/5 ── Lobby PC (Guest VLAN fallback) │
│ Gi0/6 ── Server (Critical VLAN bypass) │
│ │
│ Gi0/24 ── RADIUS server (10.0.0.100) │
└──────────────────────────────────────────┘
VLANs:
VLAN 10 — Corporate Data (authenticated employees)
VLAN 20 — Voice (IP phones)
VLAN 30 — Guest (non-802.1X devices, unauthenticated)
VLAN 40 — Remediation / Auth-Fail (failed auth)
VLAN 50 — Critical (RADIUS server unreachable)
VLAN 99 — Management
RADIUS Server: 10.0.0.100
Shared secret: NetsTuts-RADIUS-Key
Auth port: 1812, Accounting port: 1813
3. Step 1 — AAA Framework and RADIUS Server Configuration
802.1X authentication on Cisco switches is built on top of the AAA (Authentication, Authorisation, Accounting) framework. Before any 802.1X commands will work, AAA must be enabled and a RADIUS server group must be defined. The switch uses AAA to determine which server to send RADIUS requests to and how to fall back if that server is unreachable. See AAA Overview, AAA Authentication Methods, and the detailed step-by-step AAA RADIUS Configuration lab for background. is unreachable.
Enable AAA and Define RADIUS Server
! ── Step 1: Enable AAA globally ────────────────────────────────── NetsTuts_SW1(config)#aaa new-model ! ^^^^^^^^^^^ ! CRITICAL: Without this, no AAA methods work — 802.1X will not ! authenticate against RADIUS. This command also disables any ! default line-based authentication — ensure console access is ! still secured (aaa authentication login default local) before ! enabling in production. ! ── Step 2: Define the RADIUS server (modern IOS 15.x method) ──── NetsTuts_SW1(config)#radius server NETSTUTS-ISE ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! Named server configuration block NetsTuts_SW1(config-radius-server)#address ipv4 10.0.0.100 ! ^^^^^^^^^^^^^^^^^^^^^^ ! RADIUS server IP address NetsTuts_SW1(config-radius-server)#key NetsTuts-RADIUS-Key ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! Shared secret — must match EXACTLY on the RADIUS server ! Case-sensitive; spaces allowed if quoted NetsTuts_SW1(config-radius-server)#auth-port 1812 NetsTuts_SW1(config-radius-server)#acct-port 1813 ! ^^^^^^^^^ ^^^^ ! Standard RADIUS ports — 1812 auth, 1813 accounting ! (Legacy: 1645 auth / 1646 accounting — avoid on new deployments) NetsTuts_SW1(config-radius-server)#exit ! ── Step 3: Create a RADIUS server group ───────────────────────── NetsTuts_SW1(config)#aaa group server radius NETSTUTS-RADIUS-GROUP NetsTuts_SW1(config-sg-radius)#server name NETSTUTS-ISE ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! Add the named server to the group NetsTuts_SW1(config-sg-radius)#exit ! ── Legacy method (older IOS — shown for reference) ────────────── ! NetsTuts_SW1(config)#radius-server host 10.0.0.100 key NetsTuts-RADIUS-Key ! ← Deprecated in IOS 15.x — use 'radius server' named blocks instead ! ── Step 4: Configure AAA authentication for 802.1X ────────────── NetsTuts_SW1(config)#aaa authentication dot1x default group NETSTUTS-RADIUS-GROUP ! ^^^^^^ ! Method list name 'default' applies to all ! 802.1X-enabled ports unless overridden ! ── Step 5: Configure AAA authorisation for network access ──────── NetsTuts_SW1(config)#aaa authorization network default group NETSTUTS-RADIUS-GROUP ! ^^^^^^^ ! Network authorisation — allows RADIUS to return ! VLAN, ACL, and session policy via CoA attributes ! ── Step 6: Configure AAA accounting (optional but recommended) ─── NetsTuts_SW1(config)#aaa accounting dot1x default start-stop group NETSTUTS-RADIUS-GROUP ! ^^^^^^^^^^ ! start-stop: sends accounting record when ! session starts and when it ends ! Records: username, session duration, bytes in/out ! ── Verify RADIUS server reachability ──────────────────────────── NetsTuts_SW1#test aaa group NETSTUTS-RADIUS-GROUP testuser testpassword new-code ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^ ! Group name username password ! Expected: Attempting authentication test to server-group NETSTUTS-RADIUS-GROUP ! User authentication request sent ... User was successfully authenticated.
RADIUS Source Interface and Timeout Tuning
! ── Set source interface for RADIUS packets ─────────────────────── NetsTuts_SW1(config)#ip radius source-interface Vlan99 ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! RADIUS requests originate from VLAN 99 management interface ! Ensures consistent source IP regardless of routing changes ! RADIUS server whitelist must include this IP ! ── Tune RADIUS timeouts and retransmit ────────────────────────── NetsTuts_SW1(config)#radius-server timeout 5 ! ^^^^^^^^^^^^^^^^^^^^^^^^ ! Wait 5 seconds for RADIUS response before retrying (default: 5) NetsTuts_SW1(config)#radius-server retransmit 2 ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! Retry RADIUS request 2 times before declaring server dead (default: 3) NetsTuts_SW1(config)#radius-server deadtime 15 ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! Mark server as dead for 15 minutes after repeated failures ! During deadtime, switch does not send requests to this server ! (prevents authentication delays when RADIUS is truly unreachable)
4. Step 2 — Global 802.1X System Configuration
After AAA is configured, 802.1X must be enabled globally on the switch before it can be applied to individual ports. The global command acts as the master switch — without it, per-port 802.1X configurations exist in the running config but are completely inactive.
! ── Enable 802.1X globally ─────────────────────────────────────── NetsTuts_SW1(config)#dot1x system-auth-control ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! THE master enable switch for 802.1X on the entire switch. ! Without this, no port-level 802.1X configuration has any effect. ! This is the #1 reason 802.1X appears configured but does nothing. ! ── Verify global 802.1X state ─────────────────────────────────── NetsTuts_SW1#show dot1x Sysauthcontrol Enabled ← ✓ globally enabled Dot1x Protocol Version 3 Critical Recovery Delay 100 Critical EAPOL Disabled ! ── Configure global 802.1X timers (optional — tune for performance) NetsTuts_SW1(config)#dot1x timeout quiet-period 30 ! ^^^^^^^^^^^^^ ! Time switch waits after auth failure before retrying (default: 60s) ! Reducing to 30s speeds up retry after a wrong password attempt NetsTuts_SW1(config)#dot1x timeout tx-period 10 ! ^^^^^^^^^ ! Interval between EAP-Request/Identity retransmissions (default: 30s) ! Reducing to 10s means devices authenticate faster on connect NetsTuts_SW1(config)#dot1x max-reauth-req 2 ! ^^^^^^^^^^^^^ ! Max EAP retransmissions before declaring supplicant unresponsive ! (default: 2 — keep at 2 for reasonable timeout behaviour) ! ── RADIUS CoA (Change of Authorization) — dynamic policy updates ─ NetsTuts_SW1(config)#aaa server radius dynamic-author NetsTuts_SW1(config-locsvr-da-radius)#client 10.0.0.100 server-key NetsTuts-RADIUS-Key ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! Allow RADIUS server to push mid-session policy changes (CoA) ! Examples: re-authenticate user, bounce port, change VLAN ! Required for Cisco ISE posture assessment and profiling NetsTuts_SW1(config-locsvr-da-radius)#exit
5. Step 3 — Per-Port 802.1X Configuration
Gi0/1 — Single-Host Mode (Standard Employee PC)
! ── Basic 802.1X on an access port — single device ─────────────── NetsTuts_SW1(config)#interface GigabitEthernet0/1 NetsTuts_SW1(config-if)#description PC-A-Employee-Single-Host NetsTuts_SW1(config-if)#switchport mode access NetsTuts_SW1(config-if)#switchport access vlan 10 ! ── Enable port authentication ─────────────────────────────────── NetsTuts_SW1(config-if)#authentication port-control auto ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! auto: Enable 802.1X — port starts in Unauthorized state, ! authenticates supplicant, opens if accepted. ! force-authorized: Port always open — 802.1X bypassed (default). ! force-unauthorized: Port always blocked — no traffic at all. ! ── Set host mode to single-host ───────────────────────────────── NetsTuts_SW1(config-if)#authentication host-mode single-host ! ^^^^^^^^^^^ ! Only ONE device allowed — additional MACs blocked after auth ! ── Enable 802.1X on this port ─────────────────────────────────── NetsTuts_SW1(config-if)#dot1x pae authenticator ! ^^^^^^^^^^^^^^^^^^^ ! PAE = Port Access Entity ! 'authenticator' = this switch port acts as the 802.1X authenticator ! ── Configure Guest VLAN (non-dot1x devices get limited access) ── NetsTuts_SW1(config-if)#authentication event no-response action authorize vlan 30 ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! If no EAP response (non-supplicant device), move to Guest VLAN 30 ! The device gets network access WITHOUT authentication ! ── Configure Auth-Fail VLAN (wrong credentials) ───────────────── NetsTuts_SW1(config-if)#authentication event fail action authorize vlan 40 ! ^^^^ ! If credentials are rejected by RADIUS, move to Remediation VLAN 40 ! Allows IT to push remediation software or display captive portal ! ── Per-port timer overrides ───────────────────────────────────── NetsTuts_SW1(config-if)#authentication timer reauthenticate 3600 ! ^^^^^^^^^^^^^^^ ! Re-authenticate this supplicant every 3600 seconds (1 hour) ! Overrides RADIUS-supplied session-timeout if set here NetsTuts_SW1(config-if)#exit
Gi0/2 — Multi-Auth Mode (Multiple Devices on One Port)
! ── Multi-auth: each MAC address authenticates independently ────── NetsTuts_SW1(config)#interface GigabitEthernet0/2 NetsTuts_SW1(config-if)#description PC-B-MultiAuth-Hub-Segment NetsTuts_SW1(config-if)#switchport mode access NetsTuts_SW1(config-if)#switchport access vlan 10 NetsTuts_SW1(config-if)#authentication port-control auto NetsTuts_SW1(config-if)#authentication host-mode multi-auth ! ^^^^^^^^^^ ! Every MAC on this port must authenticate separately. ! Each gets its own RADIUS session. ! Each can be assigned a different VLAN by RADIUS. ! If any device fails auth, only THAT device is blocked. NetsTuts_SW1(config-if)#dot1x pae authenticator NetsTuts_SW1(config-if)#authentication event no-response action authorize vlan 30 NetsTuts_SW1(config-if)#authentication event fail action authorize vlan 40 NetsTuts_SW1(config-if)#exit
Gi0/3 — Multi-Domain Mode (IP Phone + PC on Same Port)
! ── Multi-domain: separate data and voice domain authentication ─── ! ── The most common enterprise access port configuration ────────── NetsTuts_SW1(config)#interface GigabitEthernet0/3 NetsTuts_SW1(config-if)#description IPPhone-plus-PC-MultiDomain NetsTuts_SW1(config-if)#switchport mode access NetsTuts_SW1(config-if)#switchport access vlan 10 ! Data VLAN NetsTuts_SW1(config-if)#switchport voice vlan 20 ! Voice VLAN ! ^^^^^^^^^^ ! Voice VLAN enables CDP/LLDP-MED for phone discovery ! See: voice-vlan-configuration.html for full voice VLAN setup NetsTuts_SW1(config-if)#authentication port-control auto NetsTuts_SW1(config-if)#authentication host-mode multi-domain ! ^^^^^^^^^^^^ ! data domain: PC authenticates via 802.1X → gets VLAN 10 ! voice domain: IP phone authenticates via 802.1X or CDP → gets VLAN 20 ! Each domain can only have ONE authenticated device. ! Phone failure does not block PC and vice versa. NetsTuts_SW1(config-if)#dot1x pae authenticator ! ── Enable MAB for voice domain (phones often can't run 802.1X) ── NetsTuts_SW1(config-if)#mab ! ^^^ ! MAC Authentication Bypass — phone's MAC sent to RADIUS as credentials ! RADIUS server has phone MACs in its whitelist ! Phone authenticates via MAB; PC authenticates via 802.1X ! ── Auth order: try 802.1X first, then MAB ─────────────────────── NetsTuts_SW1(config-if)#authentication order dot1x mab ! ^^^^^^^^^^^^^ ! Supplicant present: 802.1X wins. ! No 802.1X response: switch falls back to MAB. NetsTuts_SW1(config-if)#authentication priority dot1x mab ! ^^^^^^^^^^ ! If a higher-priority method (dot1x) succeeds after MAB authenticated, ! dot1x takes priority and replaces the MAB session. NetsTuts_SW1(config-if)#authentication event no-response action authorize vlan 30 NetsTuts_SW1(config-if)#authentication event fail action authorize vlan 40 NetsTuts_SW1(config-if)#exit
Gi0/4 — MAB Only (Non-Supplicant Device: Printer)
! ── MAB-only port for devices with no 802.1X capability ────────── NetsTuts_SW1(config)#interface GigabitEthernet0/4 NetsTuts_SW1(config-if)#description Printer-MAB-Only NetsTuts_SW1(config-if)#switchport mode access NetsTuts_SW1(config-if)#switchport access vlan 10 NetsTuts_SW1(config-if)#authentication port-control auto NetsTuts_SW1(config-if)#authentication host-mode multi-auth NetsTuts_SW1(config-if)#mab ! ^^^ ! Only MAB configured — no dot1x pae authenticator ! Switch sends printer's MAC as username/password to RADIUS ! RADIUS validates MAC against device whitelist ! ── Skip 802.1X wait — go straight to MAB ──────────────────────── NetsTuts_SW1(config-if)#authentication order mab ! ^^^ ! Don't attempt 802.1X first — saves the tx-period wait time ! Use when you KNOW the device is not 802.1X capable NetsTuts_SW1(config-if)#authentication event fail action authorize vlan 40 NetsTuts_SW1(config-if)#exit
Gi0/5 — Guest VLAN Port (Lobby/Visitor Access)
! ── Lobby port: always falls to guest VLAN for non-supplicants ─── NetsTuts_SW1(config)#interface GigabitEthernet0/5 NetsTuts_SW1(config-if)#description Lobby-Guest-Fallback NetsTuts_SW1(config-if)#switchport mode access NetsTuts_SW1(config-if)#switchport access vlan 30 NetsTuts_SW1(config-if)#authentication port-control auto NetsTuts_SW1(config-if)#authentication host-mode multi-auth NetsTuts_SW1(config-if)#dot1x pae authenticator NetsTuts_SW1(config-if)#mab ! ── Guest VLAN: non-supplicants get internet-only access ───────── NetsTuts_SW1(config-if)#authentication event no-response action authorize vlan 30 ! ^^^^^^^^^^^^^ ! Triggers after tx-period expires with no EAP response ! Device gets VLAN 30 (internet only, no corporate resources) ! ── Auth-fail VLAN: wrong credentials → remediation ────────────── NetsTuts_SW1(config-if)#authentication event fail max-attempts 3 action authorize vlan 40 ! ^^^^^^^^^^^^^^^^^^ ! After 3 failed authentication attempts → move to VLAN 40 NetsTuts_SW1(config-if)#exit
Gi0/6 — Critical VLAN (Server with RADIUS Bypass)
! ── Critical VLAN: grant access when RADIUS is unreachable ──────── ! ── Essential for servers that must not lose access during RADIUS ! ── outages. Also called "Inaccessible Authentication Bypass (IAB)" NetsTuts_SW1(config)#interface GigabitEthernet0/6 NetsTuts_SW1(config-if)#description Server-Critical-Auth-Bypass NetsTuts_SW1(config-if)#switchport mode access NetsTuts_SW1(config-if)#switchport access vlan 10 NetsTuts_SW1(config-if)#authentication port-control auto NetsTuts_SW1(config-if)#authentication host-mode single-host NetsTuts_SW1(config-if)#dot1x pae authenticator NetsTuts_SW1(config-if)#mab ! ── Critical VLAN: if RADIUS is unreachable → move to VLAN 50 ───── NetsTuts_SW1(config-if)#authentication event server dead action authorize vlan 50 ! ^^^^^^^^^^^ ! Trigger: ALL configured RADIUS servers are unreachable ! Action: place port in Critical VLAN 50 (full access) ! ── Reinitialize when RADIUS recovers ──────────────────────────── NetsTuts_SW1(config-if)#authentication event server alive action reinitialize ! ^^^^^^^^^^^^^^ ! When a RADIUS server becomes reachable again, force re-auth ! Ensures devices authenticate properly once RADIUS is back NetsTuts_SW1(config-if)#exit ! ── Global critical auth configuration ─────────────────────────── NetsTuts_SW1(config)#dot1x critical eapol ! ^^^^^^^^^^^^^^ ! When port moves to critical VLAN, send EAP-Success to supplicant ! so the 802.1X client doesn't keep retrying.
6. Step 4 — Dynamic RADIUS VLAN Assignment
One of the most powerful features of 802.1X with RADIUS is dynamic VLAN assignment. Instead of a port being statically configured for a single VLAN, the RADIUS server returns VLAN information in the Access-Accept response, and the switch places the authenticated device into that VLAN — regardless of what VLAN the port is statically configured for. This enables a single physical port to serve different users in different VLANs depending on their identity. For VLAN fundamentals see VLANs, VLAN Tagging (802.1Q), and VLAN Creation & Management. For trunk port configuration see Trunk Port Configuration.
RADIUS Attributes for Dynamic VLAN Assignment
RADIUS ACCESS-ACCEPT must return these three attributes together:
Attribute 64: Tunnel-Type = VLAN (value 13)
Attribute 65: Tunnel-Medium-Type = IEEE 802 (value 6)
Attribute 81: Tunnel-Private-Group-ID = [VLAN ID or VLAN name]
e.g., "10" or "Corporate" (must match VLAN on switch)
EXAMPLE (Cisco ISE policy result):
User "jsmith" → member of "Employees" group
RADIUS returns:
Tunnel-Type = VLAN
Tunnel-Medium-Type = IEEE 802
Tunnel-Private-Group-ID = 10 ← places jsmith on VLAN 10
User "contractor01" → member of "Contractors" group
RADIUS returns:
Tunnel-Private-Group-ID = 30 ← places contractor on VLAN 30
SWITCH BEHAVIOUR:
Static VLAN on port (configured): VLAN 10
RADIUS returns VLAN 30 for contractor → port moves to VLAN 30
When session ends, port returns to configured VLAN 10
Downloadable ACL (dACL) from RADIUS
! ── RADIUS can also return a per-session ACL (dACL) ────────────── ! ── This applies traffic filtering beyond VLAN-level control ────── ! ── Configure switch to accept dACL from RADIUS ─────────────────── NetsTuts_SW1(config)#aaa authorization network default group NETSTUTS-RADIUS-GROUP ! ← Already configured in Step 1 — required for dACL download ! ── ip device tracking: required for dACL on IOS ──────────────── NetsTuts_SW1(config)#ip device tracking ! ^^^^^^^^^^^^^^^^ ! Enables tracking of IP-to-MAC-to-port bindings ! Required for RADIUS-assigned ACLs to bind to the correct session ! ── RADIUS sends Cisco-AV-Pair with ACL name ───────────────────── ! ── (configured on ISE/RADIUS server, not the switch) ──────────── ! Example RADIUS AV-Pair attribute returned in Access-Accept: ! cisco-av-pair = ip:inacl#1=permit ip 10.0.0.0 0.0.0.255 any ! cisco-av-pair = ip:inacl#2=deny ip any any log ! The switch creates a per-session ACL and applies it to the port. ! This ACL is dynamically created and removed per authentication session.
7. Step 5 — Periodic Re-Authentication and Violation Actions
Periodic re-authentication forces connected devices to re-prove their identity at regular intervals, closing sessions that should no longer be active. Violation actions define the switch's response when an unexpected device appears on an already-authenticated port. For static MAC-based port protection without 802.1X see Port Security and Port Security & Sticky MAC. For PortFast and BPDU Guard interaction with err-disabled ports see PortFast & BPDU Guard.
Periodic Re-Authentication
! ── Enable periodic re-authentication globally ──────────────────── NetsTuts_SW1(config)#dot1x reauthentication ! ^^^^^^^^^^^^^^ ! Globally enables periodic re-authentication ! (Can also be enabled per-port) ! ── Per-port: enable re-auth and set interval ───────────────────── NetsTuts_SW1(config)#interface GigabitEthernet0/1 NetsTuts_SW1(config-if)#authentication periodic ! ^^^^^^^^^^^^^^^^^^^^^^^ ! Enable periodic re-authentication on this port NetsTuts_SW1(config-if)#authentication timer reauthenticate server ! ^^^^^^^^^^^^^^ ^^^^^^ ! Use session timeout returned by RADIUS server (Session-Timeout attr) ! If RADIUS doesn't return timeout, falls back to local reauthenticate timer ! Alternative: set a fixed interval (seconds): ! authentication timer reauthenticate 7200 ← 2-hour fixed interval ! ── Trigger immediate re-authentication manually ───────────────── NetsTuts_SW1#authentication sessionid re-authenticate interface GigabitEthernet0/1 ! ← Forces a full re-auth cycle on all sessions on Gi0/1 ! ── Verify re-authentication state ────────────────────────────── NetsTuts_SW1#show dot1x interface GigabitEthernet0/1 detail Interface Info for GigabitEthernet0/1 ------------------------------------------- PAE = AUTHENTICATOR PortControl = AUTO ControlDirection = Both HostMode = SINGLE_HOST ReAuthentication = Enabled ← ✓ re-auth enabled ReAuthPeriod = 3600 (Locally configured) ReAuthAction = Reauthenticate ...
Port Violation Actions
! ── Define what happens when an unauthorised device appears ─────── ! ── on a port that has already authenticated one device ─────────── NetsTuts_SW1(config)#interface GigabitEthernet0/1 NetsTuts_SW1(config-if)#authentication violation restrict ! ^^^^^^^^^ ! restrict: Drop frames from the violating MAC, log a syslog message, ! increment violation counter. Do NOT shut down the port. ! (Least disruptive — recommended for multi-host environments) ! ── Alternative violation actions ──────────────────────────────── NetsTuts_SW1(config-if)#authentication violation shutdown ! ^^^^^^^^ ! shutdown: Err-disable the port immediately. Most secure but disruptive. ! Requires 'errdisable recovery cause dot1x' to auto-recover. NetsTuts_SW1(config-if)#authentication violation protect ! ^^^^^^^ ! protect: Drop frames silently — no syslog, no counter. ! Use only when violation events are expected and logging is noisy. NetsTuts_SW1(config-if)#authentication violation replace ! ^^^^^^^ ! replace: Remove the existing authenticated session and ! authenticate the new device instead. Useful in hot-desk environments. NetsTuts_SW1(config-if)#exit ! ── Configure err-disable auto-recovery for 802.1X violations ───── NetsTuts_SW1(config)#errdisable recovery cause dot1x NetsTuts_SW1(config)#errdisable recovery interval 300 ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ! Auto-recover err-disabled ports after 300 seconds (5 minutes) ! See also: portfast-bpdu-guard.html for other errdisable causes
8. Step 6 — Full Verification
show dot1x all — Master 802.1X Status View
NetsTuts_SW1#show dot1x all
Sysauthcontrol Enabled
Dot1x Protocol Version 3
Dot1x Info for GigabitEthernet0/1
-------------------------------------------------------------------
PAE = AUTHENTICATOR
PortControl = AUTO
ControlDirection = Both
HostMode = SINGLE_HOST
Violation Mode = RESTRICT
ReAuthentication = Enabled
QuietPeriod = 30
ServerTimeout = 30
SuppTimeout = 30
ReAuthPeriod = 3600 (Locally configured)
ReAuthAction = Reauthenticate
MaxReq = 2
MaxAuthReq = 10
TxPeriod = 10
RateLimitPeriod = 0
Dot1x Authenticator Client List
-------------------------------------------------------------------
Supplicant : 0011.2233.4455 ← PC-A's MAC address
Session ID : 0A0000640000000100123456
Auth SM State : AUTHENTICATED ← ✓ authenticated
Auth BEND SM State : IDLE
Port Status : AUTHORIZED ← ✓ port open
Authentication Method : Dot1x
Authenticated By : Authentication Server
Vlan Policy : 10 ← RADIUS-assigned VLAN
ACS ACL : Not downloaded
URL Redirect : Not configured
show authentication sessions — Session Detail
! ── show authentication sessions — comprehensive view ─────────────
NetsTuts_SW1#show authentication sessions
Interface MAC Address Method Domain Status Fg Session ID
Gi0/1 0011.2233.4455 dot1x DATA Auth 0A0000640000000100123456
Gi0/3 aabb.cc11.2233 mab VOICE Auth 0A0000640000000200234567
Gi0/3 0022.3344.5566 dot1x DATA Auth 0A0000640000000300345678
Gi0/4 aabb.cc44.5566 mab DATA Auth 0A0000640000000400456789
Gi0/5 0033.4455.6677 dot1x DATA Authz Failed 0A0000640000000500567890
! ^^^^^^^^^^^^^
! Authentication failed — likely moved to auth-fail VLAN
! ── Detailed session for one port ─────────────────────────────────
NetsTuts_SW1#show authentication sessions interface GigabitEthernet0/1 detail
Interface: GigabitEthernet0/1
MAC Address: 0011.2233.4455
IPv6 Address: Unknown
IPv4 Address: 10.0.10.55
User-Name: NETSTUTS\jsmith ← AD domain username
Status: Authorized
Domain: DATA
Security Policy: Should Secure
Security Status: Secured
Oper host mode: single-host
Oper control dir: both
Authorized By: Authentication Server
Vlan Policy: 10 ← RADIUS-assigned VLAN 10
ACS ACL: Not downloaded
URL Redirect: Not configured
Session timeout: 3600s (server), Remaining: 3234s
Idle timeout: N/A
Common Session ID: 0A0000640000000100123456
Acct Session ID: 0x00000001
Handle: 0xCC000001
Current Policy: POLICY_Gi0/1
Local Policies:
Service Template: DEFAULT_LINKSEC_POLICY_SHOULD_SECURE (priority 150)
Server Policies:
Vlan Group: Vlan: 10
show dot1x interface — Per-Port Detail
NetsTuts_SW1#show dot1x interface GigabitEthernet0/3 detail
Dot1x Info for GigabitEthernet0/3
-------------------------------------------------------------------
PAE = AUTHENTICATOR
PortControl = AUTO
ControlDirection = Both
HostMode = MULTI_DOMAIN ← ✓ multi-domain
Violation Mode = RESTRICT
ReAuthentication = Enabled
QuietPeriod = 30
TxPeriod = 10
Dot1x Authenticator Client List
-------------------------------------------------------------------
Supplicant : 0022.3344.5566 ← PC MAC
Auth SM State : AUTHENTICATED
Port Status : AUTHORIZED
Authentication Method : Dot1x
Domain : DATA ← data domain
Vlan Policy : 10
MAB Client List
-------------------------------------------------------------------
Client : aabb.cc11.2233 ← Phone MAC
Auth SM State : AUTHENTICATED
Port Status : AUTHORIZED
Authentication Method : MAB
Domain : VOICE ← voice domain
Vlan Policy : 20
show radius server-group and Debugging
! ── Verify RADIUS server status ──────────────────────────────────
NetsTuts_SW1#show radius server-group all
Server group NETSTUTS-RADIUS-GROUP
Sharecount = 1 selector = 0 Server(s) :
* 10.0.0.100:1812,1813
State: current UP ← ✓ RADIUS server reachable
Single-Connect: OFF
InOctets: 2048
OutOctets: 1536
Opens: 14 Closes: 0 Aborts: 0 Errors: 0
Packets In: 24 Packets Out: 22
! ── Test RADIUS reachability ────────────────────────────────────
NetsTuts_SW1#test aaa group NETSTUTS-RADIUS-GROUP jsmith Password1! new-code
Attempting authentication test to server-group NETSTUTS-RADIUS-GROUP using radius
User authentication request sent for 'jsmith'
User was successfully authenticated. ← ✓ RADIUS responding
! ── Debug 802.1X authentication in real time (use with caution) ──
NetsTuts_SW1#debug dot1x all
! Shows: EAP packet exchange, state machine transitions, RADIUS results
! WARNING: Very verbose — use only in lab or on a single port in production:
NetsTuts_SW1#debug dot1x interface GigabitEthernet0/1
! Limit debug to one port to reduce console impact
! ── Disable debug after testing ──────────────────────────────────
NetsTuts_SW1#undebug all
! ── Check RADIUS counters per server ─────────────────────────────
NetsTuts_SW1#show radius statistics
Access Requests: 42 Access Accepts: 38 Access Rejects: 4
Access Challenges: 12 Malformed Responses: 0 Authentication timeouts: 0
! ── Verify EAP packet counts on a specific port ──────────────────
NetsTuts_SW1#show dot1x statistics interface GigabitEthernet0/1
Dot1x Authenticator Port Statistics for GigabitEthernet0/1
------------------------------------------------------------------
RxStart = 1
RxLogoff = 0
RxResp = 6 ← EAP responses received from supplicant
RxRespId = 1
RxInvalid = 0
RxLenErr = 0
RxTotal = 8
TxReq = 5
TxReqId = 1 ← EAP-Request/Identity sent to supplicant
TxTotal = 6
RxVersion = 1
LastRxSrcMac = 0011.2233.4455
Verification Command Summary
| Command | What It Shows | Key Field |
|---|---|---|
show dot1x |
Global 802.1X state — system auth control enabled/disabled, version | Sysauthcontrol = Enabled (must be Enabled for any 802.1X to work) |
show dot1x all |
All 802.1X-enabled ports — PAE mode, host-mode, timers, client list, auth state | Auth SM State = AUTHENTICATED; Port Status = AUTHORIZED; Vlan Policy |
show dot1x interface [int] detail |
Detailed 802.1X info for one port — all clients, MAB clients, states, domains | Domain = DATA or VOICE; Authentication Method = Dot1x or MAB |
show authentication sessions |
All active auth sessions across all ports — method, domain, status, session ID | Status = Auth (success); Fg = flags; Method = dot1x/mab/webauth |
show authentication sessions interface [int] detail |
Full session details — username, IP, VLAN, ACL, timeout, policy | User-Name; Vlan Policy (RADIUS-assigned VLAN); Session timeout remaining |
show dot1x statistics interface [int] |
EAP packet counters — Rx/Tx per message type | RxResp = EAP responses received; TxReqId = EAP-Request/Identity sent |
show radius server-group all |
RADIUS server groups — server IPs, state (UP/DOWN), packet counters | State = current UP; Errors = 0 (non-zero indicates connectivity issue) |
show radius statistics |
Global RADIUS counters — accepts, rejects, timeouts | Authentication timeouts > 0 = RADIUS reachability issue |
test aaa group [group] [user] [pass] new-code |
Active RADIUS connectivity test — sends a real test auth request | Response = "User was successfully authenticated" = RADIUS working |
debug dot1x all |
Real-time 802.1X EAP exchange and state machine debug messages | Use only for targeted troubleshooting; disable with undebug all |
9. Complete Configuration Reference & Key Points
Full 802.1X Switch Configuration
Copy the complete configuration below. Verify the full applied config at any time with show running-config. For saving and managing Cisco configurations see Saving & Managing Cisco Configurations.
! ════════════ NetsTuts_SW1 — Complete 802.1X Configuration ════════ ! ! ─── AAA Foundation ────────────────────────────────────────────── aaa new-model ! radius server NETSTUTS-ISE address ipv4 10.0.0.100 key NetsTuts-RADIUS-Key auth-port 1812 acct-port 1813 ! aaa group server radius NETSTUTS-RADIUS-GROUP server name NETSTUTS-ISE ! aaa authentication dot1x default group NETSTUTS-RADIUS-GROUP aaa authorization network default group NETSTUTS-RADIUS-GROUP aaa accounting dot1x default start-stop group NETSTUTS-RADIUS-GROUP ! ip radius source-interface Vlan99 radius-server timeout 5 radius-server retransmit 2 radius-server deadtime 15 ! ! ─── Global 802.1X ─────────────────────────────────────────────── dot1x system-auth-control dot1x timeout quiet-period 30 dot1x timeout tx-period 10 dot1x max-reauth-req 2 dot1x critical eapol ! ip device tracking ! ! ─── CoA Support ───────────────────────────────────────────────── aaa server radius dynamic-author client 10.0.0.100 server-key NetsTuts-RADIUS-Key ! ! ─── Err-disable Recovery ──────────────────────────────────────── errdisable recovery cause dot1x errdisable recovery interval 300 ! ! ─── Gi0/1: Single-Host Employee Port ──────────────────────────── interface GigabitEthernet0/1 switchport mode access switchport access vlan 10 authentication port-control auto authentication host-mode single-host authentication periodic authentication timer reauthenticate server authentication violation restrict authentication event no-response action authorize vlan 30 authentication event fail action authorize vlan 40 dot1x pae authenticator ! ! ─── Gi0/3: Multi-Domain (Phone + PC) ──────────────────────────── interface GigabitEthernet0/3 switchport mode access switchport access vlan 10 switchport voice vlan 20 authentication port-control auto authentication host-mode multi-domain authentication order dot1x mab authentication priority dot1x mab authentication periodic authentication timer reauthenticate server authentication violation restrict authentication event no-response action authorize vlan 30 authentication event fail action authorize vlan 40 dot1x pae authenticator mab ! ! ─── Gi0/6: Critical Auth Bypass (Server) ──────────────────────── interface GigabitEthernet0/6 switchport mode access switchport access vlan 10 authentication port-control auto authentication host-mode single-host authentication event server dead action authorize vlan 50 authentication event server alive action reinitialize dot1x pae authenticator mab
802.1X Command Reference
| Command | Mode | Purpose |
|---|---|---|
aaa new-model |
Global config | Enable AAA framework. Required before any RADIUS or 802.1X commands function. See AAA Overview and AAA RADIUS Configuration. |
radius server [name] |
Global config | Create named RADIUS server block. Modern IOS 15.x method. Configure address, key, ports inside. |
aaa authentication dot1x default group [grp] |
Global config | Define which RADIUS group handles 802.1X authentication. Applied to all dot1x ports by default. |
aaa authorization network default group [grp] |
Global config | Enable RADIUS-based authorisation — required for dynamic VLAN and dACL assignment. See ACL Overview and Extended ACL Configuration for ACL background. |
dot1x system-auth-control |
Global config | Master enable for 802.1X. Without this, all per-port 802.1X config is inactive. |
authentication port-control auto |
Interface config | Enable 802.1X on port. Port starts Unauthorized; opens after successful auth. Alternatives: force-authorized, force-unauthorized. |
dot1x pae authenticator |
Interface config | Set port as 802.1X authenticator (the switch role). Required on every 802.1X-enabled port. |
authentication host-mode [mode] |
Interface config | Set how many devices and how they authenticate: single-host, multi-host, multi-auth, multi-domain. |
mab |
Interface config | Enable MAC Authentication Bypass. Allows non-supplicant devices to authenticate via MAC address sent to RADIUS. See MAC Addresses. |
authentication order dot1x mab |
Interface config | Set authentication method priority. Try 802.1X first; fall back to MAB if no EAP response. |
authentication event no-response action authorize vlan [n] |
Interface config | Guest VLAN: place non-supplicant devices into VLAN n when no EAP response is received. |
authentication event fail action authorize vlan [n] |
Interface config | Auth-Fail VLAN: place devices that fail authentication into restricted VLAN n. |
authentication event server dead action authorize vlan [n] |
Interface config | Critical VLAN: grant access on VLAN n when all RADIUS servers are unreachable. |
authentication violation [restrict|shutdown|protect|replace] |
Interface config | Action when an additional unauthorised device appears on an already-authenticated port. See Violation Modes and Port Security. |
authentication periodic |
Interface config | Enable periodic re-authentication on this port. |
authentication timer reauthenticate server |
Interface config | Use RADIUS-supplied session timeout for re-authentication interval. |
Key Points & Exam Tips
dot1x system-auth-controlis the master enable — without it, nothing works. This is the most common reason an 802.1X configuration appears correct but has no effect. Every per-port command, every host-mode, every VLAN assignment is completely dormant until this global command is entered. Always verify it withshow dot1xand confirmSysauthcontrol = Enabled.- Both
authentication port-control autoanddot1x pae authenticatorare required on every 802.1X port.authentication port-control autoputs the port into 802.1X enforcement mode (Unauthorized by default, moves to Authorized on success).dot1x pae authenticatorsets the switch's role as the authenticator in the EAP exchange. Both commands must be present. Missing either one means the port either stays permanently open (port-control not set) or doesn't participate in EAP exchanges (pae not set). - multi-domain is the correct host-mode for IP phone + PC combinations. Multi-domain creates two independent authentication domains per port — a data domain and a voice domain — each with its own RADIUS session and VLAN assignment. The IP phone authenticates (typically via MAB) in the voice domain and gets VLAN 20. The PC authenticates via 802.1X in the data domain and gets VLAN 10. Multi-host would be wrong here — it authenticates one device and lets everything else ride along, providing no per-device control. See Voice VLAN Configuration for the full IP phone setup.
- Guest VLAN vs Auth-Fail VLAN — different triggers, different intent. Guest VLAN triggers when there is no EAP response at all — the device is not an 802.1X supplicant (e.g., a visitor's non-domain laptop, a printer). Auth-Fail VLAN triggers when a device IS a supplicant (it responds to EAP) but the credentials are rejected by RADIUS. These are different security situations: a guest VLAN device is unknown; an auth-fail device has an identity but failed validation. Configuring both allows granular handling of both scenarios.
- MAB is weaker than 802.1X but necessary for non-supplicant devices. MAC addresses can be spoofed — an attacker who learns an authorised printer's MAC address can clone it and potentially get network access. MAB should be used only for devices that genuinely cannot run an 802.1X supplicant. Always combine MAB with RADIUS profiling (Cisco ISE profiles device type from DHCP, HTTP, CDP attributes) to validate that the device matches its expected type, not just its MAC address. Complement 802.1X with DHCP Snooping and Dynamic ARP Inspection for layered Layer 2 security.
- Critical VLAN protects against RADIUS outages — but must be used carefully. When all RADIUS servers become unreachable, ports with Critical VLAN configured move their sessions to the critical VLAN without re-authentication. This ensures business continuity (servers stay online, employees keep working). However, this also means that an attacker who disrupts RADIUS connectivity can potentially gain network access via Critical VLAN bypass. Restrict Critical VLAN to ports connected to infrastructure devices whose access level is already established, and pair it with
authentication event server alive action reinitializeso devices re-authenticate when RADIUS recovers. - Dynamic VLAN assignment requires all three RADIUS attributes (64, 65, 81) together. Attribute 64 (Tunnel-Type = VLAN), Attribute 65 (Tunnel-Medium-Type = IEEE 802), and Attribute 81 (Tunnel-Private-Group-ID = VLAN ID) must all be returned in the RADIUS Access-Accept. Missing any one of these three attributes means the switch ignores the VLAN assignment and uses the port's statically configured VLAN instead. This is the most common RADIUS VLAN troubleshooting point.
- Use
authentication order dot1x mabandauthentication priority dot1x mabtogether. Theordercommand defines the sequence in which methods are tried (802.1X first, MAB as fallback). Theprioritycommand defines which method takes precedence if both succeed simultaneously. Using both commands ensures that if a MAB session is already active and the user launches an 802.1X supplicant, the 802.1X session replaces the less-secure MAB session. - On the CCNP Security exam: know the three-party model (supplicant, authenticator, auth server), the five host-mode options and their use cases, the difference between Guest VLAN and Auth-Fail VLAN, the three RADIUS attributes required for dynamic VLAN assignment, the role of MAB as a fallback, and the verification commands (
show dot1x all,show authentication sessions). Also be able to identify missing configuration elements (missingaaa new-model, missingdot1x system-auth-control, missingdot1x pae authenticator) from a show output. Review AAA Overview and 802.1X Overview for exam preparation.