Implement FreeBSD Kernel PPPoe

王朝system·作者佚名  2006-11-23
窄屏简体版  字體: |||超大  

Ummmm, 还记得偶昨天贴得那个OS PPPOe性能大比拼的文章吧? FreeBSD, Linux2.2性能较低的原因是使用了userland的pppoe, 而NetBSD和Linux2.4使用的是kernel mode(内和级的),所以就.....。其实FreeBSD也是可以实现kernel mode的,只是手册上没有明确说明而已。经过一番查找,偶发现使用一个ports里带的软件合netgraph可以实现kernel pppoe, 这个软件名字叫mpd (/usr/ports/net/mpd), 有兴趣的可以自己试试,看看是不是快了许多。

mpd目前的版本是3.10,Ports里的说明文件是这样描述它的:"Mpd is a netgraph(4) based implementation of the multi-link PPP protocol for FreeBSD. It is designed to be both fast and flexible.It handles configuration and negotiation in user land, while routing. all data packets strictly in the kernel. It supports several of the numerous PPP sub-protocols and extensions....(下面略去约100字)

哦,对了。mpd的手册在这里,http://pink.the-7.net/~ab/mpd/mpd.html。有时间慢慢研究一下吧。

下面再提供一些配置mpd的例子(要配置三个文件),更多的例子可以在/usr/local/etc/mpd下找到。不过不要全部照抄哦。:-)

mpd.conf

PPPoE:

new -i ng0 PPPoE PPPoE

set iface addrs 1.1.1.1 2.2.2.2

set iface route default

set iface disable on-demand

set iface idle 0

set bundle disable multilink

set bundle authname username

set link no acfcomp protocomp

set link disable pap chap

set link accept chap

set link mtu 1492

set link mru 1492

set ipcp yes vjcomp

set ipcp ranges 0.0.0.0/0 0.0.0.0/0

open iface

mpd.links

PPPoE:

set link type pppoe

set pppoe iface rl0

set pppoe service "adsl"

mpd.secret

username "password"

配置完了以后用mpd -b启动mpd。更多的启动选项请敲mpd -h查看。

Ummm, 最后, 你可能还要在kernel里加上netgraph支持。 不过这些都留给你自己去试啦。成功了不要忘了回个贴哦。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航