Community discussions

MikroTik App
 
andrescamino
Member Candidate
Member Candidate
Topic Author
Posts: 198
Joined: Wed Aug 19, 2009 7:07 pm
Location: Guayaquil-Ecuador

problem to change ip route distance with script

Thu Feb 28, 2013 5:10 am

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
 
andrescamino
Member Candidate
Member Candidate
Topic Author
Posts: 198
Joined: Wed Aug 19, 2009 7:07 pm
Location: Guayaquil-Ecuador

Re: problem to change ip route distance with script

Thu Feb 28, 2013 5:19 am

nevermind...i was using the wrong sintax...instead of edit it's set
/ip route set distance=2 number=1 
thanks anyway

Who is online

Users browsing this forum: No registered users and 18 guests