你的浏览器无法正常显示内容,请更换或升级浏览器!

ROS多线叠加PCC参数掉线自动修正

tenfei
tenfei
发布于2023-10-17 15:38 阅读901次
ROS多线叠加PCC参数掉线自动修正
ros多拨会存在某线断开,无法实现PCC分线问题,分享一段PCC在多拨下的自动修正程序: #将脚本命名保存,创建计划任务 执行:execute script="脚本名称" ``` :local status :local i 0 :local x 0 :local y 0 :local z 0 :set x [:len [/interface pppoe-client find running=yes]] :set i [:len [/interface pppoe-client find ]] :if ($x<=$i) do={ :for ii from=1 to=$i do={ :set status [/interface get [find name=("pppoe-out".$ii)] running] :if ($status=true) do={ /ip firewall mangle set [find chain="prerouting" action="mark-connection" new-connection-mark="pppoe-out".$ii."-pcc"] per-connection-classifier=("both-addresses:".$x."/".$y) disable=no /ip firewall mangle set [find chain="prerouting" connection-mark="pppoe-out".$ii."-pcc" action="mark-routing" new-routing-mark="pppoe-out".$ii."-route"] disable=no /ip firewall mangle set [find chain="input" in-interface="pppoe-out".$ii action="mark-connection" new-connection-mark="pppoe-out".$ii."-pcc"] disable=no /ip firewall mangle set [find chain="output" connection-mark="pppoe-out".$ii."-pcc" action="mark-routing" new-routing-mark="pppoe-out".$ii."-route"] disable=no /ip firewall nat set [find chain="srcnat" out-interface="pppoe-out".$ii] disable=no :set y ($y+1) } else={ /ip firewall mangle set [find chain="prerouting" action="mark-connection" new-connection-mark="pppoe-out".$ii."-pcc"] disable=yes /ip firewall mangle set [find chain="prerouting" connection-mark="pppoe-out".$ii."-pcc" action="mark-routing" new-routing-mark="pppoe-out".$ii."-route"] disable=yes /ip firewall mangle set [find chain="input" in-interface="pppoe-out".$ii action="mark-connection" new-connection-mark="pppoe-out".$ii."-pcc"] disable=yes /ip firewall mangle set [find chain="output" connection-mark="pppoe-out".$ii."-pcc" action="mark-routing" new-routing-mark="pppoe-out".$ii."-route"] disable=yes /ip firewall nat set [find chain="srcnat" out-interface="pppoe-out".$ii] disable=yes } } } ```

2

0

文章点评
暂无任何评论
Copyright © from 2021 by namoer.com
458815@qq.com QQ:458815
蜀ICP备2022020274号-2