cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1093
Views
4
Helpful
3
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
VIP

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

3 Replies 3

RedNectar
VIP
VIP

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.

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