How to get a list of all valid IP addresses in a local network?

LinuxNetworkingIpLanNmap

Linux Problem Overview


Is there a way to get a list of all valid IP addresses in a local network?

I mean all IP addresses that each user is using in the network.

Linux Solutions


Solution 1 - Linux

Install nmap,

sudo apt-get install nmap

then

nmap -sP 192.168.1.*

or more commonly

nmap -sn 192.168.1.0/24

will scan the entire .1 to .254 range

This does a simple ping scan in the entire subnet to see which hosts are online.

Solution 2 - Linux

Try following steps:

  1. Type ipconfig (or ifconfig on Linux) at command prompt. This will give you the IP address of your own machine. For example, your machine's IP address is 192.168.1.6. So your broadcast IP address is 192.168.1.255.
  2. Ping your broadcast IP address ping 192.168.1.255 (may require -b on Linux)
  3. Now type arp -a. You will get the list of all IP addresses on your segment.

Solution 3 - Linux

If you want to see which IP addresses are in use on a specific subnet then there are several different IP Address managers.

Try Angry IP Scanner or Solarwinds or Advanced IP Scanner

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionM.J.AhmadiView Question on Stackoverflow
Solution 1 - LinuxSunil BojanapallyView Answer on Stackoverflow
Solution 2 - LinuxVirendraView Answer on Stackoverflow
Solution 3 - Linuxuser1649045View Answer on Stackoverflow