ROS多线负载PCC生成

脚本内容:
#拨号接口名前缀
:global adslname "pppoe-out"
#线路数量:
:global adslnum "3"
#内网段
:global lanip "192.168.0.0/24"

:for i from 1 to $adslnum do={/ip firewall mangle add action=mark-connection chain=prerouting comment=("pcc-". $i) connection-state=new disabled=no new-connection-mark=($i) passthrough=yes per-connection-classifier=("both-addresses:" . ($adslnum . "/" . ($i - 1))) src-address=($lanip)
/ip firewall mangle add action=mark-routing chain=prerouting comment=("route-" . $i) connection-mark=($i) disabled=no new-routing-mark=($i) passthrough=no src-address=($lanip)
/ip route add comment=($i) disabled=no dst-address=0.0.0.0/0 gateway=($adslname . $i) routing-mark=($i) scope=30 target-scope=10}
/ip firewall nat add action=masquerade chain=srcnat comment="default" disabled=no src-address=($lanip)

必须自行建立好拨号并设置好拨号的帐号密码,再导入此脚本。。