歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> SuSe Linux 下安裝 ADSL

SuSe Linux 下安裝 ADSL

日期:2017/2/27 9:47:10   编辑:更多Linux
  用過ADSL的人都知道,在WINDOWS上有一個叫WinPPoE的軟件,通過這個軟件可以很容易地聯上ISP,接入INTERNET。    您想知道在Linux上如何通過ADSL上網嗎?我剛試成功,現在就迫不急待地告訴您:我用的是SuSe Linux 6.4, 選擇它的原因是它對硬件的支持很豐富而且配置方便。    1、Packege    SuSe 6.4已含pppoed-0.46-7,下載    2、設置網卡和網關 # ifconfig eth0 mtu 1492 (不要為eth0設任何IP地址)並確保你的default gateway 為空。    3、Add your login name and passWord to /etc/ppp/pap-secrets and /etc/ppp/chap-secrets. 這兩個文件應象這樣: "[email protected]" * "mypassword"    4、編輯/etc/resolve.conf nameserver 202.96.134.133 nameserver 202.96.128.68    5、在/etc/modules.conf中加入下面一行: alias char-major-144 pppox(實際上這一行在我的Suse中已存在了)    6、修改文件 /etc/ppp/options.           # general options           idle 600           # this is a must           user "[email protected]"           sync           local           nocrtscts           noauth           usepeerdns           mru 1490           mtu 1490           # this is recommended           defaultroute           hide-password           nodetach           #           # switch off all compressions           # this is a must           noaccomp           nopcomp           # this is recommended           novj           novjccomp           nobsdcomp           nodeflate           noccp    注意:Replace with your own login name.    7、運行 /usr/sbin/pppoed開始連接。注意:只有root 用戶可以啟動連接。    If you use a network device other than eth0, youll need to start /usr/sbin/pppoed with the option -I ethX, where X is the number of the device..    8、檢驗、測試連接用tail -f /var/log/messages可跟蹤並診斷ADSL的連接狀態,用ifconfig可以查看你的ppp0設備被分配的IP地址,如果地址分配成功,就說明已建立連接。用route命令可查看拔入服務器為你指定的網關地址。用ping www.163.com應該可以ping通,如果不通,有可能是你的DNS設置問題。    9、代理局域網上網再安裝一個網卡,設置IP地址為192.168.1.1; 加入一條IP轉發的規則:


/sbin/ipchains -A forward -j MASQ -s 192.168.1.0/24 -d 0.0.0.0/0局域網內client將192.168.1.1設為缺省網關,就可通過這台LINUX電腦上網。 如果你想做一個Linux Proxy server,請參閱本站有關Squid Server的文章。    以上是本人在Suse Linux上實現的經驗,在Redhat上,您可參閱: http://www.roaringpenguin.com/pppoe.Html,本人也試過,認為只要/etc/ppp/options的內容與Suse中設置一樣,就應該可以成功。您不妨試一下。



Copyright © Linux教程網 All Rights Reserved