最近在调试881的PPPOE自动拨号功能,但是怎么调都跳不上,所以Debug了881的PPPOE EVENTS,产生了部分事件代码,遂在网上查找了完整的PPPOE EVENTS事件代码以待不时之需。(由于其中大部分是转载别人的,也就不再详述了)
CISCO#debug pppoe events
*Jun 7 10:42:07.875: padi timer expired
*Jun 7 10:42:07.875: padi timer expired
-----------------------PADI(PPPoE Active Discovery Initiation)-----------------------
*Jun 7 10:42:07.875: Sending PADI: Interface = FastEthernet1/0
*Jun 7 10:42:07.875: Sending PADI: Interface = FastEthernet1/0
-----------------------PADO(PPPoE Active Discovery Offer)-----------------------
*Jun 7 10:42:07.907: PPPoE 0: I PADO R:ca00.0868.001c L:ca01.0868.001c Fa1/0
*Jun 7 10:42:09.923: PPPOE: we've got our pado and the pado timer went off
*Jun 7 10:42:07.907: PPPoE 0: I PADO R:ca00.0868.001c L:ca01.0868.001c Fa1/0
*Jun 7 10:42:09.923: PPPOE: we've got our pado and the pado timer went off
-----------------------PADR(PPPoE Active Discovery Request)-----------------------
*Jun 7 10:42:09.923: OUT PADR from PPPoE Session
*Jun 7 10:42:09.923: OUT PADR from PPPoE Session
-----------------------PADS(PPPoE Active Discovery Session-confirmation)-----------------------
*Jun 7 10:42:10.015: PPPoE 2: I PADS R:ca00.0868.001c L:ca01.0868.001c Fa1/0
*Jun 7 10:42:10.015: IN PADS from PPPoE Session
*Jun 7 10:42:10.015: PPPoE 2: I PADS R:ca00.0868.001c L:ca01.0868.001c Fa1/0
*Jun 7 10:42:10.015: IN PADS from PPPoE Session
-----------------------
*Jun 7 10:42:10.027: %DIALER-6-BIND: Interface Vi2 bound to profile Di1
*Jun 7 10:42:10.031: PPPoE: Virtual Access interface obtained.
*Jun 7 10:42:10.031: PPPoE : encap string prepared
*Jun 7 10:42:10.031: [0]PPPoE 2: data path set to Virtual Acess
*Jun 7 10:42:10.043: %LINK-3-UPDOWN: Interface Virtual-Access2, changed state to up
*Jun 7 10:42:13.331: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access2, changed state to up
*Jun 7 10:42:10.027: %DIALER-6-BIND: Interface Vi2 bound to profile Di1
*Jun 7 10:42:10.031: PPPoE: Virtual Access interface obtained.
*Jun 7 10:42:10.031: PPPoE : encap string prepared
*Jun 7 10:42:10.031: [0]PPPoE 2: data path set to Virtual Acess
*Jun 7 10:42:10.043: %LINK-3-UPDOWN: Interface Virtual-Access2, changed state to up
*Jun 7 10:42:13.331: %LINEPROTO-5-UPDOWN: Line protocol on Interface Virtual-Access2, changed state to up
解释一下:(下面说明摘录自
http://blog.sina.com.cn/s/blog_4db83b6f01000apf.html)
1. PADI:PPPoE发现阶段的第一步。用户主机以广播的方式发送PADI数报包,请求建立链路。Code域置为0x09,会话ID域必须置为0x0000。
2. PADO:PPPoE发现阶段的第二步。访问集中器(AC)以单播的方式发送一个PADO数据包对主机的请求做出应答。目的地址为主机的MAC地址,Code域置为0x07,会话ID域必须置为0x0000。PADO数据包必须包含一个类型为AC-Name的Tag(包含了访问集中器的名字)。
3. PADR:PPPoE发现阶段的第三步。因为PADI数据包是广播的,所以主机可能收到不止一个的PADO报文。主机在收到报文后,会根据AC-Name或者PADO所提供的服务来选择一个AC,然后主机向选中的AC单播一个PADR数据包。目的地址域为AC的MAC地址,Code域置为0x19,会话ID域必须置为0x0000。PADR报文必须且只能包含一个Tag_Type为Service-Name的Tag,表明主机请求的服务。
4. PADS:PPPoE发现阶段最后一步。当AC在收到PADR报文时,就准备开始一个PPP的会话了。它为PPPoE会话创建一个唯一的会话ID并用单播一个PADS数据包来给主机做出响应。目的地址域为主机的MAC地址,Code域置为0x65,会话ID必须设置为所创建好的会话ID。
转载于:https://blog.51cto.com/7492110/1264876