- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 01:39 AM
Could you please provide me the moquery for getting the static endpoint mapping where no endpoint is learned?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 12:48 PM - edited 03-27-2024 12:06 PM
Hi @shubhanshu_jaiswal ,
You can see the static endpoint mappings using
admin@apic1:~> moquery -c fvRsPathAtt
You can then use something like awk
or sed
to extract the paths that are used from the dn
field. Let's call this list_1. E.g.
admin@apic1:~> moquery -c fvRsPathAtt | egrep dn | sed 's/.*topology\(.*\)]]/\1/' | sort /pod-1/paths-2201/pathep-[eth1/11 /pod-1/paths-2201/pathep-[eth1/12 /pod-1/paths-2201/pathep-[eth1/13 /pod-1/paths-2201/pathep-[eth1/9 /pod-1/paths-2202/extpaths-192/pathep-[eth1/11 /pod-1/paths-2202/extpaths-192/pathep-[eth1/12 /pod-1/paths-2202/extpaths-192/pathep-[eth1/13 /pod-1/paths-2202/extpaths-192/pathep-[eth1/28 /pod-1/protpaths-2201-2202/pathep-[T01:L2201..2202:1:31_VPCIPG
Next, you could use the following to get a list of the static endpoints
admin@apic1:~> moquery -c fvCEp
Again, use something like awk
or sed
to extract the paths that have endpoints from the fabricPathDn
field. Let's call this list_2. E.g.
admin@apic1:~> moquery -c fvCEp | egrep fabricPathDn | sed 's/.*topology\(.*\)]/\1/' | sort
fabricPathDn : fabricPathDn : fabricPathDn : fabricPathDn : fabricPathDn : fabricPathDn : /pod-1/paths-2201/pathep-[eth1/11 /pod-1/paths-2201/pathep-[eth1/12 /pod-1/paths-2201/pathep-[eth1/28 /pod-1/paths-2201/pathep-[eth1/5 /pod-1/paths-2201/pathep-[eth1/9 /pod-1/paths-2201/pathep-[T01:L2201..2202:1:31_VPCIPG /pod-1/paths-2202/extpaths-192/pathep-[eth1/11 /pod-1/paths-2202/extpaths-192/pathep-[eth1/28 /pod-1/paths-2202/pathep-[eth1/10 /pod-1/paths-2202/pathep-[eth1/10 /pod-1/paths-2202/pathep-[T01:L2201..2202:1:31_VPCIPG
Notes:
- Note the subtle difference in the sed commands between the two (there's an extra ] character in the 1st one)
- Note the blank entries in the 2nd list - these entries represent endpoints that don't have a fabricPathDn value because they VMs deployed via VMM
- The fabricPathDn output in list_2 is slightly different to the output for the dn output in list_1 for the VPC because the dn includes BOTH leaves in the name, whereas the fabricPathDn shows an entry for EACH leaf. You'd have to tweak the
sed
expression a bit to cater for that.
For every entry in list_2
remove the corresponding entry in list_1
done
Whatever entries you have left in list_1 will be a list of static endpoint mapping where no endpoint is learned
Unless this is something you want to do often, I'd be pasting list_1 and list_2 into two columns in Excel and sorting each, then use conditional formatting to highlight the relevant mappings. Like this:
- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
- default, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
This is a modal window. This modal can be closed by pressing the Escape key or activating the close button.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 12:48 PM - edited 03-27-2024 12:06 PM
Hi @shubhanshu_jaiswal ,
You can see the static endpoint mappings using
admin@apic1:~> moquery -c fvRsPathAtt
You can then use something like awk
or sed
to extract the paths that are used from the dn
field. Let's call this list_1. E.g.
admin@apic1:~> moquery -c fvRsPathAtt | egrep dn | sed 's/.*topology\(.*\)]]/\1/' | sort /pod-1/paths-2201/pathep-[eth1/11 /pod-1/paths-2201/pathep-[eth1/12 /pod-1/paths-2201/pathep-[eth1/13 /pod-1/paths-2201/pathep-[eth1/9 /pod-1/paths-2202/extpaths-192/pathep-[eth1/11 /pod-1/paths-2202/extpaths-192/pathep-[eth1/12 /pod-1/paths-2202/extpaths-192/pathep-[eth1/13 /pod-1/paths-2202/extpaths-192/pathep-[eth1/28 /pod-1/protpaths-2201-2202/pathep-[T01:L2201..2202:1:31_VPCIPG
Next, you could use the following to get a list of the static endpoints
admin@apic1:~> moquery -c fvCEp
Again, use something like awk
or sed
to extract the paths that have endpoints from the fabricPathDn
field. Let's call this list_2. E.g.
admin@apic1:~> moquery -c fvCEp | egrep fabricPathDn | sed 's/.*topology\(.*\)]/\1/' | sort
fabricPathDn : fabricPathDn : fabricPathDn : fabricPathDn : fabricPathDn : fabricPathDn : /pod-1/paths-2201/pathep-[eth1/11 /pod-1/paths-2201/pathep-[eth1/12 /pod-1/paths-2201/pathep-[eth1/28 /pod-1/paths-2201/pathep-[eth1/5 /pod-1/paths-2201/pathep-[eth1/9 /pod-1/paths-2201/pathep-[T01:L2201..2202:1:31_VPCIPG /pod-1/paths-2202/extpaths-192/pathep-[eth1/11 /pod-1/paths-2202/extpaths-192/pathep-[eth1/28 /pod-1/paths-2202/pathep-[eth1/10 /pod-1/paths-2202/pathep-[eth1/10 /pod-1/paths-2202/pathep-[T01:L2201..2202:1:31_VPCIPG
Notes:
- Note the subtle difference in the sed commands between the two (there's an extra ] character in the 1st one)
- Note the blank entries in the 2nd list - these entries represent endpoints that don't have a fabricPathDn value because they VMs deployed via VMM
- The fabricPathDn output in list_2 is slightly different to the output for the dn output in list_1 for the VPC because the dn includes BOTH leaves in the name, whereas the fabricPathDn shows an entry for EACH leaf. You'd have to tweak the
sed
expression a bit to cater for that.
For every entry in list_2
remove the corresponding entry in list_1
done
Whatever entries you have left in list_1 will be a list of static endpoint mapping where no endpoint is learned
Unless this is something you want to do often, I'd be pasting list_1 and list_2 into two columns in Excel and sorting each, then use conditional formatting to highlight the relevant mappings. Like this:
- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
- default, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
This is a modal window. This modal can be closed by pressing the Escape key or activating the close button.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 01:05 AM
Thanks for the detailed answered; however for some reason, I am getting stuck when I entered the command:
moquery -c fvRsPathAtt
It does not return anything.
Do I need to provide any DN as well. I would like to get the details for the whole fabric endpoint in one go. But it seems not happening. Does it have to do with Version of APIC?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 01:49 AM - edited 01-29-2024 01:55 AM
Hi @shubhanshu_jaiswal ,
[Edit: I've just had a thought - maybe you aren't doing static mappings, but mapping up from the AAEP rather than doing Static Mappings. If that is the case, that's a whole new ball-game and much harder to TS.]
Re the version of ACI, I've just tested the command on 4.2(7r) and 5.2(7g) - and it worked in both cases
And you definitely don't need to add a dn - that would only restrict the result to the particular dn you specified
So to check - find a static mapping, right-click on it and choose Open in Object Store Browser - you should then see an instance of a fvRsPathAtt object. If you then click on the fvRsPathAtt heading, you should see all instance of that class (the same as moquery)
Let me know how that goes. Here's a video
- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
- default, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
This is a modal window. This modal can be closed by pressing the Escape key or activating the close button.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 01:57 AM
I appreciate you helping me out. I am getting the following error:
"Unable to process the query, result dataset is too big"
Do you know workaround for this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2024 12:30 PM
Hi @shubhanshu_jaiswal ,
Ok - but you didn't say exactly WHEN you get the error. Is it
- When you do the moquery command (although you previously said "It does not return anything." so I guess not
- When you right click and open the Object Store Browser
- Side Q: Did you see ANYTHING when When you right clicked and opened the Object Store Browser?
- When you clicked on the fvRsPathAtt heading.
IF it was case #3 above:
you have at least proved that there are objects of type fvRsPathAtt, and may explain why you got no output from moquery.
I think the next trick to try is to use icurl instead of moquery, but if indeed the result dataset is too big, this may not work either.
Tip: | Enter icurl commands from the bash command line rather than the APIC command line - this makes it MUCH easier to use the ? character in your query |
apic1# bash
admin@apic1:~> icurl -k -s 'https://localhost/api/node/class/fvRsPathAtt.json' | jq
If this also shows no results or the result dataset is too big error, then your idea of using a dn may in fact be on the right track.
To test this, choose your smallest tenant - lets call it Tenant01, (or use the common tenant) and try this command.
admin@apic1:~> moquery -c fvRsPathAtt -d uni/tn-Tenant01
If that gives you some output, then you can keep repeating for each tenant until you've built your spreadsheet!
IF it was case #1 or2 above:
Then I guess you you try the same suggestions, but I'd need more detail to chase any further.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 01:08 AM
I created a list of dn for application EPGs and ran your moquery one by one. It worked. Thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 01:28 AM
Brilliant. Glad you got it figured.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.
