Community discussions

Topic Author
Posts: 29
Joined: Wed Mar 10, 2010 9:00 am

API -> get Routing Tables

Tue Apr 05, 2016 4:08 pm

How to get all available routing tables?

for example - /ping a have routing-table parameter... how i can get it all from API?

User avatar
Forum Guru
Forum Guru
Posts: 2411
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: API -> get Routing Tables

Tue Apr 05, 2016 6:44 pm

Question is how would you get them from the command line...

I'm guessing "/ip route print", and then loop over that to find all distinct occurrences of "table".
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)
User avatar
Forum Guru
Forum Guru
Posts: 1219
Joined: Sat Nov 06, 2010 12:04 pm
Location: Timisoara, Romania

Re: API -> get Routing Tables

Tue Apr 05, 2016 9:48 pm

Routing tables may exist even if no route is associated with them. e.g. a VRF with no assigned IP address on its interface. Or a mangle rule setting a routing mark.
But there must be an direct method, since they appear in the dropdown lists in winbox.
If not, this is the moment of a feature request :-)
Torturing CCR1009-7G-1C-1S+, RB450G, RB750GL, RB951G-2HnD, RB960PGS, RB260GSP, OmniTIK 5HnD and NetMetal 922UAGS-5HPacD + R11e-5HnD in my home network.

Who is online

Users browsing this forum: No registered users and 9 guests