美文网首页
PPPoE & PPP

PPPoE & PPP

作者: michael_jia | 来源:发表于2018-02-09 20:39 被阅读89次

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
Typical PPP over Ethernet Topology
  • 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
Ethernet payload for PPPoE

DSL Internet access architecture

DSL Internet access architecture

PPP

PPP architecture
Internet protocol suite

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.
pppd & pppoe ppp0 & eth0
  • 通过 ppp0 获得外网IP;
  • 通过 etho 获得 mac 地址;

Windows 拨号

宽带连接 接口适配器

相关文章

网友评论

      本文标题:PPPoE & PPP

      本文链接:https://www.haomeiwen.com/subject/irwftftx.html