DISCOVERY
============================
发送PADI
Sent packet: Ether addr: ff:ff:ff:ff:ff:ff
PPPoE hdr: ver=0x1 type=0x1 code=0x09 sid=0x0000 length=0x000c (PADI)
PPPoE tag: type=0103 length=0004 (Host Uniq) data (bin): 08 c0 47 00 PPPoE tag: type=0101 length=0000 (Service name)
Recv'd packet: Ether addr: bc:30:5b:e8:ab:35
对方响应 PADO
Recv'd packet: Ether addr: bc:30:5b:e8:ab:35
PPPoE hdr: ver=0x1 type=0x1 code=0x07 sid=0x0000 length=0x002d (PADO)
PPPoE tag: type=0102 length=0005 (AC Name) data (UTF-8): linux PPPoE tag: type=0101 length=0000 (Service name) PPPoE ta
HOST_UNIQ successful match
发送 PADR
Sent packet: Ether addr: bc:30:5b:e8:ab:35
PPPoE hdr: ver=0x1 type=0x1 code=0x19 sid=0x0000 length=0x0024 (PADR)
PPPoE tag: type=0101 length=0000 (Service name) PPPoE tag: type=0103 length=0004 (Host Uniq) data (bin): 08 c0 47 00 PPP
对方响应 PADS
Recv'd packet: Ether addr: bc:30:5b:e8:ab:35
(PPPOE Discovery)
PPPoE hdr: ver=0x1 type=0x1 code=0x65 sid=0x0200 length=0x000c (PADS)
PPPoE tag: type=0101 length=0000 (Service name) PPPoE tag: type=0103 length=0004 (Host Uniq) data (bin): 08 c0 47 00
HOST_UNIQ successful match
SESSION
=====================================================================
客户端与服务器端进行ppp的LCP协商,建立链路层通信
LCP协议报文
configure-request
configure-ack
sent [LCP ConfReq id=0x1 <magic 0x9d768ef4>]
rcvd [LCP ConfReq id=0x1 <auth chap MD5> <magic 0x572cee2d>]
sent [LCP ConfAck id=0x1 <auth chap MD5> <magic 0x572cee2d>]
rcvd [LCP ConfReq id=0x1 <auth chap MD5> <magic 0x572cee2d>]
sent [LCP ConfAck id=0x1 <auth chap MD5> <magic 0x572cee2d>]
sent [LCP ConfReq id=0x1 <magic 0x9d768ef4>]
rcvd [LCP ConfAck id=0x1 <magic 0x9d768ef4>]
CHAP + MD5
CHAP 认证三次握手
C<--S 客户端接受挑战字
sent [LCP EchoRep id=0x0 magic=0x9d768ef4]
rcvd [CHAP Challenge id=0x5c
<536bbdbeb2101f5a0762643d6cf4f2a7b9a9877e5eb5>, name = "linux"]
C-->S 客户端将挑战字+passwd进行MD5摘要,MD5(chanllenge+passwd)发送给服务器端
sent [CHAP Response id=0x5c <e0e3094715901e6cb355bd806933878e>, name = "0912"]
rcvd [LCP EchoRep id=0x0 magic=0x572cee2d]
C<--S 服务器端验证完毕后,往客户端发送success或者fail信息
rcvd [CHAP Success id=0x5c "Access granted"]
认证结束,暂且到这里先
IPCP动态地址协商
============================================================
客户端发送 0.0.0.0地址
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]
rcvd [IPCP ConfReq id=0x1 <addr 10.10.8.230>] 服务器告诉客户端,我是10.10.8.230
客户端发送
sent [IPCP ConfAck id=0x1 <addr 10.10.8.230>]
//服务器应答分配ip ,gateway,DNS
rcvd [IPCP ConfNak id=0x1 <addr 10.10.8.232>
<ms-dns1 10.10.10.4> <ms-dns3 202.106.0.20>]
客户端发送
sent [IPCP ConfReq id=0x2 <addr 10.10.8.232>
<ms-dns1 10.10.10.4> <ms-dns3 202.106.0.20>]
ipcp.c,ipcp_printpkt,2045
rcvd [IPCP ConfAck id=0x2 <addr 10.10.8.232>
<ms-dns1 10.10.10.4> <ms-dns3 202.106.0.20>]
地址拿到了上网去吧!!!!!