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

Getting MAC address table using API

arikgelman
Level 4
Level 4

Hi,

I want to retrieve the MAC address table of a device\s using the API, is there a way to do that?

Thanks in advance,

Arik

5 Replies 5

Geevarghese Cheria
Cisco Employee
Cisco Employee

Hi Arik,

   You can check the Host inventory -Data displayed in the GUI about the hosts include the IP address, MAC address, and network attachment point.

   For related info refer -MAC Address of users connected to ISRG2 switched ports.

Thanks and Regards,

Geevarghese

aradford
Cisco Employee
Cisco Employee

Hi Arik,

if have a REST API example of how you can get the hosts (which are connected to a device) that will give their IP/MAc address.

Five APIC-EM API to improve network engineer productivity – part 2

In this example, i do not show the MAC address of each interface, but that is just a matter of changing the print statement. This will not tell you the MAC addresses of other network devices that are connected to this one, but will show all connected hosts.

In Part 4 (next day or so) i give an example of using a REST API to find a host by MAC or IP address and where it is connected to the network.

What are you trying to do with the MAC table?

I have published part 4 of the blog series..

Five APIC-EM API to improve network engineer productivity – part 4

arikgelman
Level 4
Level 4

Thank you very much for all your answers and the great blog from aradford

My problem is more complicated, I am using the APIC-EM to manage Cisco layer 2 switches only, my routers and firewalls are third party vendors. I am getting the ARP table from the third party devices using paramiko ssh module and using the Mac to ip, I want to compare it to the Mac address table from the switches, and I want to get the Mac address table using the API.

I am managing Cisco 3750/G/X switches.

Thanks in advance

Is there any way to get the MAC address table through NETCONF/RESTCONF/gRPC ?


https://IP_ADDR:443/restconf/data/Cisco-IOS-XE-native:native/mac does not provide the mac address-table data