在Linux下配置pppoe,一般有以下步驟:
1. 安裝pppoe軟件。這個不多說,ape-get install pppoe即可。
2. 設置撥號屬性:
root@ubuntu:~# pppoe-setup
詳細過程如下:
用戶名:
USER NAME >>> Enter your PPPoE user name (default test): test
接口(網卡):
INTERFACE >>> Enter the Ethernet interface connected to the DSL modem For Solaris, this is likely to be something like /dev/hme0. For Linux, it will be ethn, where 'n' is a number. (default eth0): eth0
dns:
>>> Enter the DNS information here:
密碼:
PASSWORD >>> Please enter your PPPoE password: >>> Please re-enter your PPPoE password:
防火牆:
The firewall choices are: 0 - NONE: This script will not set any firewall rules. You are responsible for ensuring the security of your machine. You are STRONGLY recommended to use some kind of firewall rules. 1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation 2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway for a LAN >>> Choose a type of firewall (0-2): 0
保存設置:
Ethernet Interface: eth0 User name: test Activate-on-demand: No DNS: Do not adjust Firewalling: NONE >>> Accept these settings and adjust configuration files (y/n)? y
保存成功了。
Congratulations, it should be all set up! Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring it down. Type 'pppoe-status' to see the link status.
3. 開始撥號
root@ubuntu:~# pppoe-start
到了這一步,如果沒有問題的話,應該就可以正常連上pppoe服務器了。
但在實際操作時,我遇到了以下兩個問題:
問題1:
root@ubuntu:~# pppoe-setup Welcome to the Roaring Penguin PPPoE client setup. First, I will run some checks on your system to make sure the PPPoE client is installed properly... Oops, I can't execute the program '/usr/local/sbin/pppd'. You must install the PPP software suite, version 2.3.10 or later.
原因:目錄/usr/local/sbin/沒有pppd文件
解決方法:
將/usr/sbin/pppoe-setup腳本里PPPD=/usr/local/sbin/pppd
改爲PPPD=/usr/sbin/pppd,保存修改後即恢復可正常
問題2:
root@ubuntu:~# pppoe-status: Link is down (can't read pppoe PID file /var/run/pppoe.conf-pppoe.pid.pppoe)
嘗試運行pppoe-connect,出現和問題一類似的錯誤
原因:同問題1所述
解決方法和問題1中類似:
將/usr/sbin/pppoe-connect腳本里PPPD=/usr/local/sbin/pppd
改爲PPPD=/usr/sbin/pppd,保存修改後即恢復可正常
總結:
在配置pppoe時遇到奇怪的問題,很有可能是有相應的腳本的路徑設置不當造成。