3

I am running a small network with a subnet of 255.255.255.0.

I would like to run a command in either Windows command prompt or OS X Terminal that would output a list of used IP addresses. The list doesn't need to show anything other than the IP address that is taken.

Obviously, if there is a simple way of also outputting the computer/node name or something equally helpful then it would be a beneficial.

1 Answer 1

6

It all depends on how you define 'used'. Nmap can easily be used to can a network for computers that are alive, assuming the firewalls permit it. The most basic command might be something like nmap -sP 192.168.0.0/16, that will just ping every address in the network and report on which systems responded. Computers that on when you run the scan will not respond. Machines with restrictive firewalls may not respond. So this method will usually miss a few computers

You can also pretty easily look at your DHCP server to see which addresses have been allocated. The DHCP database is usually very up to date, but will not show you machines that have been statically assigned.

Another way that works sometimes is to inspect the arp table on your router. Assuming your machines regularly use external services, there is going to be an entry in the arp table for addresses in use.

Machines with static addresses and extremely restrictive firewalls, that don't make external connections may be pretty difficult to find. The best method is of course to not give allocate addresses until you have updated your documentation.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .