What is Ping?

Ping is a simple computer network tool used to check if a specific host  is reachable.
It is one of the most basic tools when debugging IP network problems and traffic jam.
How ping works?

Ping application is using two different protocols to operate. The IP protocol and ICMP protocol. Here is an incomplete summary of the headers:

IP Header

  • Source IP - The ip address of the host who send the packets
  • Dest IP - the IP address of the host who suppose to receive the packet
  • TTL(Time To Live) - This value tell a network router whether or not the packet has been in the network too long and should be discarded. when arrive to the router the router will decrease the packet's TTL in 1 ,  when TTL=0 the router will destroy the packet.
  • Packet ID - the packet id number

ICMP Header

  • Type Name&Type Number - defined the type of the icmp message. Ping application is using two types, Echo Request and Echo replay
  • Code - the field define the code of the protocol , in our scenario it is always set to 0.
     

Simulation

Time field- In this Simulation we try to show show the application is using time to measure the delay between your computer and the host, also called RTT.

RTT field - Different Operating systems are using different default RTT. in this simulation the default RTT is 64 for all nodes in the network

Use the ping simulation to get rough idea about how ping application is used in real life.
Try to ping the host or the router and observe the fields in the header

osischool.com

Embedding:
Do not change the code.