WOLF-LAB沃尔夫网络实验室中国网络精英的发源地!
24小时咨询热线:173-1636-2402

技术文档

Technical documentation

您当前位置: 首页 > 技术文档 > 详情

HCIE Datacom考试中怎么理解PPPOE报文详解-WOLFLAB

发布日期:2022-07-21 浏览次数:2210 来源:崔志鹏

HCIE Datacom考试中怎么理解PPPOE报文详解-WOLFLAB

WOLFLAB网络实验室HCIE Datacom相关可直接联系网站客服

image.png

发现阶段:

①R1发送一个PADI

Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface -, id 0

Ethernet II, Src: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49), Dst: Broadcast (ff:ff:ff:ff:ff:ff)                //DMAC为广播

    Destination: Broadcast (ff:ff:ff:ff:ff:ff)

    Source: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)

    Type: PPPoE Discovery (0x8863)                             //表示上层数据包为PPPOE的数据包

PPP-over-Ethernet Discovery

    0001 .... = Version: 1

    .... 0001 = Type: 1

    Code: Active Discovery Initiation (PADI) (0x09)     //为PPPOE的PADI数据包    

    Session ID: 0x0000                                                 //session id是0

    Payload Length: 10

    PPPoE Tags

        Host-Uniq: 0100                                                 //随机产生一个TAG,表示自己有点像CHADDR,如果server回复的offer里面有该TAG表示客户端选择了我;

 

②R2回复一个PADO

Frame 2: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface -, id 0

Ethernet II, Src: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22), Dst: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)    //单播回复

    Destination: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)

    Source: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22)

    Type: PPPoE Discovery (0x8863)

PPP-over-Ethernet Discovery

    0001 .... = Version: 1

    .... 0001 = Type: 1

    Code: Active Discovery Offer (PADO) (0x07)        //表示PADO报文

    Session ID: 0x0000                                               //session id是0

    Payload Length: 29

    PPPoE Tags

        Host-Uniq: 0100                                               //跟PADI的TAG一样

        AC-Name: AR200e0fcfa5322                           //server的名字

 

③R1回复一个PADR

Frame 3: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface -, id 0

Ethernet II, Src: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49), Dst: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22)        //单播回复

    Destination: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22)

    Source: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)

    Type: PPPoE Discovery (0x8863)

PPP-over-Ethernet Discovery

    0001 .... = Version: 1

    .... 0001 = Type: 1

    Code: Active Discovery Request (PADR) (0x19)           //表示PADR报文

    Session ID: 0x0000                                                       //session id是0

    Payload Length: 29

    PPPoE Tags

        Host-Uniq: 0100                                                       //标识自己

        AC-Name: AR200e0fcfa5322                                   //我选择了哪个PPPOE的server

 

④R2回复一个PADS

Frame 4: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface -, id 0

Ethernet II, Src: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22), Dst: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)            //单播回复

    Destination: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)

    Source: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22)

    Type: PPPoE Discovery (0x8863)

PPP-over-Ethernet Discovery

    0001 .... = Version: 1

    .... 0001 = Type: 1

    Code: Active Discovery Session-confirmation (PADS) (0x65)           //表示PADS报文

    Session ID: 0x0001                                                                            //session id是1

    Payload Length: 29

    PPPoE Tags

        Host-Uniq: 0100                                                                           //标识客户端

        AC-Name: AR200e0fcfa5322                                                        //标识server的名字

此时R1和R2就通过session id+client mac+server mac标识了一个PPPOE的会话,以后client访问internet二层直接封装server的MAC地址无需发送ARP请求

------------------------------------------------

会话建立阶段:

Frame 5: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface -, id 0

Ethernet II, Src: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22), Dst: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)

    Destination: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)

    Source: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22)

    Type: PPPoE Session (0x8864)

PPP-over-Ethernet Session

    0001 .... = Version: 1

    .... 0001 = Type: 1

    Code: Session Data (0x00)

    Session ID: 0x0001

    Payload Length: 21

Point-to-Point Protocol

PPP Link Control Protocol

 

注意:

①就是将PPP的数据包放在PPPOE的头部里在封装在以太二上;

②以后两台设备交互的所有报文包括流量PPPOE的头部都需要有session ID这个字段;

---------------------------------------------

IE Datacom咨询联系WOLFLAB网络实验室

 会话终止阶段:比如客户端停止拨号了就会终止会话

Frame 25: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface -, id 0

Ethernet II, Src: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22), Dst: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)      //单播

    Destination: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)

    Source: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22)

    Type: PPPoE Discovery (0x8863)

PPP-over-Ethernet Discovery

    0001 .... = Version: 1

    .... 0001 = Type: 1

    Code: Active Discovery Terminate (PADT) (0xa7)                  //报文为PADT

    Session ID: 0x0001                                                                 //Session ID=1表示要终止哪个会话

    Payload Length: 0

---------------------------------------------

业务流量:

Frame 113: 106 bytes on wire (848 bits), 106 bytes captured (848 bits) on interface -, id 0

Ethernet II, Src: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49), Dst: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22)

    Destination: HuaweiTe_fa:53:22 (00:e0:fc:fa:53:22)

    Source: HuaweiTe_75:1a:49 (00:e0:fc:75:1a:49)

    Type: PPPoE Session (0x8864)

PPP-over-Ethernet Session

    0001 .... = Version: 1

    .... 0001 = Type: 1

    Code: Session Data (0x00)

    Session ID: 0x0001

    Payload Length: 86

Point-to-Point Protocol

    Protocol: Internet Protocol version 4 (0x0021)

Internet Protocol Version 4, Src: 1.1.12.1, Dst: 8.8.8.8

Internet Control Message Protocol

 

数据包封装如下:

PADX

会话阶段

数据流量

以太

以太

以太

PPPOE

PPPOE

PPPOE


PPP

ppp



业务流量

 关注WOLFLAB网络实验室,HCIE Datacom循环开班,联系在线客服预约免费试听

返回目录
在线咨询