免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1011 | 回复: 0
打印 上一主题 下一主题

SuSe Linux 下安装 ADSL [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-12-12 23:28 |只看该作者 |倒序浏览

SuSe Linux 下安装 ADSL
                                                               
                              
                              
                                
                              
                              
                                
                                    
                                       
                                    
                                    
                                      
                                          
                                          
                                            
                                                 用过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
          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.
   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中设置一样,就应该可以成功。您不妨试一下。  
                                          
                                          
                                            


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12110/showart_61184.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP