howtothings.co.uk
[nmap] How to perform a ping scan on a network - Printable Version

+- howtothings.co.uk (https://www.howtothings.co.uk)
+-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4)
+--- Forum: Hardware, Networking and Wireless (https://www.howtothings.co.uk/forumdisplay.php?fid=11)
+--- Thread: [nmap] How to perform a ping scan on a network (/showthread.php?tid=37)



[nmap] How to perform a ping scan on a network - Mark - 28-05-2010


There are times when you need to know what devices / machines are on your network, this is how you can find out using a simple ping scan. (-sP)

The following tutorial is for use in Linux and via the Terminal.

1. Open the terminal.

Run as root;

Code:
sudo su

Then we start a simple ping scan.

Code:
nmap -sP 192.168.2.1/24 | grep 192

My result is:

Host wl.Belkin (192.168.2.1) is up (0.00040s latency). (My Router)
Host 192.168.2.2 is up. (Me)
Host 192.168.2.4 is up (0.0028s latency). (Laptop)

Explanation:

nmap: The program we're using
-sP: Ping Scan - go no further than determining if host is online
192.168.2.1: Your routers IP address
/24: A Class C network = 255.255.255.0 = 256 IP addresses
grep: Another program built in to Linux, it means i only want "192" to be taken from the information we receive.
192: The information we want, in this case the IP addresses.