Traceroute

Traceroute is a network diagnostic tool used to trace the path that packets take from your computer to a destination server or website. It works by sending a series of packets, each with an increasing Time-to-Live (TTL) value, towards the target. The TTL value is decremented by each router the packet passes through, and when it reaches zero, the router discards the packet and sends back an ICMP Time Exceeded message to the sender.

By sending packets with increasing TTL values, traceroute can map out the path taken by packets to reach the destination. It does this by identifying the IP addresses of the routers (hops) along the path and measuring the round-trip time (RTT) for each hop. Traceroute continues this process until it reaches the destination, or until a maximum number of hops is reached.

Traceroute provides valuable information for diagnosing network issues, such as identifying slow or problematic hops, determining the route packets take to reach a destination, and identifying network misconfigurations or failures. It is a useful tool for network administrators and users troubleshooting connectivity or performance issues on the Internet.

tcptraceroute

Tcptraceroute is a traceroute implementation that uses TCP packets instead of ICMP packets used by traditional traceroute. This allows tcptraceroute to trace the route to a destination on a specific TCP port, which can be useful for diagnosing connectivity issues for services that rely on TCP.

How traceroute works

traceroute 18.244.179.110 traceroute to 18.244.179.110 (18.244.179.110), 30 hops max, 60 byte packets 1 173.223.20.129 0.165 ms 0.172 ms 0.147 ms 2 192.168.241.16 0.136 ms 0.148 ms 0.186 ms 3 192.168.238.2 0.171 ms 192.168.229.0 0.084 ms 192.168.228.0 0.168 ms 4 192.168.224.150 0.138 ms 192.168.224.166 0.634 ms 192.168.200.174 0.594 ms 5 23.197.71.196 0.884 ms 23.210.57.18 1.165 ms 23.197.71.196 0.866 ms 6 23.197.71.40 0.510 ms 23.210.57.40 0.435 ms 23.197.71.40 0.411 ms 7 95.100.192.228 1.343 ms 95.100.192.230 15.313 ms 15.380 ms 8 95.100.192.167 9.420 ms 9.570 ms 9.737 ms 9 95.100.192.126 19.998 ms 95.100.192.227 24.720 ms 95.100.192.126 19.712 ms 10 95.100.192.244 21.261 ms 21.274 ms 21.266 ms 11 23.210.48.39 21.738 ms 23.210.48.41 25.420 ms 23.210.48.39 21.613 ms 12 23.210.48.223 28.048 ms 27.863 ms 99.82.181.2 24.835 ms 13 * * * 14 * * * 15 * * * 16 * * * 17 * * * 18 * * * 19 * * * 20 15.230.173.38 19.902 ms 15.230.173.39 21.814 ms 19.645 ms 21 * * * 22 * * * 23 * * * 24 * * * 25 * * * 26 * * * 27 * * * 28 * * * 29 * * * 30 * * *

In the provided traceroute output, each line represents a hop (router) that the packet takes from the source (your computer) to the destination (**************). Here's a breakdown of each field in the output:

  1. Hop Number: The first column indicates the hop number, starting from 1 for the first router and increasing for each subsequent router.
  2. IP Address: The second column shows the IP address of the router at that hop.
  3. RTT (Round-Trip Time): The next three columns show the round-trip time for three packets sent to that router. RTT is measured in milliseconds (ms) and indicates the time taken for a packet to travel from the source to the destination and back.
  4. Router Name (if available): If the router's IP address can be resolved to a hostname, it is displayed here. For example, "**************" is resolved to "173-223-20-129.client.mchsi.com".

Traceroute works by sending a series of packets (usually UDP) with increasing TTL (Time To Live) values. The TTL is initially set to 1 for the first packet, and each subsequent packet has its TTL incremented by 1. When a packet reaches a router, the TTL is decremented by 1. If the TTL reaches 0, the router discards the packet and sends an ICMP Time Exceeded message back to the source. This allows the traceroute tool to determine the path taken by packets from the source to the destination and measure the RTT to each router along the way.