PING

  • (Packet INternet Groper) - the best way to test connectivity between two nodes, whether it is LAN or WAN. Ping uses ICMP to communicate to other devices. You can ping hostname or ip address using ping.

PING (Packet INternet Groper) command is the best way to test connectivity between two nodes. Whether it is Local Area Network (LAN) or Wide Area Network (WAN). Ping use ICMP (Internet Control Message Protocol) to communicate to other devices. You can ping host name of ip address using below command.

# ping 4.2.2.2

PING 4.2.2.2 (4.2.2.2) 56(84) bytes of data.

64 bytes from 4.2.2.2: icmp_seq=1 ttl=44 time=203 ms

64 bytes from 4.2.2.2: icmp_seq=2 ttl=44 time=201 ms

64 bytes from 4.2.2.2: icmp_seq=3 ttl=44 time=201 ms

OR

# ping www.tecmint.com

PING tecmint.com (50.116.66.136) 56(84) bytes of data.

64 bytes from 50.116.66.136: icmp_seq=1 ttl=47 time=284 ms

64 bytes from 50.116.66.136: icmp_seq=2 ttl=47 time=287 ms

64 bytes from 50.116.66.136: icmp_seq=3 ttl=47 time=285 ms

In Linux ping command keep executing until you interrupt. Ping with -c option exit after N number of request (success or error respond).

# ping -c 5 www.tecmint.com

PING tecmint.com (50.116.66.136) 56(84) bytes of data.

64 bytes from 50.116.66.136: icmp_seq=1 ttl=47 time=285 ms

64 bytes from 50.116.66.136: icmp_seq=2 ttl=47 time=285 ms

64 bytes from 50.116.66.136: icmp_seq=3 ttl=47 time=285 ms

64 bytes from 50.116.66.136: icmp_seq=4 ttl=47 time=285 ms

64 bytes from 50.116.66.136: icmp_seq=5 ttl=47 time=285 ms

--- tecmint.com ping statistics ---

5 packets transmitted, 5 received, 0% packet loss, time 4295ms

rtt min/avg/max/mdev = 285.062/285.324/285.406/0.599 ms

Last updated

Was this helpful?