802.1X and EAP
802.1X is port-based network access control: a switch port or Wi-Fi network stays closed until the device authenticates. EAP carries the login, a RADIUS server decides. It is how WPA2/WPA3-Enterprise and wired NAC work.
- OSI layer
- 2 Data link
- Carried in
- Ethernet / Wi-Fi (EAPOL); RADIUS to the server
- Identified by
- EtherType 0x888E
- Wireshark filter
eapol || eap- Encrypted
- no
Packet structure
Select a field to see what it does.
EAP itself is only a frame for authentication methods. With TLS-based methods (EAP-TLS, PEAP, EAP-TTLS) the Type-Data carries TLS records, and the real credentials travel inside that tunnel.
How it works
Three roles: the supplicant (client), the authenticator (switch or access point) and the authentication server (RADIUS).
sequenceDiagram
participant C as Supplicant (laptop)
participant A as Authenticator (switch / AP)
participant R as RADIUS server
Note over A: Port closed except for EAPOL
C->>A: EAPOL-Start
A->>C: EAP-Request Identity
C->>A: EAP-Response Identity "anonymous@corp.example"
A->>R: Access-Request (EAP-Message)
R->>A: Access-Challenge (EAP-Request PEAP start)
A->>C: EAP-Request PEAP
Note over C,R: TLS tunnel between client and RADIUS server, inner login (MSCHAPv2 or certificate)
R->>A: Access-Accept (EAP-Success, VLAN, keys)
A->>C: EAP-Success
Note over A: Port opens (Wi-Fi: 4-way handshake with EAPOL-Key first)
- The port only passes EAPOL frames until authentication succeeds.
- The switch or AP relays EAP between the client (EAPOL) and the RADIUS server (RADIUS EAP-Message attribute); it does not understand the method.
- The server picks the method. With PEAP or EAP-TTLS a TLS tunnel protects an inner password login; with EAP-TLS both sides authenticate with certificates.
- On success the server can assign a VLAN or ACL. On Wi-Fi it also hands the AP a master key, and the 4-way handshake (EAPOL-Key frames) derives the encryption keys.
Devices without a supplicant (printers, phones, cameras) usually get MAB (MAC Authentication Bypass): the switch sends the MAC address to RADIUS as user name and password.
In Wireshark
| Filter | Shows |
|---|---|
eapol | All EAPOL frames (wired or Wi-Fi) |
eapol.type == 1 | EAPOL-Start |
eapol.type == 3 | EAPOL-Key (Wi-Fi 4-way handshake) |
eap.code == 2 && eap.type == 1 | Identity responses (user names) |
eap.code == 4 | Authentication failures |
eap.type == 25 | PEAP |
eap.type == 13 | EAP-TLS |
eap.type == 4 || eap.type == 17 | MD5 or LEAP: weak methods |
radius && eap | EAP on the RADIUS side |
The client side needs a capture on the client itself or on a span of the access port; RADIUS-side captures show the same EAP messages from the switch.
What normal looks like: a short exchange at link-up or Wi-Fi association, then normal traffic. Repeated failures, EAPOL-Start floods, outer identities that are real user names (privacy leak), or weak methods (MD5, LEAP, PEAP without certificate validation) need attention. A host behind an authenticated port that changes MAC address or shows several MACs may be a bypass device.
Security notes
- Evil twin / rogue AP: a fake access point with the same SSID runs its own RADIUS server (hostapd-wpe, EAPHammer). Clients that do not validate the server certificate give up their PEAP-MSCHAPv2 challenge-response, which cracks to the password. Fix: configure clients to validate the server certificate and name, or use EAP-TLS.
- MSCHAPv2 is weak: its challenge-response can be cracked or reduced to a single DES key; it is only safe inside a properly validated tunnel.
- Wired bypass: 802.1X authenticates once at link-up. A device inserted between an authorised host and the switch (a “bridge” implant) can piggyback on the open port. MACsec (802.1AE) or periodic reauthentication with MKA protects against it.
- MAB weakness: MAC addresses are trivial to spoof; a printer’s MAC opens the printer’s port for any laptop. Put MAB devices in restricted VLANs.
- Identity leaks: the outer EAP identity is sent in clear text; use anonymous outer identities.
- Weak methods: EAP-MD5 (no mutual authentication, offline cracking) and LEAP (asleap) should be disabled.
Versions and related
- IEEE 802.1X-2001, -2004, -2010, -2020: the 2010 revision added MACsec key agreement (MKA).
- WPA2/WPA3-Enterprise: 802.1X on Wi-Fi; WPA3-Enterprise 192-bit mode requires EAP-TLS with strong suites.
- EAP methods: EAP-TLS (RFC 5216, RFC 9190 for TLS 1.3), PEAP (Microsoft), EAP-TTLS (RFC 5281), EAP-FAST (Cisco), EAP-SIM/AKA (mobile).
- Frames are Ethernet with EtherType 0x888E; the decision is made by RADIUS, often with a dynamic VLAN.
References
- IEEE 802.1X: Port-based network access control
- RFC 3748: Extensible Authentication Protocol (EAP)
- RFC 5216: EAP-TLS
- RFC 3579: RADIUS support for EAP