I know there is a single line of a command and its arguments that can help display all computer IP addresses (those that are being used) on a LAN, and my computer is also a client, as one of those displayed, but I forgot. What is it?


13 Answers 13


You could do the arp -a command to show all ARP entries in the table about computers on your network.


  • 10
    It shows every system your computer is aware of/talked to - however, it may not be complete - I ran a quick experiment with arp -a and it didn't show one or two of my systems till I pinged it.
    – Journeyman Geek
    Jan 18, 2014 at 5:46
  • Ya, like the link I posted said, it won't show everything unless it has them stored in the tables so so machines won't be shown but it does do a pretty good list.
    – GigabitP
    Jan 18, 2014 at 17:35
  • Welcone to Stack Exchange, Gigabit Pony! When a link makes up most of your answer, you should always quote the important parts in case it dies later. See also the howto on writing good answers. Jan 23, 2014 at 4:09
  • This use to work, but I've noticed lately, it only shows static IPs like DNS, Mail, local, instead of external IPs that applications are talking too. When I use arp -a these days it shows 2 dynamic IPs and they are both on my network and the other I'm not even goint to attempt to look them up as they are all under the same A-Class..
    – Chizl
    Aug 1, 2021 at 19:34

Not everything with an IP address is a computer - I found none of these suggestions returned all active IP addresses - in fact most returned very few. My home network has a combination of wired and wireless devices and two routers, mobile phones, TV, PVR, Apple AirPort and probably a few things I have forgotten. I used the following to scan all addresses on the 192.168.1.xxx subnet:

for /L %i in (0,1,255) do ping -n 1 -w 250 192.168.1.%i>>ipaddress.txt

The resulting file ipaddress.txt contains the ping results for all addresses and I looked for those with "Received = 1" - currently 16 addresses returned a result - I only have 4 computers in the house - and they were not all on.

  • 3
    A suggested edit (rolled back) for /L %i in (0,1,255) do ping -n 1 192.168.1.%i -4 | findstr -m "bytes=32" >> ipaddress.txt has merit, but is not fundamental to the answer, not consistent with the rest of the answer which used Received = 1 rather than bytes=32, and is not necessarily the way I'd have done it. I am adding this comment should anyone find the suggestion useful.
    – Clifford
    Jul 21, 2017 at 19:57
  • 3
    for /L %i in (1,1,254) might be more appropriate, since xxxxxx.0 is the address of the whole network and xxxxxx.255 is the broadcast address. Jan 12, 2018 at 5:30
  • I consider the rejected edit, which pipes to findstr, an improvement as well. Though isn’t that -m option to findstr wrong? I think you could use no option at all, or -l. And perhaps -i because the string bytes=32 may be localized and thus capitalized.
    – caw
    Nov 29, 2020 at 4:19
  • @caw Fine, but it was not my answer. The suggester should simply have posted its own answer. However, it simply adds post-processing to filter the result, and that could be done in any number of ways and is not essential to the general method. What anyone does with the result is up to them.
    – Clifford
    Nov 29, 2020 at 8:52
  • The thing is that the question asked for a way to retrieve certain information. And the improvement suggested in that edit gets you to that information faster, cutting down on the noise. This is not some arbitrary post-processing according to one’s taste. But I agree, editing your answer was the wrong form. Since it’s not a new solution but just an improvement, a separate answer is not warranted, perhaps. But a comment is perfect – which is what you added. Thanks!
    – caw
    Dec 1, 2020 at 18:00

There is the net view /all command which will list all of the computer names that are connected to the same LAN.

From that you can retrieve the individual IP addresses using the nslookup <computer name> command or write a batch script to do it for you.

Here is an example batch I threw together to illustrate.

@echo off
setlocal EnableDelayedExpansion
set "xNext="
set "xComputer="
for /f %%A in ('net view /all') do (
    set "xComputer=%%~A"
    if "!xComputer:~0,2!"=="\\" for /f "tokens=2,* delims=. " %%X in ('nslookup %%A') do (
        if "!xNext!"=="1" (
            echo.!xComputer! = %%X.%%Y
            set "xNext=0"
        if "!xComputer:~2!"=="%%~X" set "xNext=1"

Aside from arp -a, net view /all, or writing a batch script there is no native/built-in command line to do this (at least not that I know of).

If you're willing to use a non-native command, I would suggest using Nmap. You can run nmap -sn (replacing the subnet with the appropriate one for your LAN) to achieve what you're looking for, more reliably so than net view /all or arp -a in my opinion.


As indicated by someone else, you can use arp -a however make sure that you ping a broadcast address first so that ARP reports all the devices. For example, ping

you get a list of all devices connected to the network by their IP and MAC addresses. you can look up the MAC addresses on a website like https://aruljohn.com/mac.pl to find out who the vendor of the NIC is. This should help you narrow down what most of the devices are. i.e. computers, printers, TV, cell phone, etc..

  • 1
    that was the trick... Thank you Aug 27, 2020 at 6:58

I made this PowerShell script for myself:

for ($i = 1; $i -lt 255; $i++) {
    Test-Connection "192.168.173.$i" -Count 1 -ErrorAction SilentlyContinue

the result is very easy to read:

Source        Destination     IPV4Address      IPV6Address                              Bytes    Time(ms) 
------        -----------     -----------      -----------                              -----    -------- 
SHUREEK-PC                                             32       0        
SHUREEK-PC                                                            32       388      
SHUREEK-PC                                                            32       66       
SHUREEK-PC  fe80::6160:1756:c397:5d6e%3              32       0        
SHUREEK-PC                                           32       79       
SHUREEK-PC                                           32       0        
  • 1
    One liner in CMD prompt: powershell 'for ($i = 1; $i -lt 255; $i++) {Test-Connection "192.168.173.$i" -Count 1 -ErrorAction SilentlyContinue}'
    – Jeff Luyet
    Dec 15, 2022 at 16:53
echo ls %USERDNSDOMAIN%|nslookup
  • 8
    Welcome to SU. Can you please elaborate on what the command do? May 18, 2013 at 8:29

ipconfig /all (use forward slash, not backwards)

  • 20
    ipconfig lists the interfaces of the PC itself and not the IP addresses used on the LAN.
    – Christian
    Aug 11, 2015 at 15:47

This is my quick solution. It tells you what type of device is connected at each ip address:

netstat -r 

display all computer IP addresses (those that are being used)

I think you might mean netstat -a this gives you an active list. If you want to know the program using the ip address then use netstat -b (open as administrator).

  • Technically speaking, netstat -a dumps a list of current network connections. The left IP address column contains the local interface.
    – Ben N
    Feb 14, 2016 at 21:09

Short answer... I dont think theres a one line Windows OS command to accommodate easily. The easiest way is to see this list in your router software. Simply enter the Default Gateway IP into your browser and log on to your router. It is usually directly on the 1st page that comes up. BTW - if you don't know your Gateway IP - ipconfig will provide it.


If you just want to scan your local network and get a list, then google, download, and run "advanced IP scanner". Its free.


very very simple. use CMD type IPConfig/all

  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jun 29 at 14:01
  • 1
    No, this displays the IP address(es) of the local computer. It does not list the addresses of computers on the LAN. Jun 29 at 15:45

You must log in to answer this question.

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