Verifying Connectivity - Traceroute

TraceRoute

  • TraceRoute helps discover paths between two nodes and provides information about each hop.
  • It operates by manipulating the TTL (Time To Live) field at the IP level.

TTL Field Manipulation

  • Every router that forwards a packet decrements the TTL field by one.
  • When the TTL field reaches zero, the packet is discarded, and an ICMP time exceeded message is sent back to the originating host.
  • TraceRoute sets the TTL field to one for the first packet, two for the second, three for the third, and so on.
  • This ensures that the first packet is discarded by the first router hop, the second by the second, and so forth.

Process

  • TraceRoute sends three identical packets for each hop.
  • The output includes:
    • Hop number
    • Round trip time for all three packets
    • IP address of the device at each hop
    • Hostname (if TraceRoute can resolve it)

Platform-Specific Details

  • Linux and macOS:
    • TraceRoute sends UDP packets to very high port numbers.
  • Windows:
    • The command is tracert (shortened).
    • Defaults to using ICMP echo requests.
  • All platforms:
    • TraceRoute has configurable options via command-line flags.

Alternative Tools

  • MTR (Linux and macOS):
    • Acts as a long-running trace route.
    • Updates its output in real-time with aggregate data.
  • PathPing (Windows):
    • Runs for 50 seconds and then displays the final aggregate data all at once.