09-26-2023 11:23 AM
Hello Cisco Expert team- Looking for your support to find the way to list down all the active endpoint IP address in the a command line. We are in the process of DC migration. Need to know the remaining active endpoint IP address in the fabric
regards,
Sairam
Solved! Go to Solution.
09-26-2023 01:36 PM
Hi @sathyasai ,
I'm guessing that you don't. like the output of the show endpoints
command, otherwise you wouldn't be asking this question.
Now you probably could put the output of show endpoints
through some egrep filters, but I don't think that is the best way.
Why not try one of these?
apic1# fabric 1201-1202 show endpoint ---------------------------------------------------------------- Node 1201 (Leaf1201) ---------------------------------------------------------------- Legend: S - static s - arp L - local O - peer-attached V - vpc-attached a - local-aged p - peer-aged M - span B - bounce H - vtep R - peer-attached-rl D - bounce-to-proxy E - shared-service m - svc-mgr +-----------------------------------+---------------+-----------------+--------------+-------------+ VLAN/ Encap MAC Address MAC Info/ Interface Domain VLAN IP Address IP Info +-----------------------------------+---------------+-----------------+--------------+-------------+ mgmt:inb 10.10.0.11 L lo1 101 vlan-202 34ed.1b8b.5a2b L eth1/1 mgmt:inb vlan-202 10.10.2.2 L eth1/1 102/mgmt:inb vxlan-15040468 0022.bdf8.19ff L eth1/5 99 vlan-1001 0050.569b.f043 L eth1/9 common:SharedServices_VRF vlan-1001 10.100.0.5 L eth1/9 Tenant01:Production_VRF 10.101.0.201 L lo15 104 vlan-1011 b496.9174.d718 L eth1/11 <snip> ---------------------------------------------------------------- Node 1202 (Leaf1202) ---------------------------------------------------------------- Legend: S - static s - arp L - local O - peer-attached V - vpc-attached a - local-aged p - peer-aged M - span B - bounce H - vtep R - peer-attached-rl D - bounce-to-proxy E - shared-service m - svc-mgr +-----------------------------------+---------------+-----------------+--------------+-------------+ VLAN/ Encap MAC Address MAC Info/ Interface Domain VLAN IP Address IP Info +-----------------------------------+---------------+-----------------+--------------+-------------+ 76 vlan-202 34ed.1b8b.5a2b O tunnel18 mgmt:inb vlan-202 10.10.2.2 O tunnel18 79 vlan-1012 b496.9174.d71b L eth192/1/11 Tenant01:Production_VRF vlan-1012 10.101.12.10 L eth192/1/11 87 vlan-1014 0050.569b.9b31 LpV po4 Tenant01:Production_VRF vlan-1014 10.101.12.200 LV po4 <snip>
apic1# moquery -c fvIp | egrep "addr" addr : 10.100.0.5 addr : 10.113.11.11 addr : 10.114.11.11 addr : 10.114.12.12
<snip>
This is essentially the same as the moquery
example
apic1# icurl -ks https://localhost/api/class/fvIp.json | jq ".imdata[].fvIp.attributes.addr"
"10.113.11.11"
"10.114.11.11"
"10.114.12.12"
"10.113.12.12"
"10.100.0.5"
<snip>
The advantage of icurl
over moquery
is you can format the output much more nicely using jq
. For instance, if you wanted to see where each IP was attached:
apic1# icurl -ks https://localhost/api/class/fvIp.json | jq ".imdata[].fvIp.attributes | .addr, .fabricPathDn" "10.113.11.11" "topology/pod-1/paths-1201/extpaths-191/pathep-[eth1/23]" "10.114.11.11" "topology/pod-1/paths-1201/extpaths-191/pathep-[eth1/24]" "10.114.12.12" "topology/pod-1/paths-1202/pathep-[eth1/23]" "10.113.12.12" "topology/pod-1/paths-1202/pathep-[eth1/23]" <snip>
09-26-2023 01:36 PM
Hi @sathyasai ,
I'm guessing that you don't. like the output of the show endpoints
command, otherwise you wouldn't be asking this question.
Now you probably could put the output of show endpoints
through some egrep filters, but I don't think that is the best way.
Why not try one of these?
apic1# fabric 1201-1202 show endpoint ---------------------------------------------------------------- Node 1201 (Leaf1201) ---------------------------------------------------------------- Legend: S - static s - arp L - local O - peer-attached V - vpc-attached a - local-aged p - peer-aged M - span B - bounce H - vtep R - peer-attached-rl D - bounce-to-proxy E - shared-service m - svc-mgr +-----------------------------------+---------------+-----------------+--------------+-------------+ VLAN/ Encap MAC Address MAC Info/ Interface Domain VLAN IP Address IP Info +-----------------------------------+---------------+-----------------+--------------+-------------+ mgmt:inb 10.10.0.11 L lo1 101 vlan-202 34ed.1b8b.5a2b L eth1/1 mgmt:inb vlan-202 10.10.2.2 L eth1/1 102/mgmt:inb vxlan-15040468 0022.bdf8.19ff L eth1/5 99 vlan-1001 0050.569b.f043 L eth1/9 common:SharedServices_VRF vlan-1001 10.100.0.5 L eth1/9 Tenant01:Production_VRF 10.101.0.201 L lo15 104 vlan-1011 b496.9174.d718 L eth1/11 <snip> ---------------------------------------------------------------- Node 1202 (Leaf1202) ---------------------------------------------------------------- Legend: S - static s - arp L - local O - peer-attached V - vpc-attached a - local-aged p - peer-aged M - span B - bounce H - vtep R - peer-attached-rl D - bounce-to-proxy E - shared-service m - svc-mgr +-----------------------------------+---------------+-----------------+--------------+-------------+ VLAN/ Encap MAC Address MAC Info/ Interface Domain VLAN IP Address IP Info +-----------------------------------+---------------+-----------------+--------------+-------------+ 76 vlan-202 34ed.1b8b.5a2b O tunnel18 mgmt:inb vlan-202 10.10.2.2 O tunnel18 79 vlan-1012 b496.9174.d71b L eth192/1/11 Tenant01:Production_VRF vlan-1012 10.101.12.10 L eth192/1/11 87 vlan-1014 0050.569b.9b31 LpV po4 Tenant01:Production_VRF vlan-1014 10.101.12.200 LV po4 <snip>
apic1# moquery -c fvIp | egrep "addr" addr : 10.100.0.5 addr : 10.113.11.11 addr : 10.114.11.11 addr : 10.114.12.12
<snip>
This is essentially the same as the moquery
example
apic1# icurl -ks https://localhost/api/class/fvIp.json | jq ".imdata[].fvIp.attributes.addr"
"10.113.11.11"
"10.114.11.11"
"10.114.12.12"
"10.113.12.12"
"10.100.0.5"
<snip>
The advantage of icurl
over moquery
is you can format the output much more nicely using jq
. For instance, if you wanted to see where each IP was attached:
apic1# icurl -ks https://localhost/api/class/fvIp.json | jq ".imdata[].fvIp.attributes | .addr, .fabricPathDn" "10.113.11.11" "topology/pod-1/paths-1201/extpaths-191/pathep-[eth1/23]" "10.114.11.11" "topology/pod-1/paths-1201/extpaths-191/pathep-[eth1/24]" "10.114.12.12" "topology/pod-1/paths-1202/pathep-[eth1/23]" "10.113.12.12" "topology/pod-1/paths-1202/pathep-[eth1/23]" <snip>
09-28-2023 09:31 AM - edited 09-28-2023 09:31 AM
Hello Chris - Thank you very much for responding with a detailed excellent explanation. Very Helpful.
I am taking this chance to appreciate and thank you for your blogs in https://rednectar.net/ especally ACI contents. It is the first go to place to find answers for technical problems and queries. Most of the time, we get solution in your blogs itself. You are a Rock star for us
regards,Sairam
09-28-2023 01:14 PM
Hi @sathyasai ,
Thanks for your kind words!
Chris
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