cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
891
Views
5
Helpful
3
Replies
DeepakPati31706
Beginner

VLAN Details are not available in epmMacEp API response

When I executed show mac address-table command for a node from APIC I got vlan,mac,interface information in the cli output.But when I executed API request in APIC for empMacEp command,I got mac and interface details only but no vlan information.Below is the sample example:

CLI output

---------

VLAN     MAC Address      Type      age     Secure NTFY Ports/SWID.SSID.LID

---------+-----------------+--------+---------+------+----+------------------

* 10       0050.5666.XXXX    dynamic      -       F    F    po3

 

API Response

------------

{
"epmMacEp":{
"attributes":{
"addr":"00:50:56:66:XX:XX",
"childAction":"",
"createTs":"2020-09-22T18:58:50.516+00:00",
"dn":"topology/pod-X/node-XXX/sys/inst-overlay-X/bd-[vxlan-16777209]/db-ep/mac-00:50:56:66:XX:XX",
"flags":"local,mac",
"ifId":"po3",
"modTs":"never",
"name":"",
"pcTag":"any",
"status":""
}
}
}

 

So,I would like to know how to get the vlan details for corresponding mac/interface for a node in Cisco ACI using API

 

Thanks,

 

Deepak Ranjan Pati

3 REPLIES 3
Sergiu.Daniluk
VIP Advocate

Query the fvCEp class, and you will find the encap vlan as well.

 

Stay safe,

Sergiu

Hi Sergiu,

 

Thanks for the reply.I tried querying the class with existing command as below but it failed.

 

https://<ip>:<port>/api/node/class/topology/pod-X/node-XXX/epmMacEp.json?rsp-subtree=children&rsp-subtree-class=fvCEp

 

I tried with below API also which returned empty result.

 

https://<ip>:<port>/api/node/class/topology/pod-X/node-XXX/fvCEp.json

 

Can you please tell me what is the right way to send the request to APIC while quering fvCEp Class.

 

Thanks,

 

Deepak Ranjan Pati

Hi Deepak,

 

First, I just noticed that you are looking at "show mac address-table" output on the leaf switch. DO NOT use this command as it is not relevant in the ACI. Use the "show endpoint" command.

Second, I tested the class you are using "epmMacEp" and it should display the vlan as well:

 

Leaf202# moquery -c epmMacEp | grep dn
dn           : sys/inst-overlay-1/bd-[vxlan-16777209]/db-ep/mac-D4:6D:50:DC:10:1B
dn           : sys/ctx-[vxlan-2293761]/bd-[vxlan-16121799]/vlan-[vlan-121]/db-ep/mac-D4:6D:50:DC:10:1B
dn           : sys/ctx-[vxlan-2293761]/bd-[vxlan-16121799]/vlan-[vlan-120]/db-ep/mac-00:50:56:8A:75:99
dn           : sys/ctx-[vxlan-2293761]/bd-[vxlan-16121799]/vlan-[vlan-120]/db-ep/mac-00:22:BD:F8:19:22
dn           : sys/ctx-[vxlan-2293761]/bd-[vxlan-16121799]/vlan-[vlan-120]/db-ep/mac-88:F0:31:00:74:C9
dn           : sys/ctx-[vxlan-2293761]/bd-[vxlan-16121799]/vlan-[vlan-120]/db-ep/mac-2C:D0:2D:C6:06:D6
dn           : sys/ctx-[vxlan-2785282]/bd-[vxlan-15269819]/db-ep/mac-8C:60:4F:DD:95:C1

As you can see, there are 2 EP for which I do not have any vlan mentioned, and that is expected because:

1. D4:6D:50:DC:10:1B - is learned through overlay-1 VRF. This is how it looks in endpoint table:

7/overlay-1                          vxlan-16777209    d46d.50dc.101b L                      eth1/1

2. 8C:60:4F:DD:95:C1 - is learned in vxlan

106/Tenant:VRF                  vxlan-15269819    8c60.4fdd.95c1 L                     eth1/23

 

Regarding the API call for fvCEp, you need to send it to APIC not to a Leaf.

 

Hope it helps,

Sergiu