Some of the less-known ping types you should know

Shubham - Oct 25 - - Dev Community

Normal Ping output:

> ping 192.168.0.100

PING 192.168.0.100 (192.168.0.100): 56 data bytes

64 bytes from 192.168.0.100: icmp_seq=0 ttl=64 time=0.047 ms

64 bytes from 192.168.0.100: icmp_seq=1 ttl=64 time=0.056 ms

64 bytes from 192.168.0.100: icmp_seq=2 ttl=64 time=0.045 ms
Enter fullscreen mode Exit fullscreen mode

Ansible Ping output:

> ansible 192.168.0.100 -m ping

> 192.168.0.100 | SUCCESS => {

"changed": false,

  "ping": "pong"

}
Enter fullscreen mode Exit fullscreen mode

Have you ever wondered why it is different?

The Normal ping uses ICMP to check network connectivity, while Ansible's ping is a module that ensures connectivity by running Python on the remote host and returning a "pong" message.

It's more of a connectivity and system readiness check rather than just a network test.

Apart from these two major pings, some of the less-known ping types you should understand:

Flood Ping
Sends packets as fast as possible, useful for stress testing or debugging.

ping -f 192.168.1.1
Enter fullscreen mode Exit fullscreen mode

Ping with a Set Number of Requests
Limits the number of ping requests sent.

ping -c 4 192.168.1.1
Enter fullscreen mode Exit fullscreen mode

TTL Ping
Limits the Time To Live (TTL) value of a packet, often used in debugging routing loops or traceroute.

ping -t 5 192.168.1.1
Enter fullscreen mode Exit fullscreen mode

Ping Broadcast
Pings every host on the local network.

ping -b 192.168.1.255
Enter fullscreen mode Exit fullscreen mode

Reverse Ping (Windows)
Windows-specific, checks if another host can ping your machine.

ping -r 9 192.168.1.1
Enter fullscreen mode Exit fullscreen mode

Hope this was useful for all of you. Happy Learning!

. . . . . . . . . . . . . .