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.
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.
You could do the arp -a command to show all ARP entries in the table about computers on your network.
Source
ip - List ALL devices on local network? - Stack Overflow
List all IP devices in the network - cmd/powershell - Networking - Spiceworks Community
How to see all IP addresses on network?
How can I find IP and MAC addresses of devices on my network?
How are IP addresses assigned?
How does IPAM help with finding and recovering IP addresses?
Why is finding free IP addresses important?
Videos
arp -a will show you only MAC addresses that are stored in local ARP cache and your computer was connected to. When I'm trying to see every device in my local network I have to scan it. For example if you have 192.168.1.0/24 network you can do:
$ for i in `seq 1 254`; do
ping -c 1 -q 192.168.1.$i &
done
You will try to ping every computer in your network. Of course not every computer will answer for ping. This is why you can't rely on ping. Now you need to check ARP cache.
$ arp -a | grep 192.168.1. | grep ether
This command will show you ARP cache filtered only with computers that are in this network and that answered on ARP requests (in 99% cases it will be full list of devices in your network - just remember that ARP entry is not removed immediately when the device disconnects).
There are several ways to generate list of devices on a network however it depends on what resources you have available to use.
- ping the possible list of devices
- access the list of devices from your router
- use a third party wire sniffing tool
Note that there are a number of reasons why a device may be on a network yet not "discoverable". For a Windows PC, Network discovery may be turned off. A firewall may be filtering out ICMP Echo requests or replying to ICMP Echo requests may be turned off.
Ping the network for devices - Windows OS
To generate a list with a Windows CMD .bat file to ping devices on the network, do the following.
Create a .bat file with a loop that uses the ping command to send a ping to each of the possible usable addresses on your network. I use the -a and -n 1 options on the ping command to send a single ping, -n 1, with a request to give me the hostname. After pinging the network you can then use the arp command to get a concise list using arp -a >con which will redirect the output to the console even when the .bat file is redirected to a file.
The following commands in a Windows .bat file seems to do the trick.
for /L %%i in (1,1,254) do (
ping -a -n 1 192.168.0.%%i
)
arp -a >con
Next run the .bat file sending the output to a text file:
listdev.bat > listdev.txt
This will generate a text file with the results of the ping commands. It will look something like the following:
C:\Users\rcham>(ping -a -n 1 192.168.0.3 )
Pinging DESKTOP-GFSP7AC.xxxxxxxx.net [192.168.0.3] with 32 bytes of data:
Request timed out.
Ping statistics for 192.168.0.3:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
C:\Users\rcham>(ping -a -n 1 192.168.0.4 )
Pinging rick-MS-7B98.xxxxxxxx.net [192.168.0.4] with 32 bytes of data:
Reply from 192.168.0.4: bytes=32 time=5ms TTL=64
Ping statistics for 192.168.0.4:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 5ms, Maximum = 5ms, Average = 5ms
C:\Users\rcham>(ping -a -n 1 192.168.0.5 )
Pinging 192.168.0.5 with 32 bytes of data:
Reply from 192.168.0.148: Destination host unreachable.
Ping statistics for 192.168.0.5:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
C:\Users\rcham>(ping -a -n 1 192.168.0.6 )
Pinging 192.168.0.6 with 32 bytes of data:
Reply from 192.168.0.148: Destination host unreachable.
Ping statistics for 192.168.0.6:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
C:\Users\rcham>(ping -a -n 1 192.168.0.7 )
Pinging 192.168.0.7 with 32 bytes of data:
Reply from 192.168.0.148: Destination host unreachable.
Ping statistics for 192.168.0.7:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
C:\Users\rcham>(ping -a -n 1 192.168.0.8 )
Pinging SurfacePro-2.xxxxxxxx.net [192.168.0.8] with 32 bytes of data:
Reply from 192.168.0.148: Destination host unreachable.
Ping statistics for 192.168.0.8:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
C:\Users\rcham>(ping -a -n 1 192.168.0.9 )
Pinging starfive.xxxxxxxx.net [192.168.0.9] with 32 bytes of data:
Reply from 192.168.0.148: Destination host unreachable.
Ping statistics for 192.168.0.9:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Notice in the list above that there are differences in responses to the ping command.
- response received
- request timed out
- reply of Destination host unreachable.
The first means that there was an operational device connected to the network with that IP address and the device was configured to reply to the ICMP Echo request of the ping command.
The second means that there may be a device connected to the network with that IP address however the device may be configured to ignore ICMP Echo requests or it is powered off and can't reply. There may be other possible causes but these two are the most common in a small network.
The third means the router didn't have a way to send the ICMP Echo request to the designated IP address so the request wasn't sent.
For the difference between the two last responses with more details see the post ping response "Request timed out." vs "Destination Host unreachable"
Using nmap to do a sweep of the subnet is one quick and simple way to do this that I've used before, the various options will allow you to do a more detailed inspection also.
If there's a unix box on the network, you could try arp-scan:
ARP scanner | Linux man page
$ arp-scan --interface=eth0 192.168.0.0/24
Interface: eth0, datalink type: EN10MB (Ethernet)
Starting arp-scan 1.4 with 256 hosts (http://www.nta-monitor.com/tools/arp-scan/)
192.168.0.1 00:c0:9f:09:b8:db QUANTA COMPUTER, INC.
192.168.0.3 00:02:b3:bb:66:98 Intel Corporation
192.168.0.5 00:02:a5:90:c3:e6 Compaq Computer Corporation
192.168.0.6 00:c0:9f:0b:91:d1 QUANTA COMPUTER, INC.
192.168.0.12 00:02:b3:46:0d:4c Intel Corporation
192.168.0.13 00:02:a5:de:c2:17 Compaq Computer Corporation
192.168.0.87 00:0b:db:b2:fa:60 Dell ESG PCBA Test
192.168.0.90 00:02:b3:06:d7:9b Intel Corporation
192.168.0.105 00:13:72:09:ad:76 Dell Inc.
192.168.0.153 00:10:db:26:4d:52 Juniper Networks, Inc.
192.168.0.191 00:01:e6:57:8b:68 Hewlett-Packard Company
192.168.0.251 00:04:27:6a:5d:a1 Cisco Systems, Inc.
192.168.0.196 00:30:c1:5e:58:7d HEWLETT-PACKARD
13 packets received by filter, 0 packets dropped by kernel
Ending arp-scan: 256 hosts scanned in 3.386 seconds (75.61 hosts/sec). 13
responded
Yes open ended questions to tech may seem futile, but open a cmd window [windows key + r] type cmd, and then type arp -a for a list of ip addresses on your current (and sometimes past) network address resolution table. see post from Vinay who will never give you a lacking answer!
http://answers.microsoft.com/en-us/windows/forum/windows\_7-networking/how-can-i-remove-these-entries-from-my-windows-arp/a44c1122-493f-4248-b32f-c1c06bc2fcf6
OMG are you serious
Al IP ADDRESSES on the network. You have to read and understand not only the post but its title in relation to it.
I really do not trust this forum's people to understand English anymore.
NM, I'm not going to follow this. That was really the stupidest answer I've seen on this post, and nobody else had any info, and I've never seen this answer on the forum anyways.
Hi everyone, I'm looking to understand how to find the IP addresses and MAC addresses of devices that are connected to the same network as me. Could you suggest some straightforward methods or tools that I can use for this? I'm using a Linux machine