Pppoe frame forming component
Components |
Size (in bytes) |
NET data load |
1 ~ 1 452 |
TCP Header |
20 |
IP Header |
20 |
PPP Header |
2 |
Pppoe Header |
6 |
The maximum receiving unit of pppoe is 1492, the maximum load of Ethernet is 1500 ETS, The pppoe header is 6 octets, And the PPP protocol ID is 2 (before the PPP package is a two-byte PPP protocol id value) octets, so the MTU of PPP cannot exceed 1492. The pppoe protocol header has 6 bytes, Which is exactly 4-byte aligned with the 14-byte Ethernet header. In the PPP session phase, the PPP package is encapsulated in the pppoe Ethernet frame. The destination address of the Ethernet packet is single, the Ethernet protocol is 0x8864, And the pppoe header code must be 0, session_id must always be the seesion_id value negotiated during the discovery phase. The load of pppoe is the entire PPP package, and the first two bytes are the PPP protocol ID values.
The data net load, the TCP header, and the IP header constitute the PPP net load, so the maximum size of pppoe cannot exceed 1 492 bytes. the PPP, pppoe, and Ethernet headers are not within 1 492 bytes, additional Overhead:
1 492 + 2 + 6 + 18 = 1 518 bytes
In the PPP session phase, the PPP package is encapsulated in the pppoe Ethernet frame. The destination address of the Ethernet packet is single, the Ethernet protocol is 0x8864, And the pppoe header code must be 0, session_id must always be the seesion_id value negotiated during the discovery phase. The load of pppoe is the entire PPP package, and the first two bytes are the PPP protocol ID values.
An example of a pppoe session package is as follows:
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 4 5 6 7 8 9 0 1
+- +-+
| Access_concentrator_mac_addr |
+- +-+
| Access_concentrator_mac_addr (c) | host_mac_addr |
+- +-+
| Host_mac_addr (cont) |
+- +-+
| Ether_type = 0x8864 | V = 1 | T = 1 | code = 0x00 |
+- +-+
| Session_id = 0x1234 | length = 0x ???? |
+- +-+
| PPP protocol = 0xc021 | PPP payload ~
+- +-+
Note: Since the pppoe header is 6 bytes and the PPP protocol idcode occupies 8 bytes in total, while the MTU value of Ethernet is 1500, the upper-layer PPP load data cannot exceed 1492 bytes, therefore, the maximum number of receiving unit values negotiated during PPP negotiation cannot exceed 1492 bytes, that is, the MTU in the pppoe environment is 1492 bytes.