Back to Basics: PING

As more and more IT Pros start their career as specialists, fewer and fewer come from a “in the trenches” IT background. I’ve found many that don’t know how to use or, in some cases, have never even heard of many of the basic diagnostic tools built into modern operating systems (e.g. ping & tracert). Case in point, this is a conversation I recently had with an Senior ASPX Web Developer:

Dev“Hi Mike. I cannot get my development server. Can you check it for me?”

Me“Lemme check…looks like it’s up and running. It’s responding to pings. What happens when you ping it?”

Dev“It’s not working when I try to ping it.”

Me“Okay. What error are you getting?”

Dev“It just says the page cannot be found.”

Me“Got that part. What do you get when you ping the server?”

Dev“Um…Isn’t that what I’m doing?”

I’ll spare you the rest of the conversation, but you can probably guess where it went from there. In short, the highly-skilled web developer had such a laser beam skill set that she had never used (or even heard of) of this mysterious diagnostic tool named “ping”. It may seem impossible for someone to get to that level in their career having zero knowledge of such a fundamental tool but, I am sad to say, it happens more often than many want to admit.

But never let it be said that I am unwilling to do my part to fix the problem! Here is a quick primer on what is arguably the single most common (and basic) tool for network diagnostics: PING. If you already know about it, go you! If not, just read the rest of this post. I promise I won’t tell anyone 🙂

A Brief History of PING

Way back in 1983, a man named Mike Muuss came up with a nifty utility for leveraging the existing Internet Control Message Protocol (ICMP) as a means of diagnosing IP networks. Since the general mechanism of sending a signal, waiting for it to bounce back, and measuring the result was similar to how sonar technology works, he named his brainchild “PING”.

When to Use PING

There are any number of reasons why one would use the ping tool. Here are a couple of common ones:

  • Monitoring Connectivity:It seems like my workstation is having intermittent network disconnects. How many packets are being dropped?
  • Scoping a ProblemOhnoes! The website is giving a 404 error! Is the server down or just my web service?

How to Use PING

PING with a Target

It’s a snap. Just open a command line (Windows) or terminal (Linux) and type “ping” and the IP address or DNS name for the target. In its most basic form, that is the only required parameter! The resulting process will send the default number of pings (Windows is generally five but Linux can vary). When it’s done, a report is delivered with a  calculation of the total “packet loss” (i.e. pings that failed to return).
ping [URL or IP address]

PING without a Target

Sometimes you want to run a more robust ping test. In that case you need to define parameters. There are many available. We won’t cover them all in this post, but you can see the full list by typing ping without a target:


PING with Advanced Parameters (and a Target)

Send more (or less) than the default number of pings:

ping -n [number of pings to send] [URL or IP]

Save the results to a file (to show your network guy):

ping [URL or IP] > [path]\ping-test.txt

NOTE: When sending output to a file, nothing is generally shown on the screen. But everything will be saved to the file and, since the file is named with the date, it will help you remember when you ran the test! If you want to stop the process before the define number of pings has finished, just use Ctrl + C to cancel (the pings already complete will still be in the file). Also, when using Linux the file path will be formatted differently.

Run a quick DNS query to get the URL (if any):

ping -a [URL or IP]

NOTE: This parameter is only available in Windows. To perform a similar action in Linux use NSLOOKUP (which we will discuss in a future post).

You can also combine parameters!

The below command will perform 100 pings against, force the results to IPv4, and save the output to a text file in Windows:

ping -n 100 -4 > C:\MyFile\ping-test.txt

So there you have it! You are now a certified ping engineer and are ready to wow all your sysadmin friends with your mad skillz. If they laugh at you, just tell yourself it’s because they are jealous.

Until next time!

~ Mike



Contact Us

On Key

More Posts

WME Security Briefing 27 May 2024

Kinsing Hacker Group Exploits Docker Vulnerabilities Overview Recent investigations have shown that the hacker group Kinsing is actively exploiting Docker vulnerabilities to gain unauthorized access to systems. The modified hacker group targets misconfigured Docker API ports deployed with cryptocurrency mining malware.

Read More »
WME Cybersecurity Briefings No. 010
Cyber Security

WME Security Briefing 20 May 2024

Advanced Persistent Threats: North Korean Hackers Launch Golang Malware Overview A new malware strain, called Titan Stealer, is currently actively circulating in the threat landscape, targeting a variety of personal data and linked to North Korean state-sponsored cyber espionage

Read More »
WME Cybersecurity Briefings No. 009
Cyber Security

WME Security Briefing 08 May 2024

Exploitable vulnerability in Microsoft Internet Explorer, used to deploy VBA Malware Overview Cybersecurity researchers discovered a severe exploitation targeting a bug that had already been patched in the Microsoft Internet Explorer browser. Their report added that

Read More »
Be assured of everything

Get WME Services

Stay ahead of the competition with our Professional IT offerings.