
But keep in mind this all important caveat: Everyone is welcome to use it as it is, or build from it for your own needs. I went with this as it’s a great format to allow lots of other later manipulation of the data.Īs I always like to build things to be able to share, I have posted the final script to GitHub at.
The resulting data from the script is a JSON document. For this use case these “interfaces” wouldn’t be relevant and just generate noise in the report. The script also is configured to ignore interface names of “CPU”, “Sup-eth1(R)”, “vPC Peer-Link(R)”. The script takes as an input a list of interface names to skip/ignore when reporting interfaces where a MAC address is found. I have found most network engineers use common switch interfaces (often port-channel) as inter-switch links. This meant being able to ignore or rule out cases where MAC addresses show up on trunks automatically would be important. Our interest is in access ports where MAC Addresses show up, not inter-switch trunks. The simplest approach to identifying this subset was to make it an input to the script. I assumed there was a subset of devices in the network that performed the Layer 3 function, and where we’d check ARP tables. This lead to an interesting result with many MAC addresses skipped. In most cases this is probably a limited number of MACs, however in my network where I was testing we have a large number of L2 only networks. I followed this approach in my script, so if a MAC address was found in a MAC table, but no corresponding ARP entry was found the MAC address is ignored. The use case in the question specified the desire to start with the ARP table from network devices for the MAC address interface report. I wanted to create a tool that could be used across different environments and wasn’t strongly linked to a specific network or topology. With any project, it’s important to set out some guardrails to scope yourself in. We could do it manually with Excel, but is there an easier way?Īs with a lot of things in tech, once I dove in there were all sorts of interesting things that I learned, and questions about the workflow came up. We’ve a need to grab the IP table off our core, and associate it with MAC addresses and interfaces on edge switches. It was just the perfect project and distraction to work on as I got ready to start my holiday break. Hank and the Automation Trolley are here to help with your questions!Īs 2020 was wrapping up I got a great question in over email from a customer I’d been exchanging ideas on automation with for a bit.