LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1605|回复: 3

pppoe server的pap问题

[复制链接]
发表于 2006-10-31 21:19:09 | 显示全部楼层 |阅读模式
我想用一个linux服务器,来模拟测试路由器的pppoe拨号的,环境里就只有一个服务器,ethernet card一个(eth0),与路由器(asus wl-500gP)的wan port连接起来。

发行版是suse10.1,带的ppp是ppp-2.4.3-31

然后去下载了rp-pppoe 3.8,然后
./configure --enalbe-plugin
make
make install

/etc/ppp/pap-secrets配置如下:
#client     server    secret     IP address
"usr"       *            "123"       *

/etc/ppp/chap-secrets的配置和pap-secrets一样

/etc/ppp/pppoe-server-options配置如下:
+pap
+chap
login
lcp-echo-interval 30
lcp-echo-failure 4
ms-dns 10.0.0.1

然后运行:
modprobe pppoe
pppoe-server -I eth0 -N 2 -L 10.0.0.1 -R 10.0.0.100 -r -u

client端提示:
Jan  1 00:05:23  pppd[86]: Starting link
Jan  1 00:05:23  pppd[86]: PPP session is 1
Jan  1 00:05:23  pppd[86]: Connect: ppp0 -> eth0
Jan  1 00:05:26  pppd[86]: Remote message: User not known to the underlying authentication module
Jan  1 00:05:26  pppd[86]: PAP authentication failed
Jan  1 00:05:26  pppd[86]: Connection terminated.
Jan  1 00:05:26  pppd[86]: Exit.

然后我用cat var/log/messages去看,纪录信息如下:
Oct 28 03:46:06 qt5 pppd[7795]: pppd 2.4.3 started by root, uid 0
Oct 28 03:46:06 qt5 pppd[7795]: Using interface ppp1
Oct 28 03:46:06 qt5 pppd[7795]: Connect: ppp1 <--> /dev/pts/2
Oct 28 03:46:07 qt5 pppd[7795]: Warning - secret file /etc/ppp/pap-secrets has world access
Oct 28 03:46:09 qt5 pppd[7795]: Warning - secret file /etc/ppp/pap-secrets has world access
Oct 28 03:46:09 qt5 pppd[7795]: PAP peer authentication failed for usr
Oct 28 03:46:09 qt5 pppd[7795]: Connection terminated.
Oct 28 03:46:09 qt5 pppoe[7796]: read (asyncReadFromPPP): Session 2: Input/output error
Oct 28 03:46:09 qt5 pppd[7795]: Script /usr/sbin/pppoe -n -I eth0 -e 2:00:15:f2:c7:e5:5d -S '' finished (pid 7796), status = 0x1
Oct 28 03:46:09 qt5 pppd[7795]: Exit.
Oct 28 03:46:09 qt5 pppoe-server[7794]: Session 2 closed for client 00:15:f2:c7:e5:5d (10.0.0.101) on eth0
Oct 28 03:46:09 qt5 pppoe-server[7794]: Sent PADT


请问问题出在哪里,是我的pap-scerets写的不对么?
 楼主| 发表于 2006-10-31 21:23:22 | 显示全部楼层
后来我试着把pap关掉,只留下chap
但是换了一个出错信息。。。

服务器的log是这样的:

Using interface ppp0
Connect: ppp0 <--> /dev/pts/2
LCP: timeout sending Config-Requests
Connection terminated.

client端也是报LCP: timeout sending Config-Requests

我已经弄了4天了,跟着很多资料去做,始终都是这样。。。

而且,资料说的用-k来跑内核模式的pppoe,但是总是报错说这个参数是无效的,我还为这个重新编译过内核。

请大大们帮忙看看吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-1 12:37:16 | 显示全部楼层
把rp-pppoe 3.8换成3.5后,问题解决了,pap还是会得不到验证,但是换成chap后可以建立连接了,但是会提示CCP timeout。。。

这是客户端的信息:

Jan  1 00:00:06  pppd[85]: Plugin rp-pppoe.so loaded.
Jan  1 00:00:06  pppd[85]: RP-PPPoE plugin version 3.3 compiled against pppd 2.4.2
Jan  1 00:00:06  pppd[86]: pppd 2.4.2 started by (unknown), uid 0
Jan  1 00:00:06  pppd[86]: Using interface ppp0
Jan  1 00:00:06  pppd[86]: local  IP address 10.64.64.64
Jan  1 00:00:06  pppd[86]: remote IP address 10.112.112.112
Jan  1 00:00:07  pppd[86]: Starting link
Jan  1 00:00:07  pppd[86]: PPP session is 1
Jan  1 00:00:07  pppd[86]: Connect: ppp0 -> eth0
Jan  1 00:00:11  pppd[86]: CHAP authentication succeeded: Access granted
Jan  1 00:00:11  pppd[86]: peer from calling number 00:48:54:5C:A2:B4 authorized
Jan  1 00:00:11  pppd[86]: Received bad configure-ack:
Jan  1 00:00:11  pppd[86]: Local IP address changed to 10.0.0.100
Jan  1 00:00:11  pppd[86]: Remote IP address changed to 10.0.0.1
Jan  1 00:00:14  pppd[86]: Received bad configure-ack:
Jan  1 00:00:17  pppd[86]: Received bad configure-ack:
Jan  1 00:00:20  pppd[86]: Received bad configure-ack:
Jan  1 00:00:23  pppd[86]: Received bad configure-ack:
Jan  1 00:00:26  pppd[86]: Received bad configure-ack:
Jan  1 00:00:29  pppd[86]: Received bad configure-ack:
Jan  1 00:00:32  pppd[86]: Received bad configure-ack:
Jan  1 00:00:33  PPPoE: connect to ISP
Jan  1 00:00:35  pppd[86]: Received bad configure-ack:
Jan  1 00:00:38  pppd[86]: Received bad configure-ack:
Jan  1 00:00:41  pppd[86]: CCP: timeout sending Config-Requests

服务器端的log文档里是这样的:

Using interface ppp0
Connect: ppp0 <--> /dev/pts/1
Script /etc/ppp/auth-up finished (pid 7697), status = 0x0
local  IP address 10.0.0.1
remote IP address 10.0.0.100
Script /etc/ppp/ip-up finished (pid 7700), status = 0x0

请问有人知道为什么有那样的log么
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-1 17:10:51 | 显示全部楼层
用笨办法解决了,在pppoe-server-options里加参数noccp,将压缩禁用后就没有这个提示了。。。。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表