Community discussions

MikroTik App
 
kelvinmurithi3229
just joined
Topic Author
Posts: 6
Joined: Mon Jul 19, 2021 5:50 am

CLI command not working or finding values

Thu Sep 15, 2022 5:06 am

I'm trying to run this command
 /ip route disable [find dst-address=0.0.0.0.0/0 gateway=10.15.30.1]
which I found on an article https://www.linkedin.com/pulse/basic-is ... y-symonds/. The command doesn't disable any of the routes despite them being there.

I also tried to find only and no results are returned.

It works if I use the find gateway only. ie.
 /ip route disable [find gateway=10.15.30.1]
.

What am I doing wrong here for the first 1 not to work?
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11439
Joined: Thu Mar 03, 2016 10:23 pm

Re: CLI command not working or finding values

Thu Sep 15, 2022 8:17 am

First make sure the [ find ... ] part works by running command
:put [ find ... ]

If find construct works, you should see some value printed (it'll probably be a meaningless value like *30000001). What I found is that sometimes one has to put quotes around CIDR IP address, and I tend to put spaces around square brackets:
/ip route
:put [ find dst-address="0.0.0.0.0/0" gateway=10.15.30.1 ]

Who is online

Users browsing this forum: Amazon [Bot], Bing [Bot], CGGXANNX, mantouboji and 52 guests