eapolIEEE 802.1X Port-Based Network Access Control (EAP over LAN)802.1X Port Auth Dance (supplicant <-> switch eapol)
What It Does on the Wire
Before your workstation even gets an IP address, supplicant -> switch eapol start kicks off the 802.1X bouncer at the switch port so you can script the whole EAP identity handshake without locking your own NIC into quarantine VLAN 999.
Extensible Authentication Protocol over LAN (eapol) carries IEEE 802.1X Port-Based Network Access Control signaling directly over Ethernet II (0x888e) between an endpoint Supplicant and a switch or wireless Authenticator (PAE multicast group MAC 01:80:c2:00:00:03).
FrameAssembly models the complete 802.1X access-port lifecycle: start (EAPOL-Start), eappacket (EAP-Request/Response/Success/Failure with identity or EAP method codes), key (WPA2/MACsec EAPOL-Key descriptors), and logoff (EAPOL-Logoff)—and pairs naturally with radius frames on the upstream switch-to-AAA leg.
Zero-Trust 802.1X Campus NAC Flow Verification
Combine access-port eapol frames (supplicant <-> switch) with upstream radius (switch <-> ise_server) in one .frasm capture to document end-to-end 802.1X onboarding.
NAC Bypass & Mab / Supplicant Detection Signatures
Craft eapol start, identity "corp\svc-printer", and eapcode 4 (EAP-Failure) traces to test SOC detections for repeated 802.1X authentication failures.
WPA2 / 802.1X Key & Logoff Dissector Testing
Emit eapol key (type 3) and eapol logoff (type 2) frames across version 1 (802.1X-2001) and version 2 (802.1X-2004).
Minimal Quickstart (eapol_quickstart.frasm)
Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.
host supplicant { mac 00:1b:21:cc:10:25 }host switch_pae { mac 00:1c:73:aa:00:01 }compile { supplicant -> switch_pae eapol}What the Compiler Calculates So You Don't Have To
- Sets Ethernet II EtherType to
0x888eand defaults destination MAC to the IEEE 802.1X PAE group address01:80:c2:00:00:03. - Writes the 4-byte EAPOL header (
Protocol Versiondefault2,Packet Type, and exact 16-bitPacket Body Length). - For
eappacket(type 0), encodes the RFC 3748 EAP header (Code,Identifier, 16-bitLength,Typesuch as1Identity or13EAP-TLS, andidentitybytes) or minimal 4-byte EAP-Success (eapcode 3) / EAP-Failure (eapcode 4).
Full IEEE 802.1X Supplicant Onboarding With Upstream RADIUS Verification
Traces a workstation sending EAPOL-Start, answering an EAP-Request/Identity challenge, triggering an upstream RADIUS Access-Request/Accept on the switch, and receiving EAP-Success.
host laptop { mac 00:1b:21:55:66:77 }host access_sw { ip 10.20.0.2 mac 00:1c:73:00:01:02 }host radius_srv { ip 10.20.0.50 mac 00:50:56:00:00:50 }compile { // 1. Supplicant initiates 802.1X on physical switch port laptop -> access_sw eapol start version 2 wait 2ms // 2. Switch Authenticator requests EAP Identity (eapcode 1 = Request, eapmethod 1 = Identity) access_sw -> laptop eapol eappacket version 2 eapcode 1 eapid 1 eapmethod 1 dstmac 00:1b:21:55:66:77 wait 3ms // 3. Supplicant responds with corporate identity laptop -> access_sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity "corp\\jdoe" wait 2ms // 4. Switch forwards authentication upstream to RADIUS AAA server access_sw -> radius_srv radius accessrequest id 10 user "corp\\jdoe" nasip 10.20.0.2 wait 4ms access_sw <- radius_srv radius accessaccept id 10 framedip 10.20.100.45 wait 2ms // 5. Switch grants port access with EAP-Success (eapcode 3) access_sw -> laptop eapol eappacket version 2 eapcode 3 eapid 1 dstmac 00:1b:21:55:66:77}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show eapol_8021x_nac.frasm
# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly eapol_8021x_nac.frasm eapol_8021x_nac.pcap
frameassembly eapol_8021x_nac.frasm eapol_8021x_nac.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse eapol_8021x_nac.pcap eapol_8021x_nac_edited.frasmAll eapol Keywords & Header Options
Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after eapol:
src_host -> dst_host eapol [version <0..255>] [type <eappacket|start|logoff|key> | eappacket | start | logoff | key] [eapcode <0..255>] [eapid <0..255>] [eapmethod <0..255>] [identity "<text>"]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| eappacket | start | logoff | key | type <...> | EAPOL packet type keyword or u8 | eappacket (type 0) | Selects EAPOL Packet Type: eappacket (0), start (1, 0-byte body), logoff (2, 0-byte body), or key (3, EAPOL-Key descriptor). |
| version <0..255> | Whole number (0..255) | 2 (802.1X-2004) | Sets the 1-byte EAPOL Protocol Version (1 = 2001, 2 = 2004, 3 = 2010/2020). |
| eapcode <1..4> | 8-bit RFC 3748 EAP Code | 2 (Response) | Sets the inner EAP Code when eappacket is active: 1 Request, 2 Response, 3 Success, 4 Failure. |
| eapid <0..255> | 8-bit EAP Identifier | 1 | Matches an EAP Response (eapcode 2) to its corresponding EAP Request (eapcode 1). |
| eapmethod <0..255> | 8-bit EAP Method Type | 1 (Identity) | Sets EAP Method on Request/Response: 1 Identity, 4 MD5-Challenge, 13 EAP-TLS, 25 PEAP. |
| identity "<text>" | UTF-8 string | "user" (on Identity) | Populates the EAP-Identity Type-Data string (escape backslashes as "corp\\alice"). |
Cross-Layer Wrappers Valid with eapol
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
6 options
Cross-Layer Wrappers Valid with eapol
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
| Option | Range / Format | Default | Effect on Packet |
|---|---|---|---|
| wait <number><ns|us|ms|s|m> | Time gap (ns, us, ms, s, m) | 10ms | Advances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back). |
| payload "<text>" | hexpayload "<hex>" | Quoted text or hex bytes (choose one) | Omitted | Appends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums. |
| srcmac <mac> | dstmac <mac> | Colon, hyphen, or Cisco dot MAC | Host MAC / RFC multicast MAC | Overrides the 14-byte Ethernet II source or destination MAC address for this single packet. |
| vlan <0..4095> [pcp <0..7>] [dei <0|1>] | VLAN ID 0..4095, PCP 0..7, DEI 0..1 | Untagged | Wraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority. |
| qinq <0..4095> [innervlan <0..4095>] | Outer S-VLAN 0..4095, Inner C-VLAN 0..4095 | Untagged (innervlan 1 when qinq is set) | Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100). |
| mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>] | Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255 | Unlabeled (at most 1 mpls tag per packet) | Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header. |
Gotchas & Quick Fixes
Escape Backslashes in Windows Domain Identities
laptop -> sw eapol identity "corp\alice"laptop -> sw eapol identity "corp\\alice"Double-quoted .frasm strings support C-style escape sequences (\r, \n, \t, \\). Write "corp\\alice" so the wire string contains a literal \ rather than an escape.
MAC-Only Supplicants Cannot Directly Send L3 RADIUS
laptop -> radius_srv radius accessrequest (when laptop has no ip)access_sw -> radius_srv radius accessrequest (switch has ip + mac)eapol supports MAC-only hosts, whereas radius is a Layer 7 UDP protocol requiring IPv4 or IPv6 addresses on both endpoints.
Companion Guides & Neighboring Protocols
.pcap Captures onto Real Copper & Fiber (tcpreplay)