NetBSD上的PPPOE

NetBSD的安装、升级、更新等日常问题请在这里讨论。

版主: lionux

回复
头像
lionux
锌 Zn
帖子: 457
注册时间: 2010-02-04 11:09

NetBSD上的PPPOE

帖子 lionux » 2010-02-19 22:44

现在用路由上了,以前一直拨号上网,我这里介绍的是 pppoe(4)的方法。
NetBSD里只要一个文件比OpenBSD要少。
[INDENT]/etc/ifconfig.pppoe0[/INDENT]
man里的内容如下;
[INDENT]create
! /sbin/ifconfig ne0 up
! /sbin/pppoectl -e ne0 $int
! /sbin/pppoectl $int myauthproto=pap myauthname=testcaller myauthsecret=donttell
inet 0.0.0.0 0.0.0.1 netmask 0xffffffff
#! /sbin/route add default -iface 0.0.0.1
up[/INDENT]

但是我这里的改成如下才可以拨上去:
[INDENT]create
! /sbin/ifconfig ne0 up
! /sbin/pppoectl -e ne0 $int
! /sbin/pppoectl $int myauthproto=pap myauthname=testcaller myauthsecret=donttell
0.0.0.0 0.0.0.1 up
! /sbin/route add default -iface 0.0.0.1[/INDENT]

(这里还需请高手解释!)
[INDENT]ne0 两处改成自己的网卡名, ifconfig -a 查看
testcaller 用户名
donttell 密码[/INDENT]
# /etc/rc.d/network start 拨号
这里觉得NetBSD比OpenBSD要方便,OpenBSD里不知道怎么断开和重拨。
# /etc/rc.d/network stop 断开
# /etc/rc.d/network start 重新拨号
最后配置好DNS就可以上网了
nameserver xxx.xxx.xxx.xxx > /etc/resolv.conf

头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

帖子 leo » 2010-02-19 22:48

好帖,因为原来在国内出差时几乎没有这种环境了,渐渐地就忽视了,有些时候还真是需要毕竟TCP/IP网络是unix的根。

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 26 访客