脚本如下: 由于时间比较赶,没有对语句进行简化。 :if ([/in pppoe-c get [find name=ADSL-WAN2] running]=true) do { :set NewID2 [/ip route get [/ip route find dst-address=59.41.154.1/32 interface=ADSL-WAN2] pref-src] :set OldIP2 [/ip route get [find comment=2] gateway] :if ($NewID2 != $OldIP2 ) do { /ip address set [find comment=2] address=$NewID2 network=$NewID2 broadcast=$NewID2 /ip route set [find comment=2] gateway=$NewID2} } :if ([/in pppoe-c get [find name=ADSL-WAN3] running]=true) do {
|
本文来源:网络收集 作者:佚名