Ping Command

ping command

Ping Command and Ping Command Options

Whenever other engineers see network engineers during troubleshooting, they think that, network engineers only ping from one node to another. But as you know a network engineer is more than a pingman :) This command is a basic but very useful tool for network engineers to control the reachability of peer node.


To learn Linux Ping Commands, you can also check Ping Command in Linux lesson.


Ping command maybe is the most useful command for a network engineer. Basically, with this command, you send an ICMP(Internet Control Management Protocol) request to the destination, and wait for the response. According to the number of response and its returning time, you can decide what to do for troubleshooting.

In this article we will discuss ping command for windows, unix systems and cisco routers.

Ping Topology
Ping Topology
The pure ping command is used only with the keyword “ping” and a “destination ip” address or “web address”. By default, ping command send 4 times 32 bytes echo request for each command in windows. If the ping successfull, you will receive the ping reply like below:

Successfull ping on Router
Successfull ping on Router
 

Successfull ping on PC
Successfull ping on PC
You can ping your localhost, to check if it is available or not with the ip address 127.0.0.1. You can do this job with the same command and additionally “ping 0” command in unix systems. If it is successfull, you can get the reply from the destination point.

If the destination is not reachable for IP layer, you will receive the “Request timed out” message.

Ping Request timed out on Router,Failed Ping
Ping Request timed out, on Router
 

Ping Request timed out on PC,Failed Ping
Ping Request timed out, on PC
Different responses have different meanings. We will discuss this lesson detailed in another article.

By the way, if you has just connect a device to a network, first ping packet to this network seen lost, because the device is not known in the network and its MAC address is not in the ARP Table of your device. The rest of the ping packets will be successfull if there is not any other problem in the connection.

Successfull First Ping, missing ping because of ARP
Successfull First Ping
and Missing Ping because of ARP
Let’s check how to modify ping command and its parameters…

Ping Commands For Windows

Ping is mostly used on Windows to check network reachability. There are various of Ping Command for Windows. Below, you can find these important Ping Commands for Windows.


-t : Continuous ping. -> ping 172.22.82.1 –t

Continuous Ping
 

Continuous Ping


-n: Number of ping packet. -> ping 172.22.82.1 –n 2 (2 ping packet)

Number of Ping Packet
Number of Ping Packet


-l : Size of the ping packet. -> ping 172.22.82.1 –l 200 (200 bytes,from 32 to 65,527)

Size of Ping Packet
Size of Ping Packet


-i : The value of TTL. -> ping 172.22.82.1 –i 200 (TTL=200, max 255)


-s : To report the time, in Internet Timestamp format, that each echo request is received and echo reply is sent. The maximum value for count is 4 meaning that only the first four hops can be time stamped.


-w: To adjust the time-out value. Default is 1000ms=1s -> ping 172.22.82.1 –w 2000


-f : Sets the Do Not Fragment bit on the ping packet. -> ping 172.22.82.1 –f


-a: To resolve, the hostname of an IP address target. -> ping 172.22.82.1 -a


-4 : Force to use IPv4


-6 : Force to use Ipv6


-R : To trace the round trip path (for Ipv6 only)


-S : To specify the source address (for Ipv6 only)


6

You can use “/?” command for help of ping command like other commands.

Do not forget that, this parameters are used in different meaning in different systems. For example, “-l” value is used for packet size in windows systems, but you can do this with “-s” in unix systems.

Now, Let’s check the Unix versions of these commands.

Ping Commands For Unix (Ping Command for Linux)

Unix systems and windows systems has different commands and parameters for the Ping Command. Here, the command is the same but Ping Commands For Unix has different parameters and these parameters have generally different meanings. These Unix commands are also used on Linux systems as Ping Command for Linux. Let’s check these Ping Commands For Unix and Ping Command in Linux one by one.


-i = To determine the interval for two ping packet. -> ping 172.22.82.1 –i 5 (seconds)


-c = To set the number of ping packets. -> ping 172.22.82.1 –c 3


-s = To set the packet size. -> ping 172.22.82.1 –s 200 (bytes)


-w = To set the deadline to terminate the ping output. -> ping 172.22.82.1 –w 3(seconds)


-f = Super users can send hundred or more packets per second using -f option. It prints a ‘.’ when a packet is sent, and a backspace is printed when a packet is received.


-R = To print the network route through which the packet is sent and received.



To learn Linux Ping Commands, you can also check Ping Command in Linux lesson.


In the following articles, we will talk about other useful commands for network engineers…Keep on, ipcisco.com ;)

Lesson tags: icmp, ping
Back to: CCNP Enterprise 350-401 ENCOR v1.1 > ICMP and ARP

2 Responses to “Ping Command”


  • Moneer Mohammed Saleh ALmatri / / Reply

    I want to improve my skills in network special from this sit

Leave a Reply

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

CCNP Enterprise 350-401 ENCOR v1.1

Collapse
Expand