找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 3531|回复: 16

请问斑斑,关于pppoe的问题

[复制链接]
发表于 2007-2-19 14:52 | 显示全部楼层 |阅读模式
我想要有没有可以自动选择ip在pppoe的连接。

举个例子:

我想要ip:218.111.xxx.xxx范围里面。

因为我这里是有3种不同的ip连接。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
我的恩山、我的无线 The best wifi forum is right here.
发表于 2007-2-19 15:22 | 显示全部楼层
pppoe拨号的IP是 ISP分配的  不能你自己选的
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2007-2-19 15:46 | 显示全部楼层
如果用电脑写个scripts,可以选择ip的范围。就像你要连接218。111。xxx.xxx,可是你连接到60。xxx.xxx.xxx时候,他会disconnect他,然后连接回去。就是不停的连接到你想要的ip。

因为我这里的isp有三个不同开头的ip,他们之间,218.xxx.xxx.xxx是最好的。所以每次开机时我都要去disconnect 和connect。。。很麻烦咯。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2007-2-19 16:58 | 显示全部楼层
没人会吗??
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-2-19 17:07 | 显示全部楼层
你说可能吗?  

外网IP地址是ISP随机分配给你的  无法人为的加以限制
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2007-2-19 17:22 | 显示全部楼层
可能,我用modem连接电脑。

在别人写的scripts,当我用电脑来连接modem。

我只要run他的scripts,他就自动connect和disconnect。

直到连接到子定的ip。。

给大家看看他的scripts。。看看那位大大可以帮帮我。谢谢。

我在网上找,可是还没找到可以用在ddwrt上的。

'Script to auto connect/disconnect until you get the ip within a range that specified by you.

TempFileName="c:\ips.txt"    'Any temporary location
IPInString = "218.111"    'String to search for
IPNumber = "218."             'Beginning of IP to search for.
ConnectionName = "goodsver"  'the name of your goodsver connection
UserName = "xxxxxxxxxx@goodsver"'replace with your NETWORK ID
Password = "password"


'---------------------------------------------------------------------
sFlag = 0
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Set oFileSystem = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")
oShell.Run "%comspec% /c rasdial.exe " & ConnectionName & " /Disconnect"
Do While sFlag <> 1
        oShell.Run "%comspec% /c rasdial.exe " & ConnectionName & " " & UserName & " " & Password,2,true
        oShell.Run "%comspec% /c ipconfig.exe > " & TempFileName,2,true  'line 10
        Set oFile = oFileSystem.OpenTextFile(TempFileName, ForReading)
        'Search for IPs and check if in right domain
        Do While oFile.AtEndOfStream <> True
                  sIPAddress = oFile.ReadLine                        'Read line of temporary file
                If Instr(sIPAddress,IPInString) <>0  then        'Find line start with IP Address
                        ColonPos = Instr(21,sIPAddress,":")         'Find position of colon
                        sIPAddress = Mid(sIPAddress,ColonPos+2)        'Extract IP portion
                        If Trim(Left(sIPAddress,Len(IPNumber))) = IPNumber then 'Check of right IP
                                sFlag = 1  'Found good IP so set flag
                                exit do
                        End If
                End If       
        Loop 'Look for next IP
        If sFlag = 0 then
        oShell.Run "%comspec% /c rasdial.exe " & ConnectionName & " /Disconnect"
        oShell.Run "ping.exe -n 3 127.0.0.1", 0, True
        End If
Loop
If sFlag = 1 then   'Found good IP so process route table
oFile.Close
set oFile=nothing

'Delete temporary file.
oFileSystem.DeleteFile TempFileName,true

'Cleanup
set oTXTFile=nothing
set oFileSystem=nothing
set oShell = nothing

end if
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-2-19 17:32 | 显示全部楼层
你的意思就是编一个脚本 让它自动的帮你不停的连接和断开 直到连到你想要得IP段  你用猫当然可以实现 但是你要让路由这么做除非在编写fireware时就加进去  当然我是不懂这个的  我觉得路由无法实现这种功能

我觉得这样做没什么意义   不管什么IP段 服务器和出口带宽什么是一样的  至于你说的某个Ip段比较好那只是你的感觉坝了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-2-19 17:40 | 显示全部楼层
在dd下面应该是可行的,只是我不会,所以帮顶!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2007-2-19 23:41 | 显示全部楼层
其待高人。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-2-20 10:17 | 显示全部楼层
这样的想法比较搞笑,如果你看见过电信的设备配置,你就不会这么想了,因为分配给你的IP地址在速率上是一样的,并不是根据IP地址分配带宽的。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2007-2-20 14:33 | 显示全部楼层
还是在其待高人。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-2-20 15:28 | 显示全部楼层
我也觉得是没事找事做的!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2007-2-20 17:54 | 显示全部楼层
怎么会是没事找事做的呢,伤心,形容成这样。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2007-2-22 09:03 | 显示全部楼层
论坛里不是有高手会写脚本的吗,叫他帮忙呀
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2007-2-22 13:51 | 显示全部楼层
哦,在那里??我去找找。。谢谢版主。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 00:26

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表