Page 1 of 1

API -> get Routing Tables

Posted: Tue Apr 05, 2016 4:08 pm
by Multik
How to get all available routing tables?

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

thanks!

Re: API -> get Routing Tables

Posted: Tue Apr 05, 2016 6:44 pm
by boen_robot
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".

Re: API -> get Routing Tables

Posted: Tue Apr 05, 2016 9:48 pm
by docmarius
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 :-)