How to Use Traceroute with IPv6

Trace the IPv6 network path to a host using traceroute6 on Linux and macOS or tracert -6 on Windows, with output examples and troubleshooting.

Trace the IPv6 network path to a destination host using traceroute6 on Linux and macOS or tracert -6 on Windows.

Prerequisites

  • A terminal or command prompt with traceroute (Linux/macOS) or tracert (Windows) installed.
  • IPv6 connectivity on the local network. Verify with ping6 ::1 on Linux/macOS or ping -6 ::1 on Windows.
  • The destination host must have an IPv6 address (AAAA DNS record) or a known IPv6 address.

Step-by-Step: Trace an IPv6 Route

1. Run traceroute6 on Linux or macOS

Trace the IPv6 path to a destination using the traceroute6 command. Pass the hostname or IPv6 address as the argument:

traceroute6 example.com

Traceroute6 sends ICMPv6 or UDP probes with incrementing hop limit values (the IPv6 equivalent of TTL) and displays each router along the IPv6 path.

Trace to a specific IPv6 address:

traceroute6 2001:db8::10

Expected output:

traceroute6 to 2001:db8::10 from ::, 30 hops max, 60 byte packets
 1  2001:db8::a:1c:e3:3  0.543 ms  0.312 ms  0.287 ms
 2  2001:db8:0:7::5  7.128 ms  3.456 ms  0.891 ms
 3  2001:db8::214:c2ff:fe4c:e480  0.654 ms  1.023 ms  0.445 ms
 4  2001:db8::10  0.321 ms  1.102 ms  0.198 ms

Each line shows the hop number, the IPv6 address of the responding router, and three round-trip time measurements.

2. Use the -6 flag with traceroute on Linux

Traceroute on Linux also supports the -6 flag to force IPv6 probes. This is equivalent to running traceroute6:

traceroute -6 example.com

The -6 flag forces traceroute to resolve the hostname to an AAAA record and send IPv6 probes, even when both IPv4 and IPv6 addresses exist for the destination.

3. Run tracert -6 on Windows

Windows tracert traces IPv6 routes with the -6 flag:

tracert -6 example.com

Windows tracert sends ICMP Echo Request packets over IPv6 and displays each hop along the IPv6 path. The output format matches standard tracert output — hop number, three round-trip times, and the IPv6 address of the responding router.

How to Verify the IPv6 Traceroute Succeeded

Traceroute completes when the final hop displays the destination's IPv6 address and responds with valid round-trip times. Confirm the destination address by comparing the last hop's IPv6 address with a DNS lookup:

dig AAAA example.com +short

The IPv6 address returned by dig should match the final hop in the traceroute6 output.

Common Issues When Using Traceroute with IPv6

"Network is unreachable" on the first hop.Traceroute6 produces this error when the local system lacks IPv6 connectivity. Verify that an IPv6 address is assigned to the network interface with ip -6 addr show on Linux or ipconfig on Windows. Contact the ISP or network administrator if no global IPv6 address is assigned.

All hops show asterisks ( * * *).Firewalls along the path may drop ICMPv6 packets. Some networks filter IPv6 ICMP traffic more aggressively than IPv4. Try running traceroute6 to a known IPv6-enabled host such as traceroute6 ipv6.google.com to confirm that IPv6 traceroute works outside the problematic path.

"traceroute6: command not found" on Linux.The traceroute6 command is part of the traceroute package. Install it with sudo apt install traceroute on Ubuntu/Debian or sudo dnf install traceroute on CentOS/Fedora.

Tracert -6 resolves to an IPv4 address on Windows.Windows tracert with the -6 flag fails when the destination hostname has no AAAA DNS record. Verify that the target host supports IPv6 by querying its AAAA record with nslookup -type=AAAA example.com.