How to do a ping scan or ping sweep with nmap

From the man page:

-sn (No port scan)
Systems administrators often find this option valuable as well. It can easily be used to count available machines on a network or monitor server availability.

Examples:

Scan an entire subnet
nmap -sn 192.168.1.0/24

Scan a range of IP addresses
nmap -sn 192.168.1.1-10

$ nmap -sn 192.168.1.1-5

Starting Nmap 7.31 ( https://nmap.org ) at 2017-08-03 18:55 IST
Nmap scan report for 192.168.1.1
Host is up (0.0067s latency).
Nmap scan report for 192.168.1.2
Host is up (0.0069s latency).
Nmap scan report for 192.168.1.3
Host is up (0.0065s latency).
Nmap done: 5 IP addresses (3 hosts up) scanned in 1.23 seconds

You can also use -sP. It was known as -sP in older releases of nmap

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s