LinuxCommandLibrary

traceroute6.iputils

Trace IPv6 route to a network host

SYNOPSIS

traceroute6 [OPTIONS] HOST [PACKETLEN]

PARAMETERS

-I
    Uses ICMPv6 ECHO_REQUEST packets as probes. This is often the default probe type for IPv6 traceroute.

-U
    Uses UDP packets as probes. The destination port is usually incremented for each probe.

-T
    Uses TCP SYN packets as probes. This can be useful for tracing paths through firewalls that might block ICMPv6 or UDP.

-p port
    Sets the destination port for UDP or TCP probes. Default is often 33434 for UDP.

-m max_hops
    Sets the maximum number of hops (IPv6 Hop Limit) to probe. Default is typically 30.

-q nqueries
    Sets the number of probe packets to send for each hop. Default is 3.

-w waittime
    Sets the time in seconds to wait for a response to a probe. Default is usually 5 seconds.

-n
    Do not resolve IP addresses to hostnames. This speeds up the process by avoiding DNS lookups.

-v
    Enables verbose output, providing more detailed information about the operation.

-s source_addr
    Specifies the source IPv6 address to use for outgoing probe packets.

-f first_hop
    Specifies the starting hop limit (TTL) from which to begin probing. Default is 1.

DESCRIPTION

traceroute6.iputils is a fundamental network diagnostic utility within the Linux iputils package, specifically designed to trace the route that IPv6 packets take to reach a destination host. It operates by sending probe packets with progressively increasing IPv6 hop limits (analogous to Time To Live in IPv4). When a router receives a packet with a hop limit of 1 and forwards it, it decrements the hop limit to 0 and, by standard, returns an ICMPv6 "Time Exceeded" message to the source. By analyzing these messages and the time taken for their return, traceroute6 constructs a map of the network path and measures the round-trip time to each intermediate hop.

This command is invaluable for identifying network bottlenecks, diagnosing routing loops, pinpointing points of failure, or understanding connectivity issues within an IPv6 network. It supports various probe types, including ICMPv6 Echo Request, UDP, and TCP SYN, allowing flexibility to bypass certain firewall rules or test specific service paths.

CAVEATS

Firewalls and network devices may block ICMPv6 "Time Exceeded" messages or probe packets, leading to "* * *" (no response) for certain hops.
Round-trip times displayed might not be precise, especially on busy routers, and can vary due to network congestion or asymmetric routing.
The command traces the forward path; the return path may differ, especially in complex network topologies.
Some network devices might not return appropriate ICMPv6 messages, causing the trace to appear to stop prematurely.

PROBE TYPES AND USAGE

traceroute6.iputils offers different probe types to cater to various network scenarios:
ICMPv6 probes (default with -I): Most common, often used for basic reachability and hop detection. Can be blocked by firewalls.
UDP probes (with -U): Can sometimes bypass simple ICMP blocks, but may hit UDP port-unreachable blocks at the destination.
TCP SYN probes (with -T): Excellent for testing paths to specific services, as it mimics actual connection attempts. Requires root privileges and is more likely to pass through firewalls designed to allow web traffic, for example.

INTERPRETING OUTPUT

The output lists each hop along the path, its IP address (and optionally hostname), and the round-trip times for the probes sent to that hop. For example:
1 2001:db8::1 (2001:db8::1) 1.234 ms 1.567 ms 1.345 ms
indicates the first hop at IP 2001:db8::1 with three response times.

An asterisk (*) indicates no response was received for a probe, which can signify packet loss, a non-responding router, or a firewall blocking the probes.

The final hop usually represents the destination host itself. If the trace doesn't complete to the destination, it often points to a problem on the last responding hop or beyond.

HISTORY

The original traceroute utility was developed by Van Jacobson in 1987, quickly becoming an indispensable tool for network diagnostics on Unix-like systems. The iputils package on Linux provides a robust and widely used implementation of traceroute. With the advent of IPv6, the utility was extended to support the new protocol, often as traceroute -6 or a dedicated traceroute6 command. The iputils version adapted the core principles of using progressively increasing hop limits and ICMP Time Exceeded messages to the IPv6 standard (ICMPv6 and Hop Limit), ensuring similar diagnostic capabilities for modern IPv6 networks.

SEE ALSO

ping6(8), mtr(8), ip(8), netstat(8)

Copied to clipboard