+ -
当前位置:首页 → 问答吧 → 如何让slackware 10 使用河南网通线路拨号端顺利上网

如何让slackware 10 使用河南网通线路拨号端顺利上网

时间:2005-08-29

来源:互联网

我不想骂网通 我知道骂人 是不能解决问题的.
而且我也学会了去静静的欣赏别人骂人
受网通压迫了很久不能用slackware上公网
一年前以为那该死的java enus拨号端可以解决问题
谁知白白浪费我两天的时间
最近发现新出了linux拨号程序,down下来试试
刚开始不能用,错误输出提示.根据提示做了一些调整,可以正常使用,现分享大家


首先不要更改/etc/rc.inet1.conf中的设置
如果其中设置了,就把信息删除.
保持ethx(我这里是eth1)在开机的时候没有起用DHCP,更不能自己分配地址.
下载河南网通的最近拨号程序 http://218.29.0.252/racer/linux/racer.tar.gz
解压缩到/usr/local/racer
运行命令将公网接口拉起
代码:
ifconfig eth1 up
然后运行命令 让公网接口自动分配一个10开头的地址
代码:
dhcpcd eth1
得到IP地址
如下信息输出:
代码:
eth1 Link encap:Ethernet HWaddr 00:06:5B:6A:D2:29
 inet addr:10.161.39.107 Bcast:10.161.39.255 Mask:255.255.255.0
 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:480 errors:0 dropped:0 overruns:326 frame:0
 TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:34335 (33.5 Kb) TX bytes:3720 (3.6 Kb)
 Interrupt:11 Base address:0xe880
在/usr/local/racer中运行如下命令
代码:
root@slack:/usr/local/racer# sh ecou.sh start
All names of your net interface installed
-----------------------------------------
 eth0 0
 eth1 1
Input one name to hace access with Internet (eth0): eth1
The name of interface is: eth1
The process is checking your IP address, please hold on ...
sh: line 1: ifdown: command not found
sh: line 1: ifup: command not found
Please Enter your LOGIN: ZZA10009838
Input a password: and your PASSWORD:
Your passwd is correct, please wait for renewing IP address ...
sh: line 1: ifdown: command not found
sh: line 1: ifup: command not found
racer has been started successfully
root@slack:/usr/local/racer# You have got a CORRECT ip address with 10.161.39.107, so could you keep your surfering with INTERNET
呵呵,这个时候还不能用,因为还没有更新到公网IP,但是用户名和口令验证包已经发出去了
看看错误提示 ,原来没有ifdown 和ifup的命令,我们继续
代码:
ifconfig eth1 down
ifconfig eth1 up
然后 杀掉dhcp信息
代码:
dhcpcd -k eth1
重新获得dhcp信息
代码:
dhcpcd eth1
这个时候会出现错误提示
代码:
root@slack:/usr/local/racer# [2005-08-29 04:36:13] Your IP Address has been changed under no conditions, to be terminated
The process is going to quit ...
sh: line 1: ifdown: command not found
sh: line 1: ifup: command not found
You have halted this process, and for normal network, please run it again, Thanks!!!
原来racer进程发现eth1接口ip已经改变,ps一下,发现进程自动退出了.
正好,我们再运行一次吧.
代码:
root@slack:/usr/local/racer# sh ecou.sh start
All names of your net interface installed
-----------------------------------------
 eth0 0
 eth1 1
Input one name to hace access with Internet (eth0): eth1
The name of interface is: eth1
The process is checking your IP address, please hold on ...
sh: line 1: ifdown: command not found
sh: line 1: ifup: command not found
Please Enter your LOGIN: ZZA10009838
Input a password: and your PASSWORD:
Your passwd is correct, please wait for renewing IP address ...
sh: line 1: ifdown: command not found
sh: line 1: ifup: command not found
racer has been started successfully
root@slack:/usr/local/racer# You have got a CORRECT ip address with 219.156.81.143, so could you keep your surfering with INTERNET
哈哈,终于获得公网IP了.

保持dhcpcd 进程 和 racer进程不退出的情况下就不会断线,我已经做了好几个晚上的实验
代码:
ps -axf

 1726 ? Ss 0:00 dhcpcd eth1
 1832 pts/1 S 0:00 ./racer eth1
再看看无任何其他网络软件运行 racer 干了些什么
代码:
netstat -a

udp 0 0 219.156.81.143:32769 202.111.142.3:2167 ESTABLISHED
原来如此

把以上过程做一个shell 脚本,哈哈 舒服了


原文地址 http://slackware.zzmobile.com/blog/i...0050829_051312
欢迎讨论 后续 如何通过slackware在网通上做透明**.
http://slackware.zzmobile.com

作者: Recoilest   发布时间: 2005-08-29

补充

down.sh 脚本

#!/bin/sh
sh ecou.sh stop
ifconfig eth1 down
ifconfig eth1 up
sleep 5
/sbin/dhcpcd eth1 -k
ifconfig eth1 down
ifconfig eth1 up
sleep 5
dhcpcd eth1

作者: Recoilest   发布时间: 2005-08-29

网通专门提供了linux客户端拨号的脚本吗?
感觉第一次运行dhcpd时获得的应该是网通内部的私有网络地址,随后用racer获得的才是真正的公网地址吧。但为什么这么麻烦,不是直接获取到ip就能上网?是不是为了阻止带自动pppoe拨号的MODEM共享上网?

作者: chendy   发布时间: 2005-08-30

很简单,他不想让大家共享上网,据了解,河南只是一个开始

作者: Recoilest   发布时间: 2005-08-30

热门下载

更多