Pppoe and MTU

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.