Hello every one in here:
I got a fix ip and a pppoe ip from my ISP.
I build a soure ip route to use them.
But the pppoe IP will change when the MT reboot.
So I write a script about it, but it can not work
Can any body help me?
:global ppp_stat1
:global ppp_network1
:global ppp_network2
/interface pppoe-client monitor pppoe-out1 once do={:set ppp_stat1 $status}
:if ($ppp_stat1=“connected”) do={
:set ppp_network1 [/ip address get [/ip add find interface=pppoe-out1] network]
:if ($ppp_network1!=$ppp_network2) do={
:set network2 $network1
/ip rou
set [/ip rou find comment=ppp] gateway=$network2
}
}
any wrong in it???