How Do I Trace Route Over IPv6?

Traceroute is one of the most essential network diagnostic tools for understanding how packets travel across the internet. When working with IPv6, traceroute helps identify routing problems, measure hop-by-hop latency, detect suboptimal paths, and compare IPv6 routing against IPv4. This comprehensive guide covers everything you need to know about performing IPv6 traceroute operations across different platforms.

Understanding Traceroute and IPv6

Traceroute works by sending packets with incrementally increasing Time To Live (TTL) values (called Hop Limit in IPv6). Each router along the path decrements this value, and when it reaches zero, the router sends back an ICMPv6 Time Exceeded message, revealing its identity. By collecting these responses, traceroute maps the complete path from source to destination.

Key Differences: IPv4 vs IPv6 Traceroute

Protocol Changes: IPv6 traceroute uses ICMPv6 Type 3 (Time Exceeded) instead of ICMP Type 11. The Hop Limit field in IPv6 replaces IPv4's TTL field, serving the same purpose but with cleaner semantics.

Addressing: IPv6's 128-bit addresses appear in traceroute output, which can make results more verbose. However, the fundamental mechanism remains identical to IPv4.

Routing Independence: IPv6 and IPv4 use completely separate routing tables and BGP peering relationships. This means your IPv6 packets may take entirely different paths than IPv4, potentially with different latencies, hop counts, and even geographic routes. See IPv6 routing policies for more about IPv6 routing behavior, or learn about announcing IPv6 prefixes via BGP.

Firewall Behavior: ICMPv6 is essential for IPv6 operation (unlike optional ICMP in IPv4), so IPv6 traceroute tends to work more reliably as network administrators are less likely to block it entirely.

Platform-Specific Commands

Linux

Most Linux distributions provide the traceroute6 command or the unified traceroute -6 option:

# Using dedicated traceroute6 command
traceroute6 google.com

# Using unified traceroute with IPv6 flag
traceroute -6 cloudflare.com

# Traceroute to a specific IPv6 address
traceroute6 2001:4860:4860::8888

# Disable reverse DNS lookups (faster results)
traceroute6 -n google.com

# Limit maximum hops
traceroute6 -m 20 example.com

# Use ICMPv6 instead of UDP (default is UDP)
traceroute6 -I github.com

# Set packet size
traceroute6 -s 1280 google.com

# Specify number of queries per hop (default is 3)
traceroute6 -q 1 cloudflare.com

# Set initial hop limit
traceroute6 -f 5 example.com

Installation (if not already present):

# Debian/Ubuntu
sudo apt-get install traceroute

# Red Hat/CentOS/Fedora
sudo dnf install traceroute

# Arch Linux
sudo pacman -S traceroute

macOS

macOS includes traceroute6 as a built-in command:

# Basic IPv6 traceroute
traceroute6 google.com

# Traceroute with no DNS resolution
traceroute6 -n 2606:4700:4700::1111

# Use ICMP instead of UDP
traceroute6 -I cloudflare.com

# Limit hops to 15
traceroute6 -m 15 github.com

# Verbose output
traceroute6 -v example.com

# Wait up to 3 seconds per probe
traceroute6 -w 3 google.com

macOS also supports the unified traceroute -6 syntax for consistency with IPv4.

Windows

Windows uses the tracert command for both IPv4 and IPv6:

# Force IPv6 traceroute
tracert -6 google.com

# Traceroute to IPv6 address (auto-detects IPv6)
tracert 2001:4860:4860::8888

# Disable hostname resolution
tracert -d 2606:4700:4700::1111

# Set maximum hop count
tracert -h 20 cloudflare.com

# Timeout per reply (in milliseconds)
tracert -w 1000 github.com

Note: Windows automatically detects protocol when you provide an IPv6 address, so the -6 flag is optional if using addresses directly. However, for hostnames with both A and AAAA records, the -6 flag ensures IPv6 is used.

Probe Packet Methods

Traceroute can use different types of probe packets, each with advantages and limitations:

UDP (Default on Linux/macOS)

# UDP is the default
traceroute6 google.com

# Explicitly specify UDP with port
traceroute6 -U -p 33434 cloudflare.com

How it works: Sends UDP packets to high-numbered ports (33434+) unlikely to have listening services. When reaching the destination, the host returns an ICMPv6 Port Unreachable message, signaling completion.

Advantages:

Disadvantages:

ICMP Echo Request

# Use ICMP echo requests (like ping)
traceroute6 -I google.com

How it works: Sends ICMPv6 Echo Request packets (Type 128), just like ping6. The destination responds with ICMPv6 Echo Reply (Type 129) instead of Port Unreachable.

Advantages:

Disadvantages:

TCP SYN

# Use TCP SYN packets to port 80
traceroute6 -T -p 80 google.com

# Try HTTPS port 443
traceroute6 -T -p 443 cloudflare.com

How it works: Sends TCP SYN packets (connection attempts) to a specified port. When reaching the destination, a SYN-ACK or RST response indicates arrival.

Advantages:

Disadvantages:

When to use each method:

Interpreting Traceroute Output

Successful Traceroute

traceroute6 to 2607:f8b0:4004:c07::71 (2607:f8b0:4004:c07::71), 30 hops max, 80 byte packets
 1  2001:db8:1::1 (2001:db8:1::1)  1.234 ms  1.189 ms  1.156 ms
 2  2001:db8:100::1 (2001:db8:100::1)  5.432 ms  5.398 ms  5.421 ms
 3  2001:db8:200::1 (2001:db8:200::1)  12.567 ms  12.534 ms  12.589 ms
 4  2001:db8:300::1 (2001:db8:300::1)  18.123 ms  18.089 ms  18.134 ms
 5  2607:f8b0:4004:c07::71 (2607:f8b0:4004:c07::71)  25.123 ms  25.089 ms  25.134 ms

Reading the output:

Asterisks and Timeouts

traceroute6 to 2606:4700:4700::1111, 30 hops max
 1  2001:db8:1::1  1.234 ms  1.189 ms  1.156 ms
 2  2001:db8:100::1  5.432 ms  5.398 ms  5.421 ms
 3  * * *
 4  2001:db8:300::1  18.123 ms  18.089 ms  18.134 ms
 5  * * *
 6  2606:4700:4700::1111  25.123 ms  25.089 ms  25.134 ms

What asterisks mean:

Important: Asterisks at intermediate hops are usually normal and not concerning if later hops respond. Packets are still reaching their destination; you're just not seeing every router along the way.

Concerning patterns:

Partial Responses

 5  2001:db8:400::1  22.456 ms * 23.123 ms

Some probes responded while others timed out. This suggests:

Multiple IP Addresses at One Hop

 4  2001:db8:300::1 (2001:db8:300::1)  18.123 ms
    2001:db8:300::2 (2001:db8:300::2)  18.456 ms
    2001:db8:300::1 (2001:db8:300::1)  18.234 ms

Indicates:

Comparing IPv4 vs IPv6 Routes

One of the most valuable uses of traceroute is comparing how IPv4 and IPv6 traffic is routed:

# Run both protocols side-by-side
traceroute -4 google.com > ipv4_route.txt
traceroute -6 google.com > ipv6_route.txt

# Compare results
diff -y ipv4_route.txt ipv6_route.txt

# Or view them side-by-side manually
traceroute -4 google.com
traceroute -6 google.com

What to Look For

Hop Count Comparison:

Latency Comparison:

Path Similarity:

Geographic Routing:

Advanced Traceroute Techniques

Testing Path MTU Discovery

# Send larger packets to test MTU
traceroute6 -s 1400 google.com

# Test with different packet sizes
traceroute6 -s 1280 cloudflare.com  # IPv6 minimum MTU
traceroute6 -s 1500 cloudflare.com  # Common Ethernet MTU

If packets fragment or fail at certain sizes, you may have MTU issues along the path. IPv6 doesn't allow router fragmentation, so proper Path MTU Discovery is critical. See Path MTU Discovery in IPv6 for detailed MTU troubleshooting.

Targeting Specific Ports

# Trace to web server on port 80
traceroute6 -T -p 80 example.com

# Trace to HTTPS port
traceroute6 -T -p 443 github.com

# Trace to DNS server
traceroute6 -U -p 53 8.8.8.8

Tests the actual path used by specific protocols and services.

Analyzing with AS Numbers

# Show Autonomous System numbers (requires supporting version)
traceroute -A -6 google.com

# Or use mtr for better AS lookup
mtr --aslookup -6 cloudflare.com

Reveals which organizations and networks your traffic traverses, useful for identifying peering issues.

Source Address Selection

# Specify source address (useful with multiple IPv6 addresses)
traceroute6 -s 2001:db8:1::100 google.com

Tests routing from specific source addresses, important when troubleshooting multi-homed networks.

MTR: Enhanced Continuous Traceroute

MTR (My TraceRoute) combines traceroute and ping functionality, providing continuous, real-time statistics for each hop. It's significantly more powerful than standard traceroute for diagnosing intermittent issues.

Installing MTR

# Linux (Debian/Ubuntu)
sudo apt install mtr

# Linux (Red Hat/CentOS/Fedora)
sudo dnf install mtr

# macOS (using Homebrew)
brew install mtr

Basic MTR Commands

# Force IPv6
mtr -6 google.com

# Disable DNS lookups (faster)
mtr -n -6 2606:4700:4700::1111

# Report mode: run 100 cycles and exit
mtr -r -c 100 -6 cloudflare.com

# CSV output for analysis
mtr --csv -c 100 -6 github.com > results.csv

# JSON output for automation
mtr --json -c 50 -6 example.com

# Use ICMP instead of UDP
mtr -I -6 google.com

# Use TCP SYN to port 443
mtr -T -P 443 -6 cloudflare.com

Interpreting MTR Output

HOST: localhost                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1. 2001:db8:1::1                 0.0%   100    1.2   1.3   1.1   2.1   0.2
  2. 2001:db8:100::1               0.0%   100    5.4   5.5   5.2   7.8   0.4
  3. 2001:db8:200::1               2.0%   100   12.6  13.1  12.3  45.2   3.8
  4. ???                          100.0%   100    0.0   0.0   0.0   0.0   0.0
  5. 2607:f8b0:4004:c07::71        0.0%   100   25.1  25.4  24.8  27.3   0.6

Column meanings:

Key insights:

Continuous Monitoring

MTR excels at detecting intermittent issues that single traceroute runs miss:

# Monitor for 10 minutes
mtr -6 -c 600 google.com

# Long-term monitoring script
while true; do
    echo "=== $(date) ===" >> monitoring.log
    mtr -r -c 20 -6 -n google.com >> monitoring.log
    sleep 300  # Test every 5 minutes
done

Online Traceroute Tools

When you can't run command-line tools or want to test from different geographic locations, web-based traceroute services are valuable:

Looking Glass Services

Hurricane Electric: https://lg.he.net/

RIPE NCC: https://www.ripe.net/analyse/internet-measurements/routing-information-service-ris/ris-looking-glass

RouteViews: http://www.routeviews.org/

Multi-Location Testing

Ping.pe: https://ping.pe/

IPNetworkingLab: https://www.ipnetworkinglab.com/

Basic Connectivity Testing

For quick IPv6 connectivity verification before diving into detailed traceroute analysis, visit test-ipv6.run to:

This provides a baseline to determine if deeper traceroute investigation is needed.

Troubleshooting Common Issues

Traceroute Completely Fails

Symptoms: "Network unreachable" or immediate failure

Causes and solutions:

All Hops Show Asterisks

Symptoms: Every hop displays * * *

Causes and solutions:

High Latency Compared to IPv4

Symptoms: IPv6 traceroute shows significantly higher latency than IPv4

Investigation steps:

  1. Run parallel traceroutes: traceroute -4 and traceroute -6
  2. Count hops - more hops often means longer paths
  3. Look for geographic detours using WHOIS on router IPs
  4. Use MTR to identify specific problematic hops
  5. Test at different times to rule out temporary congestion
  6. Contact your ISP with MTR evidence if consistently poor See also How to measure IPv4 vs IPv6 latency for more detailed latency analysis

Inconsistent or Flapping Routes

Symptoms: Running traceroute multiple times shows different paths

Causes:

Investigation: Use MTR to see path stability over time

Destination Shows Asterisks but Service Works

Symptoms: Final hop doesn't respond but website/service is accessible

Explanation: Destination is configured not to respond to traceroute probes but accepts normal traffic. This is common and intentional for security/privacy.

Solution: Not a problem - traffic is reaching destination successfully

Best Practices

  1. Start with basic connectivity: Visit test-ipv6.run before detailed troubleshooting, or use our guide on IPv6 readiness test websites
  2. Always compare with IPv4: Run both traceroute -4 and traceroute -6 to identify protocol-specific issues
  3. Use -n for faster results: Skip reverse DNS when you don't need hostnames
  4. Try different probe methods: If UDP fails, try ICMP (-I) or TCP (-T)
  5. Run multiple times: Single traceroute snapshots can be misleading; run 3-5 times or use MTR
  6. Document findings: Save output when reporting issues to ISPs or network operators
  7. Test at different times: Network behavior varies by time of day and day of week
  8. Use MTR for intermittent issues: Standard traceroute won't catch occasional problems
  9. Check multiple destinations: Poor routing to one site doesn't indicate systemic problems
  10. Understand limitations: Asterisks and timeouts don't always indicate problems

Understanding Your Results

Good IPv6 Routing Indicators

Red Flags Requiring Investigation

Conclusion

Traceroute over IPv6 is an essential diagnostic tool for understanding modern internet routing. While the fundamental concepts remain the same as IPv4, IPv6's separate routing infrastructure means you must test both protocols independently to get a complete picture of network behavior.

Start with basic connectivity verification at test-ipv6.run to confirm IPv6 is working and measure baseline latency, or see our guide on IPv6 readiness test websites for other testing resources. When problems arise or you need deeper analysis, use platform-appropriate traceroute commands (traceroute6 on Linux/macOS, tracert -6 on Windows) to map routing paths. For comprehensive analysis of intermittent issues, MTR provides continuous monitoring with detailed statistics for each hop.

Remember that IPv6 routing continues to mature as deployment grows. Paths that are suboptimal today may improve as networks establish better peering relationships and optimize their IPv6 infrastructure. Regular testing helps track these improvements and identify issues requiring attention from network operators.

Key takeaways:

With these tools and techniques, you can effectively diagnose IPv6 routing issues, optimize network paths, and ensure your IPv6 connectivity performs as well as or better than IPv4.