自动更改网关和防火墙地址
由于配置要求,无法设置添加默认路由=是。需要使用脚本来修改网关和防火墙地址列表。但是,以下脚本在运行时报告了错误。请大神帮忙看一看并修改它。谢谢。(7.10.2 版){
:local v6i "3"
:for v6ii from=1 to=$v6i do={
:local v6gateway gateway]
:set v6gateway [:pick $v6gateway 0 [:find $v6gateway "%"]]
:local v6adlist address]
:local v6ser
:local prefix
:if ($v6gateway != $v6ser) do={
/ipv6 route set gateway=($v6ser."%".("pppoe-out".$v6ii))}
:if ($v6adlist != $prefix) do={
/ipv6 firewall address-list set address=$prefix}
}
:local i
:local j
:local k
:local pf
:local gw "$%pppoe-out1"
:local addr
:local rgw
:if ($addr!=$pf) do={/ipv6 firewall address-list set $j address=$pf}
:if ($rgw!=$gw) do={/ipv6 route set $k gateway=$gw}
页:
[1]