pppoe — Broadband PADI/PADO/PADR/PADS Discovery & Session Frames
- Default Port / Protocol
- EtherType 0x8863 / 0x8864
- Host Endpoint Rule
- MAC-Only or IP
- Wireshark Display Filter
- pppoed || pppoes
- Standards & Specs
- RFC 2516, RFC 4638
What It Does on the Wire
Still powering tens of millions of FTTH fiber ONTs worldwide: pppoe steps cleanly through 0x8863 padi -> pado -> padr -> pads discovery tags and 0x8864 subscriber session data.
Point-to-Point Protocol over Ethernet (pppoe, RFC 2516) remains the primary residential FTTH/GPON and wholesale broadband subscriber access encapsulation terminating on ISP Broadband Network Gateways (BNGs). PPPoE operates across two distinct EtherTypes: Discovery (0x8863)—which negotiates a 16-bit Session ID via padi (0x09), pado (0x07), padr (0x19), pads (0x65), and padt (0xa7)—and Session (0x8864), which carries 2-byte PPP Protocol IDs (0xc021 LCP, 0xc023 PAP, 0xc223 CHAP, 0x0021 IPv4, 0x0057 IPv6).
FrameAssembly encodes Discovery TLV tags (0x0101 Service-Name, 0x0102 AC-Name, 0x0103 Host-Uniq, 0x0104 AC-Cookie), broadcasts padi to ff:ff:ff:ff:ff:ff automatically, and calculates exact 16-bit PPPoE payload lengths.
FTTH / GPON OLT & BNG Subscriber Onboarding Labs
Combine double-tagged qinq 1000 innervlan 20 C-VLAN/S-VLAN subscriber frames with the full 4-step padi -> pado -> padr -> pads discovery handshake.
PPPoE Intermediate Agent & Rogue AC-Name Spoofing Detection
Test DSLAM/OLT PPPoE IA filtering and Suricata rules against rogue pado advertisements or unsolicited padt session-teardown attacks.
PPP Session Keepalive & MTU (RFC 4638 Baby Jumbo) Fixtures
Emit pppoe session (0x8864) frames carrying LCP/IPv4/IPv6 PPP protocol IDs (pppproto) and custom payloads.
RFC Wire Header Layout (pppoe)
Select any 32-bit wire word or field slice below to inspect which .frasm modifiers control those octets and what defaults the compiler writes.
Minimal Quickstart (pppoe_quickstart.frasm)
Select Preview Packets to compile in-browser and inspect timestamps + wire byte lengths, or open directly in the Playground.
host ont_cpe { mac 00:1b:21:c0:00:10 }
host isp_bng { mac 00:1c:73:b0:00:01 }
compile {
ont_cpe -> isp_bng pppoe padi servicename "ftth-gigabit" hostuniq "01020304" wait 2ms
ont_cpe <- isp_bng pppoe pado acname "bng-edge-01" servicename "ftth-gigabit" hostuniq "01020304" accookie "deadbeefcafe"
}Handled Automatically on the Wire
- Selects EtherType
0x8863for Discovery (padi,pado,padr,pads,padt) and0x8864forsession, broadcastingpaditoff:ff:ff:ff:ff:ffautomatically. - Sets Version=1, Type=1 (
0x11), writessessionid 0x0000during Discovery (untilpadsassigns a non-zero session), and calculates the 16-bit PPPoE Length field. - Encodes RFC 2516 Discovery Tags (
Service-Name,AC-Name,Host-Uniq,AC-Cookie) or prepends the 16-bitpppprotoheader onsessionframes.
QinQ FTTH Subscriber DORA-Equivalent: PADI/PADO/PADR/PADS + PPP Session + PADT
Models a residential ONT over QinQ (S-VLAN 500, C-VLAN 101) completing full PPPoE Discovery with an ISP BNG, exchanging a PPP session frame (sessionid 0x1a2b), and closing cleanly via padt.
host cpe_ont { mac 00:1b:21:55:01:01 }
host bng_agg { mac 00:1c:73:99:00:01 }
compile {
// 1. 4-step RFC 2516 PPPoE Discovery over QinQ S-VLAN 500 / C-VLAN 101
cpe_ont -> bng_agg pppoe padi servicename "isp-fiber" hostuniq "a1b2c3d4" qinq 500 innervlan 101 wait 2ms
cpe_ont <- bng_agg pppoe pado acname "bng-metro-01" servicename "isp-fiber" hostuniq "a1b2c3d4" accookie "aa55aa55" qinq 500 innervlan 101 wait 2ms
cpe_ont -> bng_agg pppoe padr servicename "isp-fiber" hostuniq "a1b2c3d4" accookie "aa55aa55" qinq 500 innervlan 101 wait 2ms
cpe_ont <- bng_agg pppoe pads sessionid 0x1a2b servicename "isp-fiber" hostuniq "a1b2c3d4" qinq 500 innervlan 101 wait 5ms
// 2. Active PPPoE Session frame (EtherType 0x8864, PPP LCP 0xc021)
cpe_ont -> bng_agg pppoe session sessionid 0x1a2b pppproto 0xc021 hexpayload "0901000812345678" qinq 500 innervlan 101 wait 10ms
// 3. Session termination (PADT on EtherType 0x8863)
cpe_ont -> bng_agg pppoe padt sessionid 0x1a2b qinq 500 innervlan 101
}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show pppoe_bng_lifecycle.frasm
# 2. Compile .frasm -> classic .pcap, nanosecond .pcapng, or pipe via '-'
frameassembly pppoe_bng_lifecycle.frasm pppoe_bng_lifecycle.pcap
frameassembly pppoe_bng_lifecycle.frasm pppoe_bng_lifecycle.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse pppoe_bng_lifecycle.pcap pppoe_bng_lifecycle_edited.frasm
# 4. Verify dissected protocol fields in tshark
tshark -r pppoe_bng_lifecycle.pcap -Y "pppoed || pppoes"All pppoe 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 pppoe:
src_host -> dst_host pppoe [padi | pado | padr | pads | padt | session] [sessionid <0..65535>] [servicename "<text>"] [acname "<text>"] [hostuniq "<hex>"] [accookie "<hex>"] [pppproto <0..65535>]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| padi | pado | padr | pads | padt | session | PPPoE stage keyword (or type <stage>) | padi (Discovery 0x09) | Selects Discovery codes 0x09 (padi), 0x07 (pado), 0x19 (padr), 0x65 (pads), 0xa7 (padt) on 0x8863, or session (0x00) on 0x8864. |
| sessionid <0..65535> | 16-bit PPPoE Session ID | 0 on PADI/PADO/PADR; 1 on PADS/Session | Sets the big-endian 16-bit Session_ID in bytes 2..3 of the 6-byte PPPoE header. |
| servicename "<text>" | Quoted ISP service string | "" (empty wildcard Service-Name tag) | Encodes Discovery Tag 0x0101 (Service-Name). |
| acname "<text>" | Quoted Access Concentrator name | Omitted unless set (or "AC" on PADO) | Encodes Discovery Tag 0x0102 (AC-Name advertised by the BNG in pado). |
| hostuniq "<hex>" | Quoted hex byte string | Omitted unless set | Encodes Discovery Tag 0x0103 (Host-Uniq client correlation token). |
| accookie "<hex>" | Quoted hex byte string | Omitted unless set | Encodes Discovery Tag 0x0104 (AC-Cookie SYN-cookie-style anti-spoofing token). |
| pppproto <0..65535> | 16-bit PPP Protocol ID (e.g. 0xc021, 0x0021, 0x0057) | 0x0021 (IPv4) | Sets the 2-byte PPP Protocol field immediately following the 0x8864 PPPoE Session header. |
Cross-Layer Wrappers Valid with pppoe
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
8 options
Cross-Layer Wrappers Valid with pppoe
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). |
| comment "<text>" | Quoted UTF-8 annotation | Omitted | Attaches an Enhanced Packet Block opt_comment annotation when compiling to .pcapng (Wireshark pkt_comment filter). |
| payload "<text>" | hexpayload "<hex>" | Quoted text or hex bytes (choose one) | Omitted | Appends or overrides raw payload bytes ("deadbeef", "de:ad:be:ef", or "\x01\x02") and updates packet lengths and checksums. |
| srcmac <mac> | dstmac <mac> | ethertype <0..65535> | Colon/hyphen/Cisco MAC · EtherType 0..65535 (e.g. 0x0800) | Host MAC / RFC multicast MAC / auto EtherType | Overrides the 14-byte Ethernet II source MAC, destination MAC, or standalone Layer 2 16-bit EtherType. |
| fcs | badfcs | Ethernet CRC-32 trailer flags (choose one) | Omitted | fcs appends a valid IEEE 802.3 4-byte CRC-32 Frame Check Sequence trailer; badfcs XOR-corrupts the CRC-32 for NIC/tap negative tests. |
| 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> [label <0..1048575>] [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>] | Repeatable label stack (0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255) | Unlabeled (auto bos=0 on outer labels, bos=1 on bottom) | Prepends one or more 32-bit MPLS label shims (0x8847, e.g. mpls 16000 mpls 24010) ahead of Layer 2 EoMPLS or Layer 3 payloads. |
Gotchas & Quick Fixes
hostuniq and accookie Expect Quoted Even-Length Hex Bytes
cpe -> bng pppoe padi hostuniq "router-1"cpe -> bng pppoe padi hostuniq "6370653031"hostuniq and accookie are raw binary RFC 2516 TLV octets parsed as hex byte strings ("a1b2c3d4" or "a1:b2:c3:d4").
Discovery Uses sessionid 0 Until PADS Assigns the Session ID
cpe -> bng pppoe padi sessionid 42cpe <- bng pppoe pads sessionid 42Per RFC 2516, padi, pado, and padr carry SESSION_ID = 0x0000; the BNG assigns the non-zero sessionid in pads, which both peers reuse in session and padt.