Diagnosing communication with PING (ICMP)

shape
shape
shape
shape
shape
shape
shape
shape

In this post we’ll show you how to use the Ping command to diagnose network problems.

PING uses the ICMP protocol (Internet Control Message Protocol) to check the latency and availability of a device at network level, connected to your local or remote network, as in the following example.

When we use the PING command it makes an echo request to the destination IP that we specify in the command, in our example we use our Web Master domain as the destination, so it first looks up the IP of that domain on the DNS server and then sends the echo request to that IP, if the destination device is connected and enabled to respond to this type of request it will send the response as in the example above.

Note that in the response it gives the following information “bytes=32” which is the size of the packets sent, “time=11ms” which is the response time of our destination and also “TTL=56” which is the maximum number of jumps this packet can make to reach its destination.

In the image below we can see the syntax of the command and some attributes that we can use to change the characteristics and quantities of the requests.

In addition to the echo response, the Ping command can give us the following errors:
The time to live (TTL) has expired in transit – when the maximum number of hops the request packet can take before being discarded expires.
Request timeout – when the destination address does not respond to the request within the timeout period, the default timeout being 4000 ms (4 seconds).
Destination host inaccessible – when no route is found to the destination address.

Knowing this information, we’re going to show you how to run a diagnostic to test your internet connectivity.
First, let’s check that TCP/IP is configured correctly on our device by pinging our loopback address.

ping 127.0.0.1

Next, let’s ping the local IP of our device to check that our network interface is working correctly and check that the IP has been added correctly (If the IP is obtained automatically by DHCP, use the command ipconfig in Windows to know which IP your device has received, if it has not received the IP automatically it will configure an IP 169.254.x.x), here we use the IP 192.168.0.23 as an example.

ping 192.168.0.23

Now let’s ping our default gateway to check if the router is communicating with our device, here we use 192.168.0.1 as an example.

ping 192.168.0.1

Finally, we’ll ping a remote address to test whether we can communicate through the router.

ping 172.66.41.45

By analyzing the responses from the Ping command, we can see how far we have access and deduce the cause of the connection problem.

Master da Web, your Cloud solution! ☁️

Leave a Reply

Your email address will not be published. Required fields are marked *

Latest news

Latest news directly from our blog.