PING Utility and Router

Ping is a network diagnostic tool that tests the communication status of the local host with one or more remote computers on an IP network by sending ICMP packets. This utility can diagnose the condition, speed and quality of a network. It is sometimes used to measure latency, or the time it takes to communicate between two remote points. The mechanism, from the theoretical point of view, of the PING is similar to the sonar: you can see if there is a connection between two hosts and the time it takes to get packets, depending on the response time.

Uses in Windows and Linux systems.

Windows

The Ping.exe file is in the system32 folder, loadable from the command prompt using the ping command with the following parameters:

  1. /t: ping the host until it stops.
  2. /a : solve the address as host name.
  3. /l: specifies the ICMP packet size in bytes, with a maximum of 65527 bytes
  4. /f: specifies that ICMP packets should not fragment.
  5. /i: specifies the TTL (time to live) of ICMP packets sent, with a standard value on Windows XP (host), this is typically 128 and a maximum of 255.

Command Prompt window system running Ping.

Syntax used for the Ping command.

ping <ip>/parameter value /parameter 2 value…

  ip is the variable IP address or DNS host address and is a required parameter.

Request to a domain

ping www.google.com /l 64 /i 250

In the above example the use of a DNS address or domain name instead of an IP address is observed, l and i parameters which determine the packet size to 64 bytes and the Time to Live (TTL) are added to 250 milliseconds.

Request to an IP address

ping 192.168.1.254 /i 147 /a

In the above example a local IP address is used, the Time to Live (TTL) is specified to 147 milliseconds and is required to be resolved as the host name.

GNU / Linux systems

  1. -i  Wait x seconds between sending each ICMP packet. Standard time is 1 second.
  2. -c Specifies the number of pings to do, the default is infinity, or until it stops the program, this option allows once have passed the specified number of pings, it stops.
  3. -s Specifies the size of the data portion of the ICMP packet. The standard size is 56 bytes of data (fixed + 20 bytes IP header + 8 bytes of ICMP header, 84 bytes total).
  4. -l  Preload Specifies that ICMP packets should be sent as quickly as possible.
  5. -t Specifies the time to live (TTL) of packets to send. Standard life time vary depending on the version of operating system, the maximum in all cases 255.
  6. -n Specifies that no output DNS host name, only a number (IP address).

Syntax

Syntax used for the Ping command in Linux.

ping <ip> -parameter value -parameter 2 value …

Request to a domain

ping www.google.com -i 2 -t 15

In the above example the use of a DNS address or domain name instead of an IP address is observed. i and t parameters that determine the waiting time for sending each packet (2 seconds) and the time to live (TTL) thereof (15 devices ) are added.

Request to an IP address

ping 192.168.1.254 -l 2

In the above example a local IP address (Gateway) is used. Packages are required as quickly as possible are sent.