I was playing around with SNMP one day and decided to find out if I could create a MS-DOS batch job using only a single batch file and a free SNMP command line tool from the Internets. Here's what I came up with. To get this to work you need the following:
1. Create a directory (ie, C:\BATCH\FINDMAC)
2. Place FINDMAC.CMD into directory from step #1 (save attachment as FINDMAC.CMD)
3. Create a file in directory from step #1 called sitelist.txt. This file should be a simple text file, comma-delimited, with two items per record. Neither item can have spaces. Item 1 should be a friendly name to identify a site or a distribution layer device. It's just something that you can easily remember. Item 2 is a FQDN or IP address of a seed device (typically, this would be a distribution switch on which one or more layer 3 neworks terminate).
4. Download SNMP command line tools from net-snmp.org and install into the path (or modify the script to point to the correct location for the SNMPGET and SNMPWALK programs)
5. Open a DOS window, navigate to the directory from step #2 and type "findmac.cmd <sitename> <macaddress>" where <sitename> matches a site from sitelist.txt and <macaddress> is a mac address in the format xx.xx.xx.xx.xx.xx
This process works great for me on a Windows 7 workstation. I can quickly locate the access port for any MAC address at our HQ or any of our branch locations. Our environment has 7Ks, 5Ks, 6500s, 3750s, and 3550s.