06-17-2020 05:11 AM
Dear specialists,
I'm an OSS engineer trying to understand Cisco APIC and SDN. Excuse my ignorance when it goes to network technologies, I haven't had the chance to be trained in those SDN things.... my know-how there was frozen at routers and switches with "show-running".
A network has been deployed on top of Nexus devices, using an APIC, version: 4.2(3l). I would like to use the REST API to recover some information from the live configuration, namely the list of virtual-port-channels, along with what port-channels are used to build them and what physical interfaces behind. So if this makes more sense, vPC --> Po --> Eth.
I know how to implement a REST client, but I can't grab this whole mess of fvCEp, fvAEPg, vpcIf, etc. Not sure if this needs to be that complex but I disgress...
Hints welcome !
Charles
Solved! Go to Solution.
06-17-2020 01:55 PM
Hi Charles,
Hopefully someone else will give you a better answer, but as a starter, try this
moquery -c pcAggrIf | egrep "^dn|fop"
the class pcAggrIf should contain all you need to know, and you can glean the po number, the node number and the physical interface from the above - although I'm not sure it distinguishes between PCs and VPCs.
Example
admin@apic1:~> moquery -c pcAggrIf | egrep "^dn|fop" dn : topology/pod-1/node-101/sys/aggr-[po18] fop : eth1/10 dn : topology/pod-1/node-101/sys/aggr-[po19] fop : eth1/43 dn : topology/pod-1/node-101/sys/aggr-[po20] fop : eth1/42 dn : topology/pod-1/node-101/sys/aggr-[po21] fop : eth1/41 dn : topology/pod-1/node-101/sys/aggr-[po22] fop : eth1/36 dn : topology/pod-1/node-102/sys/aggr-[po19] fop : eth1/10 dn : topology/pod-1/node-102/sys/aggr-[po20] fop : eth1/43 dn : topology/pod-1/node-102/sys/aggr-[po21] fop : eth1/42 dn : topology/pod-1/node-102/sys/aggr-[po22] fop : eth1/41 dn : topology/pod-1/node-102/sys/aggr-[po23] fop : eth1/36
I hope this helps
Don't forget to mark answers as correct if it solves your problem. This helps others find the correct answer if they search for the same problem
06-17-2020 01:55 PM
Hi Charles,
Hopefully someone else will give you a better answer, but as a starter, try this
moquery -c pcAggrIf | egrep "^dn|fop"
the class pcAggrIf should contain all you need to know, and you can glean the po number, the node number and the physical interface from the above - although I'm not sure it distinguishes between PCs and VPCs.
Example
admin@apic1:~> moquery -c pcAggrIf | egrep "^dn|fop" dn : topology/pod-1/node-101/sys/aggr-[po18] fop : eth1/10 dn : topology/pod-1/node-101/sys/aggr-[po19] fop : eth1/43 dn : topology/pod-1/node-101/sys/aggr-[po20] fop : eth1/42 dn : topology/pod-1/node-101/sys/aggr-[po21] fop : eth1/41 dn : topology/pod-1/node-101/sys/aggr-[po22] fop : eth1/36 dn : topology/pod-1/node-102/sys/aggr-[po19] fop : eth1/10 dn : topology/pod-1/node-102/sys/aggr-[po20] fop : eth1/43 dn : topology/pod-1/node-102/sys/aggr-[po21] fop : eth1/42 dn : topology/pod-1/node-102/sys/aggr-[po22] fop : eth1/41 dn : topology/pod-1/node-102/sys/aggr-[po23] fop : eth1/36
I hope this helps
Don't forget to mark answers as correct if it solves your problem. This helps others find the correct answer if they search for the same problem
06-18-2020 01:57 AM
06-18-2020 02:38 AM
Glad it helped. BTW, with the right google search you'll find a video that explains the method I used to determine the class.
06-18-2020 04:47 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