以前一直用的电信或者联通的ADSL宽带, 三个月前宽带到期了, 于是为了方便
直接从搞宽带出租的地方处拉了一根50元一个月的宽带, 也是用的pppoe拔号的
方式上网, 由于家里电脑比较多,于是就自然接了路由器, 用完三个月后觉得他
这家网速实在太差, 到期后又找了另外一家, 但问题来了, 这次路由器死活连不上
但在windows下拔号又可以, 当时打电话问宽带出租的,问他是不是封了二级路由
(因为我看到了他的路由是用的wayos, 后来百度一下,好多人说wayos有限制二级路由的功能),
但宽带出租的人说只是绑定了MAC地址,没有限制路由,后来我让他给我解绑了MAC地址,
但还是连不上, 折腾了一晚上还没好,期间把我的路由器刷了好几个openwrt版本, 最后把路由了刷坏了。
今天用串口线把路由给修好了, 后来想想这个问题应该看下openwrt的系统日志, 今天看了下
发现路由实际上有pppoe拔号成功的,只是隔几秒就断线,日志大概是这样的:
Aug 25 21:36:37 OpenWrt daemon.info pppd[357]: PPP session is 8964
Aug 25 21:36:37 OpenWrt daemon.info pppd[357]: Renamed ppp0 to pppoe-wan
Aug 25 21:36:37 OpenWrt daemon.info pppd[357]: Using interface pppoe-wan
Aug 25 21:36:37 OpenWrt daemon.notice pppd[357]: Connect: pppoe-wan <--> eth0
Aug 25 21:36:37 OpenWrt daemon.warn pppd[357]: appear to have received our own echo-reply!
Aug 25 21:36:37 OpenWrt daemon.notice pppd[357]: PAP authentication succeeded
Aug 25 21:36:37 OpenWrt daemon.notice pppd[357]: peer from calling number 00:4E:B8:3E:E0:68 authorized
Aug 25 21:36:38 OpenWrt daemon.notice pppd[357]: local IP address 10.0.0.2
Aug 25 21:36:38 OpenWrt daemon.notice pppd[357]: remote IP address 10.0.0.1
Aug 25 21:36:38 OpenWrt daemon.notice pppd[357]: primary DNS address 202.96.134.133
Aug 25 21:36:38 OpenWrt daemon.notice pppd[357]: secondary DNS address 202.96.128.68
Aug 25 21:36:38 OpenWrt daemon.warn pppd[357]: appear to have received our own echo-reply!
Aug 25 21:36:39 OpenWrt daemon.warn dnsmasq-dhcp[1203]: DHCP packet received on eth0 which has no address
Aug 25 21:36:39 OpenWrt daemon.warn pppd[357]: appear to have received our own echo-reply!
Aug 25 21:36:40 OpenWrt daemon.warn pppd[357]: appear to have received our own echo-reply!
Aug 25 21:36:41 OpenWrt user.notice root: starting ntpclient
Aug 25 21:36:41 OpenWrt user.notice rdate: No usable time server found
Aug 25 21:36:41 OpenWrt daemon.warn pppd[357]: appear to have received our own echo-reply!
Aug 25 21:36:42 OpenWrt daemon.info pppd[357]: No response to 5 echo-requests
Aug 25 21:36:42 OpenWrt daemon.notice pppd[357]: Serial link appears to be disconnected.
Aug 25 21:36:42 OpenWrt daemon.info pppd[357]: Connect time 0.1 minutes.
Aug 25 21:36:42 OpenWrt daemon.info pppd[357]: Sent 220 bytes, received 192 bytes.
Aug 25 21:36:42 OpenWrt daemon.notice pppd[357]: Connection terminated.
后来google了一下红色部分, 在一个国外的网站http://www.linuxforums.org/forum/debian-linux/46324-ubuntu-ppp-pap-secrets.html
找到一个方法,他的情况是在ubuntu下用gprs模块拔号出现问题,openwrt也是linux,我想应该也差不多吧,后来照他的方法试了试,终于搞好了。
记录一下,我的具体方法是:
修改 /etc/ppp/options文件
#debug
logfile /dev/null
noaccomp
nopcomp
nocrtscts
lock
maxfail 0
lcp-echo-failure 5
lcp-echo-interval 1
红色部分都改成0, 问题解决!!!