Take the 2-minute tour ×

So, I've been using some port mapping software and running into a problem. We have many switches spread across the network, when I do a network scan it shows the device that is physically connected to a port, and in the case of a switch, all the devices that are connected to that switch and potentially all the devices that are connected to a port on that switch which is a switch and so on ad infinitum. What I'd like to do is figure out a way to determine exactly what is physically connected to each port. I don't need to know all the devices downstream - just that this physical device is connected to this port...and then if that device happens to be a switch, what devices are physically connected to that switch and so on. Any ideas?

share|improve this question
Pen, paper and comfy sneakers ... –  Iain Sep 29 '11 at 20:42
What kind of switches? –  Shane Madden Sep 29 '11 at 20:46
add comment

5 Answers

up vote 4 down vote accepted

Hopefully your network is as such:

  • If there's only one device on a switch port record the device MAC and compare it with your DHCP leases or server IPs
  • For the other ports, ask the switch what it's neighbor is (you're running managed switches, right? And they support CDP or something equivalent?)

If all your switches support, say, CDP and you can install CDP daemons on all/most of the other devices, you're in luck! Job's mostly done.

share|improve this answer
add comment

You can (theoretically) do this with InterMapper's Layer 2 module, but I've never tried it myself and can't speak for how well it works.

Sneakers and cable testers (The Testifier Pro will blink the link light) are probably your best bet.

share|improve this answer
add comment

They key to this is going to be checking the CAM table on each switch. This table holds the mappings on which MAC addresses it has seen recently on each physical interface.

Details on showing the CAM table obviously differ depending on switch manufacturer, software rev, etc.

share|improve this answer
The challenge then becomes mapping those MAC addresses to devices, how do you do that? –  Coding Gorilla Sep 29 '11 at 20:40
@CodingGorilla - well presumably you'd be able to look up this information in your inventory. Barring that, you're stuck with either looking in your DHCP logs or looking up the vendor OUI for each MAC address. That won't give you the exact device, but it might at least point you in the general direction. –  EEAA Sep 29 '11 at 20:43
either way, I wish the OP good luck; cuz I think the's got a monster job in front of him! =) –  Coding Gorilla Sep 29 '11 at 20:50
nmap scan will give you the MAC address too. you can even get the hostname right next to the mac address if you run the right flags! –  Silverfire Sep 30 '11 at 0:38
add comment

For some switches you could obtain this information easily through SNMP. For others there is now way at all. Of course there are some where it's possible but really difficult.

The tool I like to use for this kind of things is Fluke Network Inspector. It's somewhat dated but you should still be able to find it with a bit of searching. I doubt that you can still buy a license key but for a one-off shot at collecting and maping this information the trial version should suffice.

share|improve this answer
add comment

I don't think there is any way to do this; unless you have some software that can run on the devices and map the MAC addresses to the devices somehow, there's no way to know what a particular device actually is let alone where on the segment the device is physically connected. (That is of course outside of actually tracing the wires manually, which I assume is not what you mean)

share|improve this answer
add comment

Your Answer


