Reviewed by Web Webster
Ping and Traceroute are two common programs that can be used to test your internet connection and help you diagnose congestion between your computer and the destination server you’re trying to reach.
When data is sent over the internet, it’s sent in small blocks of data, called packets. Messages are divided into packets before they are sent, and each packet is then transmitted individually and can even follow different routes to its destination. Once all the packets forming a message arrive at the destination, they are recompiled into the original message.
Sometimes, when you send or receive data over the internet you experience timeouts, or a web server may be down, which prevents you from accessing services and websites. There are two common programs that can be used to test your internet connection and even help you diagnose congestion between your computer (your ISP) and the destination server you’re trying to reach. The programs you can use are called Ping and Traceroute.
Table of Contents
Ping (also written as PING or ping) is a utility that you use to determine whether or not a specific IP address is accessible. Ping works by sending a packet to a specified address and waiting for a reply. Ping is used primarily to troubleshoot Internet connections and there are many freeware and shareware Ping utilities available for download.
On a Windows PC you can run Ping using a command prompt. To do this, go to the Windows Start button, choose Programs, then MSDOS Prompt. When you get the C: prompt, type ping followed by the destination server name or an IP address, for example, ping google.com.
Ping will test the speed of your connection to the server and will tell you how long a packet (32 bytes in size) takes to go from your computer to the host and back to your computer again.
When setting up a network you can use the ping command to make sure all of the computers are “alive” (at least in the TCP/IP sense). To do this, go to the Windows Start button, choose Programs, then MSDOS Prompt. When you get the C: prompt, type ping 127.0.0.1
If everything is OK, you should get the following response (or something similar):
Pinging 127.0.0.1 with 32 bytes of data
Reply from 127.0.0.1: bytes=32 time Reply from 127.0.0.1: bytes=32 time Reply from 127.0.0.1: bytes=32 time Reply from 127.0.0.1: bytes=32 time
This means that TCP/IP is working on the machine that you are typing on. 127.0.0.1 is a special address that “loops back” to the machine you are pinging from. You can also type ping localhost and receive a similar response, since localhost and 127.0.0.1 mean the same thing.
Traceroute is a utility that traces a packet from your computer to an Internet host, but it will show you how many hops the packet requires to reach the host and how long each hop takes. If you’re visiting a Web site and pages are appearing slowly, you can use traceroute to figure out where the longest delays are occurring. Traceroute utilities work by sending packets with low time-to-live (TTL) fields. The TTL value specifies how many hops the packet is allowed before it is returned. When a packet can’t reach its destination because the TTL value is too low, the last host returns the packet and identifies itself. By sending a series of packets and incrementing the TTL value with each successive packet, traceroute finds out who all the intermediary hosts are.
The original traceroute is a UNIX utility, but nearly all platforms have something similar. Windows includes a traceroute utility called tracert. On a Windows PC you can run traceroute using a command prompt To do this, go to the Windows Start button, choose Programs, then MSDOS Prompt. When you get the C: prompt, type tracert followed by the destination server name or an IP address, for example: tracert google.com
If any of the hops come back with * Request timed out, this denotes network congestion and a reason for slow loading Web pages and dropped connections.
You can basically use Ping and Traceroute to self-diagnose problems with your Internet connection. When you view the results this shows you where the problem lies; with your own computer, on the network, or to see if it is the server you are trying to reach that is experiencing issues.
So, What’s the Difference Again?
The main difference between the common Ping and Traceroute commands is that Ping is a quick and easy way to tell you if the destination server is online and estimates how long it takes to send and receive data to the destination. Traceroute tells you the exact route you take to reach the server from your computer (ISP) and how long each hop takes.
DID YOU KNOW…
It is often believed that “Ping” is an abbreviation for Packet Internet Groper, but Ping’s author has stated that the names comes from the sound that a sonar makes.