Internet Knowledge Base | Affordable Web Hosting Plans | Cheap Domain Name Registration

Ping Tutorials in More Details

Page 1: How Ping Works

The ping command is the most basic tool for testing IP connectivity and network diagnostics. Actually Ping is based on ICMP that we discussed in our blog.

Ping Concept

As we mentioned in the ICMP post:

  • The ping command is the most basic tool for testing IP connectivity.
  • Ping is based on the Internet Control Message Protocol, or ICMP for short.

How Ping Work

Ping uses timed ICMP Echo Request (Type 8, Code 0) and Echo Reply (Type 0, Code 0) packets to measure the transmission delay to a remote system.

The following two diagrams show how ping works:

how ping works for network diagnosis

Here’s what happens when Computer A send a Ping to Computer B:

  1. The ping program in sender computer A send a ICMP Echo Request (Type 8, Code 0) to destination computer B.
  2. The ICMP Echo Request packet travel through the Internet and finally reach computer B.

how ping works

Here’s what happens whe Computer B reply to Computer A:

  1. When destination Computer B receives the Echo Request message, it will send an Echo Reply packet in response to sender Computer A.
  2. The ICMP Reply Request packet travel through the Internet and finally reach computer A.
  3. The ping program in sender Computer A measures the number of milliseconds between the sending of an Echo Request and the receipt of an Echo Reply. This thus allows to verify both latency and end-to-end connectivity with a particular IP host.

Therefore the ping command can be used for testing IP connectivity and network diagnostics.

Internet knowledge base