Information Gatheringnetworktracerouteroutingconnectivitydebuggingipv4ipv6

traceroute

Traces the route taken by packets over an IPv4/IPv6 network. Displays the IP number and host name of machines along the route to diagnose network connectivity problems.

Description

The traceroute utility displays the route used by IP packets on their way to a specified network host. It shows the IP number and host name (if possible) of the machines along the route taken by the packets. Traceroute is used as a network debugging tool to identify where connectivity problems originate along the route.

Install traceroute if you need a tool for diagnosing network connectivity issues. It helps pinpoint trouble spots in network paths, making it essential for troubleshooting latency, packet loss, or routing failures.

The package includes variants like traceroute.db and traceroute6.db for IPv4 and IPv6, along with advanced tools such as lft.db, tcptraceroute.db, traceproto.db, and traceroute-nanog for specialized tracing needs.

How It Works

Traceroute sends packets with incrementally increasing TTL (Time to Live) values to the target host. Each router along the path decrements the TTL and sends an ICMP Time Exceeded message when TTL reaches zero, revealing the router's IP and hostname. This process maps the full route hop-by-hop to the destination.

Installation

bash
sudo apt install traceroute

Flags

-4Use IPv4
-6Use IPv6
-d --debugEnable socket level debugging
-F --dont-fragmentDo not fragment packets
-f first_ttl --first=first_ttlStart from the first_ttl hop (instead from 1)
-g gate,... --gateway=gate,...Route packets through the specified gateway
-i deviceSpecify network device
-m max_ttlSet maximum TTL
-p portSet port
-t tosSet TOS

Examples

Display help for traceroute.db
traceroute.db --help
Display help for lft.db traceroute variant
lft.db --help
Display help for tcptraceroute.db
tcptraceroute.db -h
Display help for traceproto.db
traceproto.db -h
Display help for traceroute-nanog
traceroute-nanog -h
Display help for traceroute6.db IPv6 variant
traceroute6.db --help
Trace route to host with specified packet length
traceroute.db host packetlen
Updated 2026-04-16kali.org ↗