A ping scan involves sending an ICMP ECHO Request to a host. If a host is live, it will return an ICMP ECHO Reply, as shown in the following diagram:
![](https://static.packt-cdn.com/products/9781789138962/graphics/assets/1d0e92cb-1eae-4d31-bf75-948ace2b3865.png)
ICMP request and reply
The operating system's ping command provides the facility to check whether the host is live or not. Consider a situation where you have to test a full list of IP addresses. In this situation, if you test the IP addresses one by one, it will take a lot of time and effort. In order to handle this situation, we use ping sweep.