What is Ping, Example, How it works ?

When a host (often a computer or server) is connected to an Internet Protocol (IP) network, the “Ping” utility tool is used to determine whether or not the host can be reached. Sending Internet Control Message Protocol (ICMP) Echo Request messages to the host that is the target of the operation and then waiting for an Echo Reply gives it the ability to function. The term “ping” originates from sonar technology, where it refers to the pulse of sound that is sent out via the system in order to identify things.

ICMP Echo Request: A “ICMP Echo Request” is a short data packet that is sent from your computer to the host that you are trying to reach when you use the ping command. ICMP is an acronym that stands for Internet Control Message Protocol. This protocol is used inside the network for the purpose of either diagnostic or control reasons.

Destination Response: Immediately after receiving the ICMP Echo Request, the target host will react with a “ICMP Echo Reply,” which will then be sent back to the machine that initiated the request.

Round-Trip Time (RTT): The ping tool determines how long it takes for the data to complete a round trip, which means that it travels from the computer that created the data to the machine that received it and then back again. In milliseconds (ms), this is the unit of measurement.

Packet Loss: Furthermore, the ping tool is responsible for determining if any of the data packets are “lost” during transmission, which means that they do not return. The loss of packets may be an indication of network difficulties such as congestion, malfunctioning network equipment, or problems with the host that is being targeted.

Results: The results are shown via the ping command, which commonly involves displaying the number of packets that were sent, received, any packets that were lost, and the round-trip duration for each individual packet.

Typical Ping Command Output

Key Elements

Packet Loss: The failure of certain packets to return might be an indication of problems with the network.

TTL (Time to Live): The number that controls how long a packet may be stored before it is deleted is called the lifespan. Each router that the packet goes through causes it to gradually decrease in value.

Latency: The amount of time it takes for a packet to transport itself from its origin to its destination and back again. What is preferable is a lower latency, which is measured in milliseconds.

Common Uses of Ping

Checking Network ConnectivityVerify if a device is reachable on the network.
Measuring LatencyDetermine the delay between your machine and the target host.
Diagnosing Network IssuesFind out whether there are any packets that are being dropped, since this might be an indication of network issues or congestion.

Example of Ping Command

Let’s imagine you want to determine whether or not your machine is capable of connecting to the Google server. To do this, you may make use of the ping command.

Step-by-Step Example
  1. Open the Command Prompt (on Windows) or Terminal (on macOS/Linux).
  2. Type the following command

3. Press Enter.

Output Example

Explanation of the Output

Reply from 142.250.64.110: The fact that the device with the IP address 142.250.64.110, which is owned by Google, replied to your ping request is shown by this.

bytes=32: The size of the packet sent and received is 32 bytes.

time=15ms: The round-trip time for this particular packet was 15 milliseconds.

TTL=117: The value of the Time to Live (TTL) shows the number of hops (routers) that the packet is able to go through before it is eliminated from consideration.

Packets Sent/Received/Lost: The number of packets that were transmitted, the number of packets that were successfully received, and the number of packets that were lost are all shown here.

Round Trip Times: The lowest, maximum, and average times that it takes for the packets to complete the round journey are shown here.

Read more:- What things should check when get a new laptop?

Leave a Comment