Switch – How to determine what device is physically connected to network switch

local-area-networkmappingnetworkingswitch

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?

Best Answer

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.