cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3891
Views
5
Helpful
5
Replies

ACI Endpoint IP list

sathyasai
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

RedNectar
VIP Alumni
VIP Alumni

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?

fabric <node_id range> show endpoint

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>

moquery -c fvIP

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>

 

icurl -k https://localhost/api/class/fvIp.json

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>

 

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

View solution in original post

5 Replies 5

RedNectar
VIP Alumni
VIP Alumni

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?

fabric <node_id range> show endpoint

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>

moquery -c fvIP

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>

 

icurl -k https://localhost/api/class/fvIp.json

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>

 

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

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

 

Hi @sathyasai ,

Thanks for your kind words!

Chris

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

@RedNectar 

hello if I run this command it does now show any output. Can you help to check what I am missing  ?

icurl -ks https://localhost/api/class/fvIp.json | jq ".imdata[].fvIp.attributes | .addr, .fabricPathDn"

 

Hi @MSJ1 ,

I'm not sure what the problem is - I just cut and pasted your command to the apic# prompt and got what I expected.

So - troubleshooting steps

  1. Do the other commands - like fabric nnn-nnn show endpoint and  moquery -c fvIp show any output?   The icurl command you are having a problem with uses the same data as moquery
  2. Try removing the jq filter - sometimes if you get that just a little bit wrong (a . in the wrong place for instance) you'll get nothing. If you get some output from  icurl -ks https://localhost/api/class/fvIp.json then you need to figure out what's gone wrong with the filter

I guess it could be a version problem - the fvIp object was introduced in ACI v5.1(1) - this is from the release notes:   

The "ip" attribute of the fvCEp class has been deprecated. IP addresses are now represented as fvIp children of fvCEp. This change provides better support for having multiple IP addresses on the same MAC address.

So if you are using a version of ACI older than v5.1(1) then you'll need to modify the command to something like

 icurl -ks https://localhost/api/class/fvCEp.json | jq ".imdata[].fvCEp.attributes | .ip" 

but even then, that will only give you the IP. Getting the path AND IP would be a whole new challenge.

RedNectar aka Chris Welsh.
Forum Tips: 1. Paste images inline - don't attach. 2. Always mark helpful and correct answers, it helps others find what they need.

Review Cisco Networking for a $25 gift card

Save 25% on Day-2 Operations Add-On License