Hi There
i need script to change interface ip if the destination ping timeout we have 4 public ip e.g 10.0.0.2, 10.0.0.3, 10.0.0.4 and single gateway 10.0.0.1 According to check every ip one by one
:local i 0; {:do {:set i ($i + 1)} while (($i < 5) && ([/ping 72.14.207.104 interval=3 count=1]=1)};
:if ($i=5 && [ /ip address set 2 address=10.0.0.2]= ([/ping 72.14.207.104 interval=3 count=1]=1)false) ($i + 1)} while (($i < 5) && ([/ping 72.14.207.104 interval=3 count=1]=1)};
:if ($i=5 && [ /ip address set 2 address=10.0.0.3]([/ping 72.14.207.104 interval=3 count=1]=1)=false) ($i + 1)} while (($i < 5) && ([/ping 72.14.207.104 interval=3 count=1]=1)};
:if ($i=5 && [ /ip address set 2 address=10.0.0.4]([/ping 72.14.207.104 interval=3 count=1]=1)=false) }