How to Find Devices on a Network

networking

How do I scan a network to find out which devices are on it? (I'd be happy with a list of MAC addresses and IPs.)

For example, lets say I'm at work and want to be sure that there are no unknown devices connected to the network (especially if access is not filtered by password or MAC). DHCP logs could help, but what if I want to find devices with static IPs?

Alternatively, let us say I'm at a friends house and he wants me to setup port forwarding, but doesn't know the IP of his router. Sure, a few good guesses will usually get it, but it'd be nicer to scan.

Best Answer

For the first scenario, look at nmap. You can scan entire subnets in one command. For example: nmap -sP 192.168.0.1/24

For the second, the router IP should show up as the gateway IP for your machine. In windows, that appears in the connection status dialog.