Community discussions

MikroTik App
 
jakir69
just joined
Topic Author
Posts: 12
Joined: Mon Feb 06, 2017 9:00 am

IP Routes can be disabled using scripting.

Thu Apr 06, 2023 3:26 pm

when using command line in mikrotik, to disable ip route manually

for ex: i enter
/ip route set disabled=yes 10 (number of route item)

if i add or remove routes the item number gets changed

i want to disable specific routes at specific intervals

so is there any way to disable/enable routes by identifying comment or something similar using scripting.
 
User avatar
baragoon
Member
Member
Posts: 306
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Re: IP Routes can be disabled using scripting.  [SOLVED]

Thu Apr 06, 2023 3:29 pm

/ip/route/disable [find comment="$comment"]
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 12001
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: IP Routes can be disabled using scripting.

Thu Apr 06, 2023 3:49 pm

/ip/route/disable [find comment="$comment"]

Reply on compatible way, if the user use RouterOS v6, do not provide commands for RouterOS v7 only...

/ip route disable [find where comment~"search this text on the comment"]

Who is online

Users browsing this forum: Bing [Bot], diamuxin and 13 guests