GO KALI FREE

traceroute

Information Gathering

Beginnerlow risk

traceroute tracks the route packets take across an IP network on their way to a given host. It utilizes the IP protocol 'time to live' (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response.

Installation

sudo apt install traceroute

Basic Syntax

traceroute <target>

Quick Facts

Full Name
traceroute / tracert
License
Various (BSD/GPL)
Protocol
ICMP, UDP, TCP
Platforms
Linux, macOS, Windows
Category
Network Diagnostic
Default Protocol
ICMP (Linux), UDP (Windows)

Tool Overview

Traceroute is a network diagnostic tool that traces the path packets take from your system to a destination. It identifies each router (hop) along the path and measures the latency at each point.

The tool works by sending packets with incrementing TTL (Time To Live) values. Each router decrements the TTL and sends back a time-exceeded message when TTL reaches zero, revealing the hop's IP address and response time.

Traceroute is essential for diagnosing network issues, identifying routing problems, understanding network topology, and troubleshooting connectivity issues between source and destination.

Common Commands

traceroute example.comStandard route trace - Map network transit routers connecting local host systems to destination networks
traceroute -T example.comTCP traceroute
traceroute -n example.comNo DNS resolution
traceroute -p 443 example.comSpecific port
traceroute -I example.comICMP echo requests
traceroute -T example.comTCP SYN traceroute
traceroute -n example.comNo DNS resolution
traceroute -p 443 example.comTrace to HTTPS port
traceroute -m 30 example.comMaximum 30 hops
traceroute -q 1 example.com1 probe per hop
traceroute -w 3 example.com3-second wait time
traceroute -f 5 example.comStart from TTL 5
traceroute -i wlan0 example.comSpecific interface
traceroute -s 192.168.1.100 example.comSpecific source IP
traceroute -T -p 80 example.comTCP trace to HTTP

Step-by-Step Guide

  1. 1Execute the trace command against your remote destination
  2. 2Record the sequence of gateway hops and response delays
  3. 3Analyze the output to determine where internal routing stops and external begins
  4. 4Spot nodes that drop packets, which often indicates a firewall boundary

Use Cases

Network Path Discovery

Map the routers between your system and the destination.

Latency Analysis

Identify where network latency occurs in the path.

Routing Troubleshooting

Diagnose routing loops, black holes, and asymmetric paths.

Network Topology

Understand network infrastructure through hop analysis.

Firewall Testing

Identify where packets are being dropped or blocked.

Key Features

Related Tools

mtr

Information Gathering

Continuous traceroute with real-time statistics.

ping

Information Gathering

Basic connectivity and latency testing.

Frequently Asked Questions

What is traceroute used for?

Traceroute is used for mapping the network path between your system and a destination. It shows each router (hop) along the path, measuring latency and identifying routing issues.

How does traceroute work?

Traceroute sends packets with incrementing TTL (Time To Live) values. Each router along the path decrements the TTL and sends back an ICMP time exceeded message, revealing the hop.

What is the difference between traceroute and ping?

Ping measures round-trip time to a destination. Traceroute shows every hop along the path, revealing where latency or packet loss occurs in the network.

Can traceroute be blocked?

Yes, firewalls can block ICMP or UDP packets used by traceroute. Some routers don't send ICMP time exceeded messages, causing hops to appear as * * *.

Tags

#reconnaissance#network-path#routing-discovery#icmp-ping

Ethical Usage Notice

This tool is designed for authorized security testing, educational purposes, and legitimate network administration only. Unauthorized access to computer systems is illegal.