Ping Networking Utility
One of the basic network diagnostic tools is the ping networking utility. Ping sends a packet of information from one network device to another requesting a response. The time between when the ping packet was sent and the response is received is measured to show how fast or slow the connection is between the two devices.
Ping is one of the most commonly used diagnostic utilities for network technicians because of the frequency of problems in the communication between hosts. If an end user cannot reach a file server, the first thing you would do is to ping to the host to see if there is a connection and if the ping does not respond, that would lead you down one path of troubleshooting versus if the ping does respond. Ping doesn’t provide a lot of information, but the basic information it does provide is very useful.
Ping has a few useful options that we can use:
C:\>ping /? Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] target_name Options: -t Ping the specified host until stopped. To see statistics and continue - type Control-Break; To stop - type Control-C. -a Resolve addresses to hostnames. -n count Number of echo requests to send. -l size Send buffer size. -f Set Don't Fragment flag in packet. -i TTL Time To Live. -v TOS Type Of Service. -r count Record route for count hops. -s count Timestamp for count hops. -j host-list Loose source route along host-list. -k host-list Strict source route along host-list. -w timeout Timeout in milliseconds to wait for each reply.
A basic ping looks like this:
We ping learnthat.com, it resolves the IP address of 18.104.22.168 and then sends 4 packets of information, requesting they echo back. You can see the response came back at a speedy 65 milliseconds for the first ping. At the end, it provides you the statistics of the four pings.
A handy option is -t, or basically ping until I tell you to stop. If you’re working on a server and need to reboot it, you may use ping -t ipaddress to have it ping the server continuously to see the reboot occur and know when the machine comes back up so you can access it again.
One thing to note is that if a ping request comes back with no response, it doesn’t necessarily mean the server or device isn’t responding, there could be a number of other factors.
For example, look at our ping of 10.1.2.88, all of the requests timed out. This doesn’t mean there is a problem with 10.1.2.88. There are many other potential problems, including:
- Is there a problem with the machine you are using? A ping can also be used to determine if the machine you are on is not responding. If you know a file server is up and running, you may try pinging it up to determine if the machine you are using has a problem, not if the file server has a problem.
- Is the timeout high enough for your network conditions? This is less of a problem now than it used to be, but if you have high volumes of traffic on your network, it may be that the ping times out before returning to your host – meaning there isn’t a problem per se, the network is very slow. You can use the -w flag with ping to increase the time ping waits for a response before timing out. This is very useful when you’re troubleshooting a hardware problem on a NIC – sometimes the problem doesn’t immediately reveal itself until you do these more in depth troubleshooting techniques.
- Is a firewall blocking ICMP? ICMP are the initials for a fancy name for the packets that are sent with each ping. Many security administrators block ping requests on the simple theory that if an attacker can’t determine if your machine is active, they will be less likely to attack it. Internally this isn’t usually a big problem, but a lot of network administrators and security professionals are moving to hybrid networking devices which allow them more control over the security of the network and many may choose to block ICMP which would affect your ability to ping.
These are just some of the things that could cause a ping to fail, but each gives you a good place to start when you’re troubleshooting a network resource access issue.
On the Network+ Exam
Ping is a common diagnostic tool used in the real world and you will see plenty of it on the exam, both in questions and among the answer options provided. We recommend being completely and utterly proficient with the use of ping, try it out, understand the different options available and the potential limitations for it as a diagnostic tool.