ROS 6.15 自动修改PCC脚本
{
:local pppoeclientAllNum
:local pppoeclientRunNum
:local pppoeclientName
:local z 0
:set pppoeclientAllNum [:len ]
:log info ("pppoeclientAllNum".$pppoeclientAllNum)
:set pppoeclientRunNum [:len ]
:log info ("pppoeclientRunNum".$pppoeclientRunNum)
:if ($pppoeclientRunNum < $pppoeclientAllNum) do={
:for ii from=0 to=($pppoeclientAllNum-1) do={
:log info $ii
:if ($ii<=($pppoeclientRunNum-1)) do={
/ip firewall mangle set per-connection-classifier=("both-addresses:".$pppoeclientRunNum."/".$ii) comment=("PCC" . $pppoeclientRunNum . "-" . $ii) disable=no
/ip firewall mangle set new-connection-mark ]] disable=no
:log warning ("both-addresses:".$pppoeclientRunNum."/".$ii)
} else={
/ip firewall mangle set disable=yes
/ip firewall mangle set new-connection-mark ]] disable=yes
:log warning ("both-addresses:".$pppoeclientAllNum."/".$ii."disable")
}
}
}
:if ($pppoeclientRunNum = $pppoeclientAllNum) do={
:set z [:len ]
:log info $z
:if ($z>0) do={
:for ii from=0 to=($pppoeclientRunNum-1) do={
/ip firewall mangle set per-connection-classifier=("both-addresses:".$pppoeclientRunNum."/".$ii) comment=("PCC" . $pppoeclientRunNum . "-" . $ii) disable=no
/ip firewall mangle set new-connection-mark ]] disable=no
:log warning ("both-addresses:".$pppoeclientRunNum."/".$ii)
}
}
}
}
好像不是链接 就是路由 要是数字,忘了 自己测试,这个脚本 现在 在6.15上用完全可以。
页:
[1]