# Ping Sweep

O ping sweep é uma técnica para descobrir hosts ativo em uma rede. No exemplo a seguir, ao tentarmos pingar no primeiro endereço IP, ele responde corretamente, ou seja, está ativo. Já no segundo não houve resposta. Caso não haja resposta, pode ser que o firewall esteja bloqueando ou possa ser que ele não exista.

```
user@xubuntu:~$ ping -c 1 192.168.2.106
PING 192.168.2.106 (192.168.2.106) 56(84) bytes of data.
64 bytes from 192.168.2.106: icmp_seq=1 ttl=64 time=958 ms

--- 192.168.2.106 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 957.662/957.662/957.662/0.000 ms
user@xubuntu:~$ ping -c 1 192.168.2.111
PING 192.168.2.111 (192.168.2.111) 56(84) bytes of data.
64 bytes from 192.168.2.111: icmp_seq=1 ttl=64 time=3.76 ms

--- 192.168.2.111 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 3.758/3.758/3.758/0.000 ms
```

O **fping** é outra forma de scanear a rede de uma forma muito rápida e prática.

Utiliza-se da seguinte forma&#x20;

```
fping -a -g <ip>/24
```

*Vale lembrar que essa técnica não é eficaz quando do outro lado há um firewall que dropa ou rejeita pacotes ICMP (visto que o ping utiliza o ICMP).*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nicollaslopes.gitbook.io/estudos/master/scanning/ping-sweep.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
