
This command will show you all the devices connected to the local network. sudo nmap -sn 192.168.0.1/24Ībove you should use the IP address of your gateway (router), and then the 24 is the correct number behind the slash if the subnet mask is 255.255.255.0. This will install Nmap on your computer, a fantastic program for running diagnostics on your device and your network.

There might be changes here, but this is a quite normal way for it to look.īut, what can you do now? When you have this information in hand, do the following. Normally your IP address will look something like 192.168.0.104 and the subnet mask will look like 255.255.255.0. You will also see your local IP address on the internal network and the subnet mask. Now you will see a list of the network devices on your computer. Type the following command in the Linux command line. To get started, find your very own IP address.

(ETA: What if you can't get to the Console port? How do you get the IP address of the switch in order to SSH or (if you must) Telnet in?)Ĭouldn't you just use CDP? #show cdp nei detail will show you the ip of the connected devices.Find the MAC addresses of other devices on the same network as you. The amazing thing to me is, this far into the 21st Century, this is still the only way I could find to get this information - i.e. Also, 'sh ip arp | i 0/24' will show just the MAC address(es) on that port.) If you're all Cisco, 'show cdp neighbor' (or 'sh cdp nei') will get you to the next switch.

(Small tip: When you see a large number of MAC addresses showing up on a single port, there's a switch on that port into which those MAC addresses are connected.

It helps to Ping the subnet's broadcast address (e.g. :^D After beating Google to death over it, hoping for some useful tool, I ended up using exactly the same process (plus the online MAC address lookup to ID the device manufacturer), so I can affirm this works perfectly, if you work it.Īs you can see, the 'sh arp' or 'sh ip arp' commands also give you the MAC addresses, so essentially the 'sh mac add' is only to get the port in which the device is connected. Thanks for posting this *after* I finished a "What's Connected Where" jihad on our network.
