PING BASICS
What
Is a Ping ?
A ping, according to the
dictionary, is a sharp, high-pitched, and somewhat musical tone. You might
associate it with the sound you hear when you tap a spoon against a crystal
glass.
But in the IT world, it
has a very different meaning……
In a Simple language – A ping is a Command Prompt command that
can be used to test a connection between one computer and another. Think of it
in terms of sonar on a submarine. You’ve probably seen in the movies when
the “ping” in the background as an audible signal is sent out to check a sub’s
surroundings. When the ping strikes a nearby object, it will echo back.
Operators can determine an object’s distance by the length of time it takes to
return the echo.
Ping stands for - Packet InterNet Groper.
Ping (Packet Internet Groper) is a method for determining
communication latency between two devices/networks. Simply put, ping is a
method of determining latency or the amount of time it takes for data to travel
between two devices or across a network. As communication latency decreases,
communication effectiveness improves.
A low ping time is critical in situations where the timely
delivery of data is more important than the quantity and quality of the desired
information.
Relating ping with a real-world example :
1- Let’s say two people are 100 meters apart and
first one greets other. The first person’s greeting takes one second to reach
second person, who is 100 meters away. The second person then responds to
greeting of first person, which takes one second to reach the first person
standing there. We can deduce from this that both of people standing there are
getting a 1-second ping with a total latency of 2 seconds.
2-
Let’s say you have wireless security cameras
in your home that allow you to see the exact real-time frame of your home from
anywhere in the world. However, main issue here is latency, because if the ping
is very high, viewer will see robbery in his or her phone after some time,
causing problems. As a result, prompt feedback is essential; any lag or delay
is unacceptable.
It’s also worth noticing that the speed of the internet
connection you’re using to connect two networks has no bearing on ping. If
you’re streaming a game on YouTube, for example, you’ll want the latency to be
as low as possible so that viewers can watch in real-time.
As a result, we can define ping as a type of protocol that is
used to determine a computer system’s latency and network strength.
The ping command in Windows :
To use the ping command in Windows, access the command prompt.
On the command prompt, type "ping" and specify the IP address,
hostname, or URL of the remote system and press the Enter key.
For example, to test whether Google is up and accessible from
the local Windows system, use the following command.
ping www.google.com
To view all options that
the ping command supports in Windows, use the following command.
ping /?
The ping command in Linux :
To use the ping command in
Linux, access the shell prompt, and use the following syntax.
$ ping [IP address, hostname, or URL of the remote system]
For example, to ping www.google.com, use the following command.
$ ping www.google.com
The ping command in Linux sends
messages continuously. To stop
the ping command from sending more messages,
press the ctrl+c keys.
To view a complete list of
allsupported options, use the following command.
$ ping --help
Why Would I
Use Ping ?
Pings are useful for a variety of reasons, including
troubleshooting connectivity, devices, and networks.
Troubleshooting Connectivity:-
Most commonly, it’s used to verify the connection between two
machines. You might use ping to test a network printer or copier connection to
determine whether a device is offline or to verify you can connect to a router.
If you’re having trouble with an application hosted over a network on a server,
one of the first things you want to do is check the connection using a series
of ping commands to help you narrow down the problem. If a ping comes back with
fast response times, your connection is good so the problem likely lies with
the server or application.
Troubleshooting Networking Issues:-
Almost any network-connected device will respond to a ping which
makes it incredibly valuable to check networking connections. Ping can be used
to test routers or servers for throughput and speed. You can also ping across a
range of addresses to find each attached device in a particular range. You can
test computer names and addresses of computers. When you can ping an IP
address, but not a computer name, there’s likely a name resolution issue.
If a ping comes back showing a successful connection but has
long response times, you’re likely facing a routing, congestion, or networking
issue.
A ping command can be run manually or automated as a scheduled
task for monitor network reliability. When a ping fails, there’s a problem
Proper Ping
Syntax
The order in which you use these switches is important. Here’s
is the proper syntax to use:
ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r
count] [-s count] [-w timeout] [-R] [-S srcaddr] [-p] [-4] [-6] target [/?]