Currently we manually document the connections to the ports of our switches. Of course, maintenance is a chore, and the documentation is out of date as soon as you save it.

Are there any tools for querying switches, preferably via SNMP, that can tell you what is connected on the other end?

For the record, we use primarily HP ProCurve switches.

  • old procurve switches support CDP. this has proven to be very handy w/ a tool like netdisco.
    – petrus
    Mar 28, 2011 at 18:52

7 Answers 7


Netdisco is the answer.

  • It can graph the network topology (as long as you use switches that support LLDP or CDP).
  • It can query the ARP tables (with SNMP) of these devices and tell you which port has which device connected it also resolves names with DNS and WINS.
  • It shows you the IP addresses used in you network, it also has an inventory of networking devices.
  • It can automatically discover the network topology (you just have to specify one network devices as a starting point).

Website: http://netdisco.org/

  • This looks like the tool that does exactly what I want. Doesn't look like it's been maintained in some time, but I will give it a whirl and see if I can make it work with our network. Thanks :) Jun 1, 2009 at 16:00
  • It is maintained in the CVS, but they did not make a release recently.
    – cstamas
    Jun 1, 2009 at 17:27

I have used GLPI (http://glpi-project.org/spip.php?lang=en) which I liked, spreadsheets (which are cumbersome but effective), and I have been looking at IP Plan (http://iptrack.sourceforge.net/) which seems nearly abandoned.

Since I'm going to be getting another admin soon (YAY), I'm going to go back to GLPI.

Also, I label each of the cables going to the switch with a Brother p-touch labeler. It's pretty cheap, but it's better than nothing.

  • Does GLPI automatically discover what devices are connected to the ports on a switch, or is it something you have to update yourself? May 30, 2009 at 21:49
  • 1
    +1 for labeling, if I find one more 'mystery'cable...
    – TonyUser
    May 30, 2009 at 22:03
  • Seems labels always fall off the cables. We use a Dyno labeler to label all our servers, and have occasionally applied it to power cords and network cables. The labels always seem to fall off after a while, especially if they're in the exhaust of a server. What's the secret? May 30, 2009 at 22:15
  • Do your labels wrap back on themselves? If they don't you can always wrap them in cellotape after.
    – Tanj
    May 30, 2009 at 22:37
  • They do wrap, but eventually become unstuck. I may try the cellotape. Jun 1, 2009 at 15:59

NetDisco is quite a big cannon. For a simpler script, look at switchmap. It walks the switches' MAC tables, ARP tables, CDP et al to generate static web pages. These nicely summarize the port assignments.

  • Awesome little bugger, worked like a charm! Jan 23, 2015 at 14:50

I'm a BIG fan of NST's Managed Switch Port Mapping Tool www.netscantools.com/spmapmain.html

It's not free, but is very useful in troubleshooting as well as documenting networks. It uses SNMP and ARP to give you the MAC and IP address (and will do DNS lookups as well) of all the devices connected to each port on a given switch.

Big thumbs up for this tool!


You could become well versed at NMAP and use that as your updated network mapper. Though I think that would prove to be too cumbersome. I stick to the label maker and my primary tool for this situation.

  • I thought NMAP worked at the Network Layer and not the Data Link Layer. Does it query the switch?
    – pcapademic
    May 31, 2009 at 9:36
  • You're absolutely right. I was thinking about that this morning.
    – scotthere
    May 31, 2009 at 18:26

OpenNMS features layer2 discovery through SNMP collection (as I'm sure do other similar tools).

OpenNMS will pull in MAC, VLAN and STP information from managed devices, and use this to build up a l2 topology, which it can then map. (Native mapping currently only works for IE, but the next stable release - 1.8 - I think will have better mapping support). You can see which nodes are connected to a given node on a per-port basis.

Alternatively, if you're comfortable writing something yourself, snimpy provides an excellent programmatic interface to SNMP, bypassing a lot of the overhead of programming for SNMP. I've used it recently to generate a live summary of vlans per port, something our switches didn't report cleanly.


I have written a Perl program that runs on Linux/FreeBSD to track all devices on your Cisco network (IOS/NX-OS/ASA). It uses SSH/Telnet (no SNMP) to connect to the devices, and stores all the data in a MySQL database. It's highly modular, is geared towards medium and large networks, includes an GUI and CLI interface, and has a library that can be used by other programs. There are many features, so just check the webpage:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.