Posts Tagged ‘Network’

How many hosts is running on Local Network ?

July 20, 2011 Leave a comment

Nmap (network mapper) is one of the best network-probing tools to learn in-depth. Be sure to to read the fine manual and practice carefully, because Nmap has mighty snooping powers and can get you in trouble. This command finds all hosts on a LAN subnet:

 $ nmap -sP 
Starting Nmap 5.00 ( ) at 2011-07-18 11:01 PDT 
Host ( is up (0.0018s latency). 
Host is up (0.00012s latency). 
Host is up (0.00015s latency). 
Nmap done: 256 IP addresses (3 hosts up) scanned in 27.31 seconds 

That is a simple ping sweep and reverse-DNS resolution that reports hostnames and IP addresses of all hosts on the network that respond to ICMP echo requests. It detects both wired and wireless hosts. On newer versions of nmap this has changed to nmap -sn. You can refine your IP address range using CIDR notation and lists of octets. For example, 192.168.0-5.100-150 scans only the up to address ranges. You can enter your specific address ranges in a text file, separated by spaces, tabs, or newlines, and call this file with the -iL filename option.

Tags: ,