05-13-2022 08:40 AM
Hello!
I've been tasked with finding L3Out static routes from all of our tenants on the fabric - The data needs to be specific to a set of nodes.
At the moment we have around 100 or so tenants with quite a few static routes per tenant. So there is a fair chunk of data to obtain.
The data I need:
Specific Nodes (Lets for the sake of this question call them Nodes-A and B which are in VPC)
IP address
Next Hop Address.
Firstly, I completely understand the more experienced of you will read this and suggest I obtain this using the REST API or perhaps even writing a Python script to obtain the data from JSON.
However, my comprehension of these methods is very limited due to my experience with ACI as a whole.
With that being said, I am currently left with firing off Moqueries on specific Classes and dumping the data into a text file.
So far I've had no issues with that - Here is what I am executing:
moquery -c ipRouteP,ipNexthopP -d 'uni/tn-TENANT_NAME'
And Sure enough this is showing me the exact data I need.
What I am also doing is using Grep to filter the results to show only what I need:
'^#\|^dn\|^ip\|^nhAddr'
However, this shows me all of the routes for all nodes and I haven't been able to find a way to specifically filter out the nodes to show only the ones I want.
If anyone has achieved this please do share, because I have spent some time researching Grep filtering & Moqueries and I have not yet found an answer to my query.
Thank you in advanced!
Solved! Go to Solution.
05-17-2022 02:15 PM
Hi @AukeyPeach
You can use filters with wildcards, Example to get all static routes for node-101:
moquery -c ipRouteP -f 'ip.RouteP.dn*"node-101"'
Stay safe,
Sergiu
05-17-2022 02:15 PM
Hi @AukeyPeach
You can use filters with wildcards, Example to get all static routes for node-101:
moquery -c ipRouteP -f 'ip.RouteP.dn*"node-101"'
Stay safe,
Sergiu
05-20-2022 10:28 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide