找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3668|回复: 7

[脚本] 这个脚本有什么问题?帮忙看看!

[复制链接]
发表于 2011-6-30 20:40:23 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

×
因为使用PPPOE拨号分配的某些IP,对网速影响很大。

所以想写个脚本,避开某些特定的IP段。

结果,发现不行,脚本无效。

各位兄弟帮忙看看,问题出在哪里?谢了

:local newaddress
:local specialip
:set newaddress [/ip address get [/ip address find dynamic=yes interface=("pppoe-out3")] address]
:set specialip [:pick $newaddress 0 3]
:if ($specialip=180) do={/interface pppoe-client disable pppoe-out3
:delay 65
/interface pppoe-client enable pppoe-out3}

70秒运行一次。
routeros
发表于 2011-7-1 20:39:23 | 显示全部楼层
路过,看看……
routeros
回复

使用道具 举报

发表于 2011-7-1 23:45:37 | 显示全部楼层
看不懂E文
routeros
回复

使用道具 举报

 楼主| 发表于 2011-7-15 19:40:43 | 显示全部楼层
帮忙看看!!
routeros
回复

使用道具 举报

发表于 2011-7-15 23:55:37 | 显示全部楼层
:local newaddress;
:local specialip;
:set newaddress [/ip address get [/ip address find dynamic=yes interface="pppoe-out3"] address] ;
:set specialip [:pick $newaddress 0 3] ;
:if ($specialip=180) do={
/interface pppoe-client disable pppoe-out3;
}
:delay 65;
/interface pppoe-client enable pppoe-out3}
routeros
回复

使用道具 举报

 楼主| 发表于 2011-7-16 20:35:42 | 显示全部楼层
谢谢,在4.10上测试未成功!
routeros
回复

使用道具 举报

 楼主| 发表于 2011-7-27 06:18:09 | 显示全部楼层
顶起来         !
routeros
回复

使用道具 举报

 楼主| 发表于 2012-3-23 19:46:34 | 显示全部楼层
:local newaddress
:local specialip
:set newaddress [/ip address get [/ip address find dynamic=yes interface=("pppoe-out1")] address]
:set specialip [:pick $newaddress 0 [:find $newaddress "."]]
:if ($specialip=180) do={
/interface pppoe-client disable pppoe-out1
:delay 15
/interface pppoe-client enable pppoe-out1}

在5.12测试成功!
routeros
回复

使用道具 举报

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

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-5-9 15:14 , Processed in 0.108803 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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