查詢有關PPPoE的package
$ sudo apt-cache search pppoe
pppoeconf - configures PPPoE/ADSL connections pppoe - PPP over Ethernet driver pppstatus - console-based PPP status monitor
安裝
$ sudo apt-get install pppoeconf pppoe pppstatus
設定
$ sudo pppoeconf
根據問題回答yes/no,並且設定帳號密碼,設定完成後將自動連線
中斷
$ sudo poff若超過一個連線
$ sudo poff -a
重新建立連線
$ sudo pon dsl-provider
查詢log
$ sudo plog
預設撥接設定儲存位置,會override /etc/ppp/options
$ sudo vim /etc/ppp/peers/dsl-provider
lcp-echo-interval 30 # interval of sending request to adsl server lcp-echo-failure 10 # times of retry if sending request fail # Override any connect script that may have been set in /etc/ppp/options. persist # auto dial-up if lost connection user "user@isp.net" # dial-up user account
若是使用PAP驗證,則帳號密碼會儲存於
$ sudo vim /etc/ppp/pap-secrets
"user@isp.net" * "passowrd"
PPPoE斷線問題檢測先從查詢plog開始,若出現以下訊息表示超出嘗試次數還未能連接上
pppd[1624]: Timeout waiting for PADO packets
解決方法就是定時檢查連線狀態,若沒有連線則持續撥號,常用的檢查方法有ifconfig或是running process,簡單寫一下重新撥號的script
#!/bin/bash # auto dial-up # check ifconfig or check running process RETRY=5 PPP=`ifconfig|grep -in ppp` until [ $RETRY -le 0 ] || [ -n "$PPP" ] || [ -e /var/run/ppp0.pid ] do pon dsl-provider sleep 30 PPP=`ifconfig|grep -in ppp` ((RETRY=RETRY-1)) done
reference:
* 使用 PPPoEConf 連接 Internet
* Linux PPP HOWTO
沒有留言:
張貼留言