Linux中ADSL定時掉線問題

來源:互聯網
上載者:User

今天新裝了Redhat 5.4企業版,配置了一下PPPoe,準備就駕著本本遨遊了,可是令我奇怪的是,ppp的串連不停的掉線,新開一個終端,一直在Ping,發現網路隔一分鐘左右就自動掉一次,然後自動重新串連,查看message日誌,發現有如下內容,不斷重複:

Aug  5 23:20:53 localhost pppd[5754]: pppd 2.4.4 started by root, uid 0

Aug  5 23:20:53 localhost pppd[5754]: Using interface ppp0

Aug  5 23:20:53 localhost pppd[5754]: Connect: ppp0 <--> /dev/pts/0

Aug  5 23:20:53 localhost pppoe[5755]: PPP session is 33288

Aug  5 23:20:54 localhost pppd[5754]: appear to have received our own echo-reply!

Aug  5 23:20:54 localhost pppd[5754]: PAP authentication succeeded

Aug  5 23:20:54 localhost pppd[5754]: local  IP address 10.0.0.59

Aug  5 23:20:54 localhost pppd[5754]: remote IP address 10.0.0.1

Aug  5 23:21:14 localhost pppd[5754]: appear to have received our own echo-reply!

Aug  5 23:21:34 localhost pppd[5754]: appear to have received our own echo-reply!

Aug  5 23:21:54 localhost pppd[5754]: No response to 3 echo-requests

Aug  5 23:21:54 localhost pppd[5754]: Serial link appears to be disconnected.

Aug  5 23:21:54 localhost pppd[5754]: Connect time 1.0 minutes.

Aug  5 23:21:54 localhost pppd[5754]: Sent 6578 bytes, received 13132 bytes.

Aug  5 23:21:54 localhost pppd[5754]: Connection terminated.

Aug  5 23:21:54 localhost pppoe[5755]: read (asyncReadFromPPP): Session 33288: Input/output error

Aug  5 23:21:54 localhost pppoe[5755]: Sent PADT

Aug  5 23:21:54 localhost pppd[5754]: Exit.

Aug  5 23:21:54 localhost adsl-connect: ADSL connection lost; attempting re-connection.

Aug  5 23:21:59 localhost pppd[5846]: pppd 2.4.4 started by root, uid 0

Aug  5 23:21:59 localhost pppd[5846]: Using interface ppp0

Aug  5 23:21:59 localhost pppd[5846]: Connect: ppp0 <--> /dev/pts/0

Aug  5 23:21:59 localhost pppoe[5847]: PPP session is 33544

Aug  5 23:21:59 localhost pppd[5846]: appear to have received our own echo-reply!

Aug  5 23:21:59 localhost pppd[5846]: PAP authentication succeeded

Aug  5 23:22:00 localhost pppd[5846]: local  IP address 10.0.0.5

Aug  5 23:22:00 localhost pppd[5846]: remote IP address 10.0.0.1

Aug  5 23:22:19 localhost pppd[5846]: appear to have received our own echo-reply!

Aug  5 23:22:39 localhost pppd[5846]: appear to have received our own echo-reply!

Aug  5 23:22:59 localhost pppd[5846]: No response to 3 echo-requests

Aug  5 23:22:59 localhost pppd[5846]: Serial link appears to be disconnected.

Aug  5 23:22:59 localhost pppd[5846]: Connect time 1.0 minutes.

Aug  5 23:22:59 localhost pppd[5846]: Sent 31464 bytes, received 78172 bytes.

Aug  5 23:23:00 localhost pppd[5846]: Connection terminated.

Aug  5 23:23:00 localhost pppoe[5847]: read (asyncReadFromPPP): Session 33544: Input/output error

Aug  5 23:23:00 localhost pppoe[5847]: Sent PADT

Aug  5 23:23:00 localhost pppd[5846]: Exit.

本欄目更多精彩內容:http://www.bianceng.cn/OS/Linux/

隨即在網上搜了一下,發現網上出現此問題的人也不在少數,要麼修改/etc/ppp/options的內容,要麼就是修改/etc/ppp/pppoe-server-options的內容,我也在這兩個檔案上浪費了挺多的時,測試了挺久時間,網路狀況依然如故,後來一想,平常修改IP的設定之類的都在網卡上設定的,就試著在 vi /etc/sysconfig/network-scripts/ifcfg-ppp0  裡面作了修改,原檔案如下:

USERCTL=no

BOOTPROTO=dialup

NAME=DSLppp0

DEVICE=ppp0

TYPE=xDSL

ONBOOT=no

PIDFILE=/var/run/pppoe-adsl.pid

FIREWALL=NONE

PING=.

PPPOE_TIMEOUT=80

LCP_FAILURE=3

LCP_INTERVAL=20

CLAMPMSS=1412

CONNECT_POLL=6

CONNECT_TIMEOUT=60

DEFROUTE=yes

SYNCHRONOUS=no

ETH=eth0

PROVIDER=DSLppp0

USER=46804

PEERDNS=no

DEMAND=no

IPV6INIT=no

PERSIST=no

將此檔案內的二個地方作了修改:

LCP_FAILURE=30

LCP_INTERVAL=30

至此,一直末出現不間斷掉線的情況了,其實將上面兩個語句的任意一個值,修改得大些即可解決問題。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.