Page 1 of 1

problem to change ip route distance with script

Posted: Thu Feb 28, 2013 5:10 am
by andrescamino
Hello mikrotikers,

I am having troubles to change the distance in the routes with scripting, i can't find the way to do it, maybe you guys could give me a hint

This is the code that I'm trying to use but can't change it automatically to 2
:if ([/ping 8.8.8.8 count=5] = 5) do={
        /ip route edit number =1 value-name=distance 
}
And I'm kind of stucked in here...any answer to this??

Thanks for your help

Re: problem to change ip route distance with script

Posted: Thu Feb 28, 2013 5:19 am
by andrescamino
nevermind...i was using the wrong sintax...instead of edit it's set
/ip route set distance=2 number=1 
thanks anyway