Community discussions

MikroTik App
 
fsebera
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Thu Jun 03, 2021 6:19 pm

Searching for data at cli

Fri Jun 04, 2021 6:53 pm

Hi guys,
REPOSTING this message here hoping for better results - originally created under scripting.

I just learned how to get to the cli of my MikroTik router and quickly realized this is a much better way to configure and search for settings. However the search feature with "where" is a bit of a challenge for me. As example I would like to search for all MAC addresses that begin with specific characters (specific OUI vendor).

ip arp print - shows all mac addresses and I have to manually sort through them.
Is there a way to use the "where" command or other optional command to show just specific mac vendor addresses or other data where I my not know the exact complete string?

ip arp print where=00:0C:
or another example
ip route print where=192.168

Thank you
Frank
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Searching for data at cli

Fri Jun 04, 2021 7:14 pm

ip arp print where=00:0C:
or another example
ip route print where=192.168

where what?
also on natural language, where what???

= is =
= is not "contain"
Last edited by rextended on Fri Jun 04, 2021 7:21 pm, edited 3 times in total.
 
fsebera
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Thu Jun 03, 2021 6:19 pm

Re: Searching for data at cli

Fri Jun 04, 2021 7:19 pm

I thought the optional cli command "where" would allow me to view just the data matching my specified values. Maybe the optional "where" cli command is incorrect, I am new to RouterOS.
Is what I am asking for possible? Is this possible with any commands?

Thank you
Frank
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11967
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Searching for data at cli

Fri Jun 04, 2021 7:21 pm

I thought the optional cli command "where" would allow me to view just the data matching my specified values. Maybe the optional "where" cli command is incorrect, I am new to RouterOS.
Is what I am asking for possible? Is this possible with any commands?

Thank you
Frank

Like when you talk with someone, you must specify of what you mean...
/ip arp print where mac-address~"^00:0C:42"
^ = start with
Last edited by rextended on Fri Jun 04, 2021 7:23 pm, edited 3 times in total.
 
fsebera
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 63
Joined: Thu Jun 03, 2021 6:19 pm

Re: Searching for data at cli

Fri Jun 04, 2021 7:22 pm

Sorry, I did not see the last few lines of your message before responding ........ YES that works!!!!!!!!
THANK YOU
Frank

Who is online

Users browsing this forum: Bing [Bot], miks and 64 guests