networking, updated

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
Specs
IEEE 802.1X, RFC 3748, RFC 5216, RFC 3579
Wireshark filter
eapol || eap
Encrypted
no

Packet structure

EAPOL frame carrying an EAP packet9 bytes + variable

Select a field to see what it does.

IEEE 802.1X-2020 and RFC 3748. Sent in an Ethernet frame with EtherType 0x888E, to 01:80:c2:00:00:03 on wired ports. Between the switch or AP and the RADIUS server the same EAP packet travels in the EAP-Message attribute.

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)
  1. The port only passes EAPOL frames until authentication succeeds.
  2. The switch or AP relays EAP between the client (EAPOL) and the RADIUS server (RADIUS EAP-Message attribute); it does not understand the method.
  3. 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.
  4. 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

FilterShows
eapolAll EAPOL frames (wired or Wi-Fi)
eapol.type == 1EAPOL-Start
eapol.type == 3EAPOL-Key (Wi-Fi 4-way handshake)
eap.code == 2 && eap.type == 1Identity responses (user names)
eap.code == 4Authentication failures
eap.type == 25PEAP
eap.type == 13EAP-TLS
eap.type == 4 || eap.type == 17MD5 or LEAP: weak methods
radius && eapEAP 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

References

§ home
~/knubertus/home/
1,1 Top