How to Get IP Addresses and Computer Names on the Same Network

ip addressnetworkingwindows

What is the command that can be used to get the IP address and the names of the computers that are located in the same network?

I am running Windows

Best Answer

nmap -sn 192.168.1.0/24 

Put your network number in it. It'll do a ping-sweep of your network and report the reverse DNS's of the up machines. Won't find down machines.

C:> for /L %N in (1,1,254) do @nslookup 192.168.0.%N >> names.txt

That'll do a reverse lookup of every IP in your subnet.