APIC CLI to list up FEX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 10:08 AM
Is there any way to list up FEX in fabric instead of going one leaf by one leaf?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2020 12:08 PM - edited 04-16-2024 12:55 PM
Hi @solman ,
By "list up" I assume you want a CLI command. (Not that I know of a way to do it in the GUI anyway)
So try this one - a bit ugly, but it does what you askked.
moquery -c eqptExtCh
You can make it a bit tidier with egrep
moquery -c eqptExtCh | egrep "^id|^dn"
or
moquery -c eqptExtCh | egrep "^id|^dn|^descr"
Here's one I cooked in our lab
apic1# moquery -c eqptExtCh | egrep "^id|^dn|^descr" id : 191 descr : Fabric Extender 48x1GE + 4x10G Module dn : topology/pod-1/node-1201/sys/extch-191 id : 192 descr : Fabric Extender 48x1GE + 4x10G Module dn : topology/pod-1/node-1202/sys/extch-192
If you want to know more about moquery, try this google search
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
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
07-19-2020 11:39 PM
Hi @solman
Moquery is without question much faster option compared with what I will write below, this is in case you know the class/mo you want to query.
On the other hand, if you do not know the class/mo and you do not want to go through the GUI to find it out, or you simply want to use the NXOS type of outputs, you have this alternative:
apic1# fabric 101,111 show fex ---------------------------------------------------------------- Node 101 (Leaf101) ---------------------------------------------------------------- FEX FEX FEX FEX Number Description State Model Serial -------------------------------------------------------------------------- 101 FEX0101 Online N2K-C2348UPQ-10GE XXXXXXXXXXX ---------------------------------------------------------------- Node 111 (Leaf111) ---------------------------------------------------------------- FEX FEX FEX FEX Number Description State Model Serial -------------------------------------------------------------------------- 111 FEX0111 Online N2K-C2348UPQ-10GE XXXXXXXXXXX
You only need to specify the leafs you want to interrogate. basically, you run the "show" command against each of the mentioned leaf switches.
Stay safe,
Sergiu
