|
发表于 2005-9-1 18:49:57
|
显示全部楼层
Post by Recoilest
我不想骂网通 我知道骂人 是不能解决问题的.
而且我也学会了去静静的欣赏别人骂人
受网通压迫了很久不能用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
运行命令将公网接口拉起
然后运行命令 让公网接口自动分配一个10开头的地址
得到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信息
重新获得dhcp信息
这个时候会出现错误提示
- 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/bl ... d=a_20050829_051312
欢迎讨论 后续 如何通过slackware在网通上做透明代理.
http://slackware.zzmobile.com
补充
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
复制代码
up.sh 脚本
- #!/bin/sh
- ifconfig eth1 up
- dhcpcd eth1
- sh ecou.sh start
- sleep 10
- dhcpcd eth1 -k
- sleep 3
- dhcpcd eth1
- sleep 3
- sh ecou.sh stop
- sh ecou.sh stop
- sleep 3
- sh ecou.sh start
复制代码
Can this program RUN on Suse system? |
|