免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2573 | 回复: 5
打印 上一主题 下一主题

急求:PPPOE协议问题??? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-09-17 09:13 |只看该作者 |倒序浏览
PPPOE协议是内核级协议,还是用户级协议?
怎么调用PPPOE协议提供的接口?

论坛徽章:
0
2 [报告]
发表于 2007-09-17 11:59 |只看该作者
man pppoe




DESCRIPTION
       pppoe  is a user-space client for PPPoE (Point-to-Point Protocol over Ethernet) for Linux and other UNIX systems.  pppoe works in concert with the pppd PPP daemon to provide a PPP connection over Ethernet, as is used by many ADSL service providers.

.....


PPPOE BACKGROUND
       PPPoE (Point-to-Point Protocol over Ethernet) is described in RFC 2516 and is a protocol which allows the session abstraction to be maintained over bridged Ethernet  networks.

       PPPoE works by encapsulating PPP frames in Ethernet frames.  The protocol has two distinct stages:  The discovery and the session stage.

       In the discovery stage, the host broadcasts a special PADI (PPPoE Active Discovery Initiation) frame to discover any access concentrators.  The access concentrators (typically, only one access concentrator) reply with PADO (PPPoE Active Discovery Offer) packets, announcing their presence and the services they offer.  The host  picks  one of the access concentrators and transmits a PADR (PPPoE Active Discovery Request) packet, asking for a session.  The access concentrator replies with a PADS (PPPoE Active Discovery Session-Confirmation) packet.  The protocol then moves to the session stage.

       In the session stage, the host and access concentrator exchange PPP frames embedded in Ethernet frames.  The normal Ethernet MTU is 1500 bytes,  but  the  PPPoE  overhead plus  two  bytes  of  overhead  for the encapsulated PPP frame mean that the MTU of the PPP interface is at most 1492 bytes.  This causes all kinds of problems if you are using a Linux machine as a firewall and interfaces behind the firewall have an MTU greater than 1492.  In fact, to be safe, I recommend setting the MTU of machines behind the firewall to 1412, to allow for worst-case TCP and IP options in their respective headers.

       Normally,  PPP  uses the Link Control Protocol (LCP) to shut down a PPP link.  However, the PPPoE specification allows the link to be shut down with a special PADT (PPPoE Active Discovery Terminate) packet.  This client recognizes this packet and will correctly terminate if a terminate request is received for the PPP session.

[ 本帖最后由 hahasasa 于 2007-9-17 12:00 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2007-09-17 17:07 |只看该作者
PPPoE 是二层协议,内核级用户级都使用

论坛徽章:
0
4 [报告]
发表于 2007-09-18 12:50 |只看该作者
which line is it at? in .config

论坛徽章:
0
5 [报告]
发表于 2007-09-22 14:10 |只看该作者
我要的是PPPOE协议的底层接口,而不是协议的运行原理,我要编程的!请问高手指点一二!

论坛徽章:
0
6 [报告]
发表于 2007-09-22 16:07 |只看该作者
那应该看一下 pppoe-server 的源代码,它实际上就是调用了内核态的 pppoe 协议接口实现的 pppoe 服务
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP