1
咱們經過下面的命令實現:
[root@Server root]# rpm -qa|grep pppoe
rp-pppoe-3.4-7
這個命令的輸出來肯定系統中是否已經安裝了pppoe這個包。rpm -qa是列出系統中已經安裝的包。經過管道|將這個命令的輸出,做爲第二個命令的輸入
[root@Server root]# rpm -ivh redhat/ppp-2.4.1-7.i386.rpm
這樣,你就安裝好了撥號須要的軟件。
2
撥號須要將撥號的網卡設置爲動態獲取ip。而動態獲取ip在機器啓動的時候,將會花費
[root@Server root]# vi /etc/sysconfig/network-scripts/ifcfg-eth
3
與ADSL相關的一共有四個命令adsl-connect
經過下面這
[root@Server root]# adsl-setup
首先,你會看到歡迎信息。
Welcome to the ADSL client setup. First, I will run some checks on
your system to make sure the PPPoE client is installed properly...windows
而後要求咱們輸入登錄名。
LOGIN NAME
Enter your Login Name (default root):瀏覽器
接着,要求咱們選擇使用的網絡接口。咱們這時候,填入咱們剛剛設置的那個網卡。對於大
INTERFACE
Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethX, where 'X' is a number.
(default eth0):
接下來,詢問的是,adsl鏈接之後,是否持續保持鏈接。或者是自動的斷開,在指定的
Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
Enter the demand value (default no):安全
再下來,就是dns了。我發現不少時候,pppoe都不可以正確獲取dns信息。我建
DNS
Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.服務器
賬號密碼是必須,輸入兩次。密碼顯示風格和其餘的地方同樣,不顯示在屏幕上。這個,我
PASSWORD
Please enter your Password:
Please re-enter your Password:網絡
下面的設置,是表示是否容許普通用戶啓用/關閉 ADSL鏈接。默認是容許。
Please enter 'yes' (two letters, lower-case.) if you want to allow
normal user to start or stop DSL connection (default yes):ide
咱們看下防火牆選項。這裏提供的防火牆能夠給你提供基本的安全保護。我不推薦你使用—
FIREWALLING
Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.
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):工具
是否在開機時,打開這個鏈接?
Do you want to start this connection at boot time?測試
全部的配置信息填寫完成以後,系統將給出一個報告,完整的顯示出你輸入的配置信息。如
Summary of what you entered
Ethernet Interface: eth0
User name: root
Activate-on-demand: No
DNS: Do not adjust
Firewalling: NONE
User Control: yes
Accept these settings and adjust configuration files (y/n)?
Please enter no or yes (default no):
Congratulations, it should be all set up!
Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0'
to bring it down.
Type '/sbin/ADSL-status /etc/sysconfig/network-scripts/ifcfg-ppp
to see the link status.
測試撥號
如今,咱們須要測試下咱們的撥號是否配置正確了。
輸入ADSL-start撥號。通常狀況下,我會ping 個人ISP的主WWW服務器。好比
ping 61.139.2.69(該地址是電信的DNS服務器)網站
若是能ping通則說明沒有什麼問題
若是不怕麻煩,打開瀏覽器測試下,也能夠。若是一切ok。那麼咱們就能夠結束咱們的配
固然,你關閉鏈接的話,使用命令adsl-stop就能夠了。
故障排除
照上邊的操做步驟配置下來,通常是沒有什麼問題的。可是由於Linux沒有Windows那麼直觀,出現問題的話,排除故障是很是惱火的。
故障1:沒法瀏覽網頁,可是能夠ping通DNS服務器地址,多半是在配置的時候DNS服務器地址填錯了。建議檢查一下DNS服務器是否正確。
故障2:用ifconfig查看連接,確實出現了三個連接,一個eth0,一個lo,一個ppp0,可是就是沒法ping通外網,這種狀況多出如今手動修改ifcfg-eth0文件,或者用netconfig命令的狀況下。
我查看了一下我Windows下和Linux下的路由信息發現少了以下路由,
Network
後來查了不少資料終於找到了問題所在,由於個人eth0網址信息是我手動修改的,因此就有GATEWAY這一項,
將/etc/sysconfig/network文件中的GATEWAY一項用#號註釋掉,
將/etc/sysconfig/network-scipts/ifcfg-eth0文件中的GATEWAY也註釋掉,
重啓撥號,OK了,終於OK了,倒杯茶,點根菸慶祝一下吧!!!