Skip to main content

Nmap: Ping Only Scan (part-13)

Ping Only Scan
 
The -sP option is used to perform a simple ping of the specified host.

Usage syntax: nmap -sP [target]

$ nmap -sP 192.168.10.2/24
Starting Nmap 5.00 ( http://nmap.org ) at 2009-08-08 20:54 CDT
Host 192.168.10.1 is up (0.0026s latency).
Host 192.168.10.100 is up (0.00020s latency).
Host 192.168.10.101 is up (0.00026s latency).
Nmap done: 256 IP addresses (3 hosts up) scanned in 3.18 second

Output of a ping only scan


This option is useful when you want to perform a quick search of the target network
to see which hosts are online without actually scanning the target(s) for open ports.


In the above example, all 254 addresses in the 192.168.10.0 subnet are pinged and
results from live hosts are displayed.
When scanning a local network, you can execute Nmap with root privileges for
additional ping functionality. When doing this, the -sP option will perform an ARP ping and return the MAC addresses of the discovered system(s).

Usage syntax: nmap -sP [target]

 
# nmap -sP 192.168.10.2/24
Starting Nmap 5.00 ( http://nmap.org ) at 2009-08-08 21:00 CDT
Host 192.168.10.1 is up (0.0037s latency).
MAC Address: 00:16:B6:BE:6D:1D (Cisco-Linksys)
...

Output of a ping only scan (as root)