Home > Articles, Microsoft Desktop, Microsoft Server > Find All Active/Used IP Addresses on Your Network

Find All Active/Used IP Addresses on Your Network

There is a really neat way that you can quite easily find all active/used IP Addresses on your network without the need for any third party applications or worse, pinging each IP Address individually.

Open the Command Prompt and type in the following:

FOR /L %i IN (1,1,254) DO ping -n 1 192.168.10.%i | FIND /i “Reply”>>c:\ipaddresses.txt

Change 192.168.10 to match you own network.

By using -n 1 you are asking for only 1 packet to be sent to each computer instead of the usual 4 packets.

The above command will ping all IP Addresses on the 192.168.10.0 network and create a text document in the C:\ drive called ipaddresses.txt.  This text document should only contain IP Addresses that replied to the ping request.

Although it will take quite a bit longer to complete, you can also resolve the IP Addresses to HOST names by simply adding -a to the ping command.

FOR /L %i IN (1,1,254) DO ping -a -n 1 192.168.10.%i | FIND /i “Reply”>>c:\ipaddresses.txt

GUI Based Discovery

If you’re not confident using the command prompt, there are alternative GUI based applications that you can use.

TCPNetView – No installation is required, simply double-click the executable and away it goes.  It will find all active IP Addresses on the subnet you are currently connected too.
- Download Here

Advanced IP Scanner – If you are after something with a few more options and features, Advanced IP Scanner is an excellent free utility.
- More Information Here

  1. Jeb
    June 21st, 2008 at 02:17 | #1

    Sample output problem for me:

    C:\>ping -n 1 192.168.10.1 | FIND /i “Reply” 1>>c:\ipaddresses.txt
    FIND: Parameter format not correct

    WinXP Pro SP3 gives me an error. I’m not sure how the number 1 gets put after “Reply” string in the command by the For loop but it does and breaks it.

  2. me too
    August 8th, 2008 at 03:10 | #2

    ANY HELP WOULD BE NICE? seems like the FIND Comand “reply” comes back with a parameter ERROR I really would like to know how to make this work. Thanks in advance

  3. August 8th, 2008 at 17:54 | #3

    hmmm – working fine for me.

    perhaps try wrapping the quotes around “Reply” in more quotes…

    e.g. find /i “”"Reply”"”

    see if that makes any difference.

  4. September 12th, 2008 at 04:16 | #4

    please I’m looking for a command that i can type the cmd+ipaddress in the dos screen then return the computer name

  5. September 15th, 2008 at 16:53 | #5

    Maybe try:

    nbtstat -A ipaddress

    or check out the nslookup command.

  6. susi
    June 23rd, 2009 at 15:10 | #6

    Sample output problem for me:
    C:\>ping -n 1 192.168.10.1 | FIND /i “Reply” 1>>c:\ipaddresses.txt
    FIND: Parameter format not correct
    WinXP Pro SP3 gives me an error. I’m not sure how the number 1 gets put after “Reply” string in the command by the For loop but it does and breaks it.

  7. frank
    July 16th, 2009 at 19:36 | #7

    Replace the “ with ” and it will work (just delete them from the command and type them again).

  8. frank
    July 16th, 2009 at 19:39 | #8

    Sorry, when posting the character ” changes. So replace the ” character before and after the Reply with the double quote character. On my keyboard is above the comma ,

  9. sharma
    August 25th, 2009 at 01:10 | #9

    which command is used to show all ip in lan in cmd

  10. Thomas Davenport
    November 30th, 2009 at 22:19 | #10

    That is brilliant. Thank you very much.
    Regards
    Tom

  11. Simon
    January 10th, 2010 at 11:34 | #11

    @me too
    Your copy and paste of the command probably included smart quotes – paste your copy of the command into notepad and replace the “ ” and with ” s.

  1. No trackbacks yet.