找回密码
 注册

QQ登录

只需一步,快速开始

搜索
楼主: goodluck12

[负载平衡] 四线ADSL nth负载均衡 断线 掉线调整 报警脚本 多线ADSL可修改

[复制链接]
发表于 2008-12-13 00:30:34 | 显示全部楼层
思路是对的,但我想应是可以循环的,可以精简的
routeros
回复

使用道具 举报

发表于 2008-12-13 16:56:51 | 显示全部楼层
很多错误啊,试了不正常
:if ((!$adsl1-statu)&&($adsl2-statu)&&(!$adsl3-statu)&&(!$adsl4-statu)) do={
:if ([ip fi man get [/ip fi man find comm=443 action=mark-connection] new-connection-mark]!=2) do={/ip fi man set [/ip fi man find comm=443 action=mark-connection] new-connection-mark=2}
:if ([ip fi man get [/ip fi man find comm=adsl1] disabled]=no) do={/ip fi man dis [/ip fi man find comm=adsl1]}
:if ([ip fi man get [/ip fi man find comm=adsl2] disabled]=yes) do={/ip fi man en [/ip fi man find comm=adsl2]}
:if ([ip fi man get [/ip fi man find comm=adsl3] disabled]=no) do={/ip fi man dis [/ip fi man find comm=adsl3]}
:if ([ip fi man get [/ip fi man find comm=adsl4] disabled]=no) do={/ip fi man dis [/ip fi man find comm=adsl4]}
#:if ([ip fi man get [/ip fi man find comm=adsl1 action=mark-connection] nth]!=3,4,0) do={/ip fi man set [/ip fi man find comm=adsl1 action=mark-connection] nth=3,4,0}
:if ([ip fi man get [/ip fi man find comm=adsl2 action=mark-connection] nth]!=0,1,0) do={/ip fi man set [/ip fi man find comm=adsl1 action=mark-connection] nth=0,1,0}
#:if ([ip fi man get [/ip fi man find comm=adsl3 action=mark-connection] nth]!=3,4,2) do={/ip fi man set [/ip fi man find comm=adsl1 action=mark-connection] nth=3,4,2}
#:if ([ip fi man get [/ip fi man find comm=adsl4 action=mark-connection] nth]!=3,4,3) do={/ip fi man set [/ip fi man find comm=adsl2 action=mark-connection] nth=3,4,3}


上面这个是只有ADSL2在线
if ((!$adsl1-statu)&&($adsl2-statu)&&(!$adsl3-statu)&&(!$adsl4-statu))
设置NTH设置到 adsl1上去了

:if ([ip fi man get [/ip fi man find comm=adsl2 action=mark-connection] nth]!=0,1,0) do={/ip fi man set [/ip fi man find comm=adsl1 action=mark-connection] nth=0,1,0}

这只是其中一个错误例子

[ 本帖最后由 dhp 于 2008-12-13 17:18 编辑 ]
routeros
回复

使用道具 举报

发表于 2009-1-11 15:43:29 | 显示全部楼层
太复杂了.应该可以简单点的
routeros
回复

使用道具 举报

发表于 2009-1-12 02:59:51 | 显示全部楼层
不需要这么麻烦的
routeros
回复

使用道具 举报

发表于 2009-1-13 15:27:54 | 显示全部楼层
都是脚本
routeros
回复

使用道具 举报

发表于 2009-1-13 15:28:23 | 显示全部楼层
脚本对应问题
routeros
回复

使用道具 举报

发表于 2009-1-15 01:06:02 | 显示全部楼层
这东西导进去,估计路由器就不用干别的了...
routeros
回复

使用道具 举报

发表于 2009-1-17 12:08:02 | 显示全部楼层
强人一个,就是看不懂
routeros
回复

使用道具 举报

发表于 2009-2-23 21:30:40 | 显示全部楼层
认真看了一下脚本切换部份,发现4线应该有16种通断状态,楼主只列出14个状态,脚本还得加啊 呵呵
:if (($adsl1-statu)&&(!$adsl2-statu)&&($adsl3-statu)&&(!$adsl4-statu)) do={
.............切换........请参照楼主思路修改..........................
}
:if ((!$!adsl1-statu)&&($adsl2-statu)&&(!$adsl3-statu)&&($adsl4-statu)) do={
.............切换........请参照楼主思路修改..........................
}
routeros
回复

使用道具 举报

发表于 2009-2-25 14:35:27 | 显示全部楼层
好长的脚本呀。头好晕
routeros
回复

使用道具 举报

发表于 2009-2-26 18:28:17 | 显示全部楼层
routeros
回复

使用道具 举报

发表于 2009-3-5 11:04:25 | 显示全部楼层
这么长.看晕了
routeros
回复

使用道具 举报

发表于 2009-3-5 15:33:29 | 显示全部楼层
有不得必要嘛。。我晕喔。。几乎可以不用脚本的。
routeros
回复

使用道具 举报

发表于 2009-3-7 18:31:54 | 显示全部楼层
能简写最好。不要那么乱吧。发几个图说明一下更简洁
routeros
回复

使用道具 举报

发表于 2009-3-8 06:13:27 | 显示全部楼层
看后一直在晕
routeros
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-5-10 22:21 , Processed in 0.096773 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2023 Discuz! Team.

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