我要加入 登录
声振论坛 返回首页

FtpAdmin的个人空间 http://home.vibunion.com/?651 [收藏] [复制] [分享] [RSS]

日志

在SuSe Linux下安装ADSL

已有 366 次阅读2007-2-28 17:21 |个人分类: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. 这两个文件应象这样:
"szmycom@163.gd" * "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

Linux教程网


         idle 600
         # this is a must
         user "szmycom@163.gd"
         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.

www.linuxgo.org



  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上,您可参阅: Linux教程网
http://www.roaringpenguin.com/pppoe.html,本人也试过,认为只要
/etc/ppp/options的内容与Suse中设置一样,就应该可以成功。您不妨试
一下。

评论 (0 个评论)

facelist doodle 涂鸦板

您需要登录后才可以评论 登录 | 我要加入

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-20 00:06 , Processed in 0.030098 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

返回顶部