Traceroute in Network Layer (original) (raw)

Last Updated : 23 Jul, 2025

Traceroute is a tool widely used by network engineers and system administrators for tracing the path a packet travels from a source point to another destination point. By sequentially tracking each router along a packet’s path, traceroute reveals not only which routers a packet encounters but also how long it takes to get from one router (“hop”) to the next.

In general this tool also shows the invisible route data packets follow which helps professionals identify, troubleshoot latency, and gain deeper insights into the network’s structure. Understanding traceroute and its mechanisms at the network layer provides the foundational knowledge needed to maintain robust, efficient, and high-performing communication channels.

Introduction to Traceroute

A traceroute is a network diagnostic tool that shows the route an IP packet takes from your computer to a specific destination. It works by sending a series of packets with increasing Time-to-Live (TTL) values to the target host. Each router along the path decreases the TTL value by one. When the TTL reaches zero, the router sends an ICMP Time Exceeded message back to the source, revealing the IP address of that router.

It shows you the complete route to a destination address. It also shows the time taken (or delays) between intermediate routers. Below is an example of the Windows operating system.

How to Run a Traceroute?

**1. Windows

  1. **Open Command Prompt:
    • Press the Windows key, type "cmd," and press Enter.
  2. **Run the Traceroute Command:
    • Type tracert followed by the target website or IP address, then press Enter. **For example:

tracert google.com

tracert

What Does the Above Output Mean?

A first column is a serial number for intermediate routers. In the above output, three packets are sent to every hop to get a good estimate of delays for every router. The three columns show the time taken by three different packets. The last column is the IP/Name of intermediate routers. The output shows three delays for the first hop, followed by delays for the second router and so on.

**2. macOS

  1. **Open Terminal:
    • Go to the Applications folder, then Utilities, and open Terminal.
  2. **Run the Traceroute Command:
    • Type traceroute followed by the target website or IP address, then press Enter. **For example:

traceroute google.com

**3. Linux

  1. **Open Terminal:
    • Open the terminal application on your Linux distribution.
  2. **Run the Traceroute Command:
    • Type traceroute followed by the target website or IP address, then press Enter. **For example:

traceroute google.com

**How Does Traceroute Work?

Traceroute operates by sending a series of data packets to a target address while controlling a key parameter called the “Time to Live” (TTL).

**As shown in the below diagram, there are intermediate routers between source and destination.

Working of Traceroute

What is Traceroute Used For?

Traceroute is commonly used to:

How To Read A Traceroute Report?

A traceroute report is a line-by-line breakdown of the path a packet takes from your computer to a specific destination. Each line represents a "hop," or a network device, such as a router, that the packet passes through.