出现无法拨号的问题,一般采取以下步骤来判断故障原因:
1、首先将电话机接在ADSL线路上,检查线路是否正常,是否可以拨打电话。
2、如果线路正常,连接好adsl modem。先执行:adsl-stop,停止拨号程序,然后关闭adsl modem 电源,几秒钟后重新开启dsl modem 电源;在另一个终端上执行命令:tail -f /var/log/syslog ,然后使用adsl-start启动adsl拨号,观察syslog的信息,如果拨号日志显示程序工作正常,但显示timeout这样的失败原因,基本可以排除本地故障,确认电信接入设备故障,即可联系电信。
通过远程登陆到服务器上进行操作。
先试图重新加载拨号设备:使用ifconfig ppp0 down 和 ifconfig ppp0 up,系统不认设备ppp0。手动添加路由表,也没有效果。
重新启动系统,看ifconfig,仍然没有设备ppp0。
到目录 /var/log/目录下查看系统日志发现如下记录:
Apr 20 19:05:20 tj pppd[9297]: No response to 3 echo-requests
Apr 20 19:05:20 tj pppd[9297]: Serial link appears to be disconnected.
Apr 20 19:05:26 tj pppd[9297]: Connection terminated.
Apr 20 19:05:26 tj pppd[9297]: Connect time 142.7 minutes.
Apr 20 19:05:26 tj pppd[9297]: Sent 211833 bytes, received 5056180 bytes.
Apr 20 19:05:26 tj pppoe[9299]: read (asyncReadFromPPP): Session 3761: Input/output error
Apr 20 19:05:26 tj pppoe[9299]: Sent PADT
Apr 20 19:05:26 tj pppd[9297]: Exit.
这是一个拨号连接非正常断开的信息。对端的设备没有响应本地的请求,本地连接中止。
...
Apr 20 19:05:26 tj adsl-connect: ADSL connection lost; attempting re-connection.
Apr 20 19:05:31 tj pppd[9492]: pppd 2.4.1 started by root, uid 0
Apr 20 19:05:31 tj pppd[9492]: Using interface ppp0
Apr 20 19:05:31 tj pppd[9492]: Connect: ppp0 <--> /dev/pts/0
Apr 20 19:06:02 tj pppd[9492]: LCP: timeout sending Config-Requests
Apr 20 19:06:02 tj pppd[9492]: Connection terminated.
Apr 20 19:06:06 tj pppoe[9494]: Timeout waiting for PADO packets
Apr 20 19:06:06 tj pppd[9492]: Exit.
Apr 20 19:06:06 tj adsl-connect: ADSL connection lost; attempting re-connection.
...
这是本地拨号程序尝试重新连接并失败的信息。这表明ADSL连接是由于对端接入设备出现问题导致ADSL连接中止,并无法重新建立连接。
按上述方法:先执行:adsl-stop,停止拨号程序,;在另一个终端上执行命令:tail -f /var/log/syslog ,然后使用adsl-start启动adsl拨号,观察syslog的信息:
Apr 20 19:05:31 tj pppd[9492]: pppd 2.4.1 started by root, uid 0
Apr 20 19:05:31 tj pppd[9492]: Using interface ppp0
Apr 20 19:05:31 tj pppd[9492]: Connect: ppp0 <--> /dev/pts/0
Apr 20 19:06:02 tj pppd[9492]: LCP: timeout sending Config-Requests
Apr 20 19:06:02 tj pppd[9492]: Connection terminated.
Apr 20 19:06:06 tj pppoe[9494]: Timeout waiting for PADO packets
Apr 20 19:06:06 tj pppd[9492]: Exit.
Apr 20 19:06:06 tj adsl-connect: ADSL connection lost; attempting re-connection.
LCP: timeout sending Config-Requests说明是在发送配置请求时超时,问题出现在对方(电信)。需要联系电信解决。
说明:
附正常拨号日志记录:
拨号连接:
Apr 26 13:19:54 cs pppd[5398]: pppd 2.4.2 started by root, uid 0
Apr 26 13:19:54 cs pppd[5398]: Using interface ppp0
Apr 26 13:19:54 cs pppd[5398]: Connect: ppp0 <--> /dev/pts/1
Apr 26 13:19:54 cs pppoe[5401]: PADS: Service-Name: ''
Apr 26 13:19:54 cs pppoe[5401]: PPP session is 11441
Apr 26 13:19:55 cs pppd[5398]: Remote message: Welcome to use Quidway ROUTER, Huawei Tech.^M^J
Apr 26 13:19:55 cs pppd[5398]: PAP authentication succeeded
Apr 26 13:19:55 cs pppd[5398]: Couldn't set pass-filter in kernel: Invalid argument
Apr 26 13:19:55 cs pppd[5398]: Cannot determine ethernet address for proxy ARP
Apr 26 13:19:55 cs pppd[5398]: local IP address 213.61.33.28
Apr 26 13:19:55 cs pppd[5398]: remote IP address 213.61.33.1
上面是pppoe正常拨号并建立连接的信息,一般ADSL拨号成功都是这样,并可以看到获得IP地址:222.82.33.26;此时会有一个ppp0的设备出现,可通过ifconfig看到。
正常挂断,即使用adsl-stop命令:
Apr 25 21:46:19 cs adsl-stop: Killing pppd
Apr 25 21:46:19 cs pppd[32741]: Terminating on signal 15.
Apr 25 21:46:19 cs adsl-stop: Killing adsl-connect
Apr 25 21:46:19 cs pppd[32741]: Connection terminated.
Apr 25 21:46:19 cs pppd[32741]: Connect time 106.4 minutes.
Apr 25 21:46:19 cs pppd[32741]: Sent 445650 bytes, received 299213 bytes.
Apr 25 21:46:19 cs pppoe[32744]: read (asyncReadFromPPP): Session 10686: Input/output error
Apr 25 21:46:19 cs pppoe[32744]: Sent PADT
Apr 25 21:46:19 cs pppd[32741]: Exit.
本文地址:http://com.8s8s.com/it/it34428.htm