PPPoE
- PPPoE:Point-to-Point Protocol over Ethernet,RFC 2516;
- PPP:Point-to-Point Protocol,RFC 1661;
- For encapsulating PPP frames inside Ethernet frames.
PPPoE and TCP/IP protocol stack

-
PPPoE 的两个阶段:PPPoE Discovery,PPP session
-
PPPoE Discovery
Client to server: Initiation
Server to client: Offer
Client to server: request
Server to client: session-confirmation -
PPP session
Either end to other end: termination. -
EtherType;
The ETHER_TYPE is set to either 0x8863 (Discovery Stage) or 0x8864 (PPP Session Stage).
Ethernet II
-
1492?!
The MRU (Maximum-Receive-Unit) option MUST NOT be negotiated to a larger size than 1492. Since Ethernet has a maximum payload size of 1500 octets, the PPPoE header is 6 octets and the PPP Protocol ID is 2 octets, the PPP MTU MUST NOT be greater than 1492. -
Ethernet payload
PPPoE Discovery phase and PPPoE PPP session phase packets travel as payload in an Ethernet frame. The Ethernet payload for PPPoE always start with a VERSION field, TYPE field, CODE field, SESSION ID and LENGTH as shown below.
Ethernet frame with payload

-
PPPoE Header
PPPoE header fields (6 bytes)
-
PPPoE Payload
PPPoE Payload
-
Treck wiki 上的 PPP over Ethernet (PPPoE) Interface 可以读一下。
DSL Internet access architecture

PPP
-
PPP 是 data link layer (layer 2) 数据链路层协议。
PPP three main components: Encapsulation, LCP, NCP
- How does PPP create a link and communicate between two machines?
Communication is established in essentially three phases:


-
PPPoE Payload
-
RFC 1662 (PPP in HDLC-like Framing)
PPP General Frame Format(RFC 1662)
Linux 拨号
-
RP-PPPoE
Roaring Penguin 公司提供的免费版 PPPoE client for Linux and Solaris systems to connect to PPPoE service providers.
yum install rp-pppoe 可以安装。 - 当前最新版 rp-pppoe-3.12.tar.gz;
可以查看 doc 和 man 下文件了解。 - -I option specifies the Ethernet interface to use.
pppd 启动参数指定使用 eth0 (Ethernet card 以太网网卡名); - The role of pppd is managing PPP session establishment and session termination.


- 通过 ppp0 获得外网IP;
- 通过 etho 获得 mac 地址;
Windows 拨号


网友评论