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

ip, lan, linux, networking, nmap

Solution

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.

Problem

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.

Original source