Data is sent in small packets on a computer network. These packets are transmitted individually and follow various pathways to reach the receiver. The receiver reassembles each packet to read the data each time. This is the normal procedure which repeats thousands of time when we perform the simplest functions on a network. However, sometimes the packets are unable to reach their destination due to delays. Be it a glitch or technical error, one needs to find out why their transaction is lagging. To diagnose the reason behind a network glitch, we use Ping and Traceroute commands.
Ping is a very common command for troubleshooting internet connectivity on devices. Ping uses Internet Control Message Protocol (ICMP) to find out:
- If the remote host is active or if they are inactive
- The delay caused in communicating with the host
- Loss of packets during communication
Ping command is used to first send an echo request packet to an internet address. Then, it waits for the host to reply. There are many Pin utilities available to download and use for troubleshooting. Ping turns out to the successful only if:
- The echo request is successful transferred to the destination
- The destination sends an echo request back to sender with a timeout.
Traceroute is a utility which traces a data packet, starting from your computer to a host. Traceroute shows you how many hops a packet needs to reach the host and how much time it will take for each hop to complete. For example, if you visit a website and its pages are loading slowly, you can use traceroute to figure out the cause behind this delay.
Traceroute sends packets with low time-to-live (TTL) field. TTL specifies how many hops a packet will make before it comes back to your computer. If a packet cannot reach its destination because TTL value is very low, the host returns this packet after identifying itself. Sending successive packets and incrementing the TTL values is how traceroute finds all the intermediate hosts. When a packet is dropped, the router will send an ICMP Time Exceed message to the sender so they can determine total time.
Originally, traceroute is a UNIX utility, but other systems also have similar tracing commands. For example, Windows uses a utility called tracert which performs the same function. You can run traceroute on Windows by using command prompt on MSDOS.
Some reasons to conduct a traceroute test:
- Traceroute helps diagnose routing issues like slow connection speeds
- It tracks the hops between your end destination and your PC. This helps the traceroute identify the source of the issue or delay.
- Windows users can take advantage of TRACERT for an accurate measure of their traceroute.
Difference between Ping and Traceroute
The main difference between Ping and Traceroute is that Ping is quicker out of the two. It is the easiest utility to find out why a connection is slow or lagging. Ping also informs us on how long it will take to send or receive data from the server. Traceroute command only follows the pathways to trace the reach of each server and time taken to do so.
Ping and Traceroute seem like cousins, as both of them can be used to test the status of the destination server. However, Ping is an easier and quicker method to check the destination server’s utility, as well as how long it should take to receive and send data to the specific server. In contrast, the traceroute searches for the “exact route” taken to connect with a server and the hop (, i.e. time spent by each step) between points and the next.