How Do I Test IPv6 Routing Performance?

Testing IPv6 routing performance is essential for understanding how packets traverse the internet to reach their destination. Unlike simple connectivity tests, routing performance analysis examines the entire path packets take, measures latency at each hop, identifies bottlenecks, and compares IPv6 against IPv4 routes. For basic connectivity verification, see checking IPv6 connectivity. This comprehensive guide covers the tools, techniques, and best practices for analyzing IPv6 routing performance.

Quick Start: Basic Latency Testing

Before diving into detailed routing analysis, quickly test your IPv6 latency and connectivity:

Visit test-ipv6.run to run comprehensive tests that measure:

This provides an instant baseline for comparing your IPv6 and IPv4 performance. If IPv6 shows significantly higher latency, routing performance testing will help identify where delays occur.

Understanding IPv6 Routing Performance

Routing performance encompasses several key metrics:

IPv6 routing can differ significantly from IPv4 due to:

For more on BGP routing, see announcing IPv6 prefixes with BGP.

traceroute6: Basic Path Analysis

The traceroute6 command (or traceroute -6) traces the route packets take to reach an IPv6 destination, showing each hop along the way. For more detailed traceroute usage, see traceroute IPv6 guide.

Linux/macOS Commands

# Basic IPv6 traceroute
traceroute6 google.com

# Or use traceroute with -6 flag
traceroute -6 cloudflare.com

# Limit to 20 hops maximum
traceroute6 -m 20 example.com

# Use ICMP instead of UDP (may bypass some firewalls)
traceroute6 -I github.com

# Disable reverse DNS lookups for faster results
traceroute6 -n 2001:4860:4860::8888

# Set packet size to test MTU path
traceroute6 -q 1 -s 1280 ipv6.google.com

Windows Commands

Windows uses tracert for both IPv4 and IPv6:

# Basic IPv6 traceroute
tracert -6 google.com

# Traceroute with no DNS resolution
tracert -d 2606:4700:4700::1111

# Set maximum hops
tracert -h 15 ipv6.google.com

Interpreting traceroute6 Output

traceroute6 to 2607:f8b0:4004:c07::71, 30 hops max, 80 byte packets
 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  2001:db8:200::1  12.567 ms  12.534 ms  12.589 ms
 4  * * *
 5  2607:f8b0:4004:c07::71  25.123 ms  25.089 ms  25.134 ms

Key indicators:

Comparing IPv4 and IPv6 Routes

Run parallel traceroutes to compare routing paths:

# IPv4 route
traceroute -4 google.com

# IPv6 route
traceroute -6 google.com

Analysis checklist:

  1. Hop count difference: IPv6 should ideally have similar or fewer hops
  2. Final latency: Compare the last hop timing
  3. Path similarity: Do routes follow similar networks?
  4. Geographic routing: Check for suboptimal paths (use WHOIS on IP addresses)

If IPv6 shows significantly more hops or higher latency, your ISP may have less optimized IPv6 peering.

MTR: Continuous Routing Performance Monitor

MTR (My Traceroute) combines traceroute and ping functionality, providing real-time, continuously updated statistics for each hop along the route. This is the most powerful tool for diagnosing routing performance issues. For comprehensive MTR and ping testing, see IPv6 ping and ICMPv6 testing.

Installing MTR

Linux:

# Debian/Ubuntu
sudo apt install mtr

# RHEL/CentOS/Fedora
sudo dnf install mtr

# Arch Linux
sudo pacman -S mtr

macOS:

# Using Homebrew
brew install mtr

# Run with sudo for full functionality
sudo mtr google.com

Windows: Download WinMTR from https://sourceforge.net/projects/winmtr/ or use WSL for the Linux version.

Basic MTR Commands

# Force IPv6 testing
mtr -6 google.com

# Force IPv4 for comparison
mtr -4 google.com

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

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

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

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

# Extended report with additional statistics
mtr -r -w -c 100 -6 ipv6.google.com

# Specify packet size
mtr -s 1280 -6 google.com

# Use TCP packets instead of ICMP (port 80)
mtr -T -P 80 -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

Key metrics:

Red flags:

Advanced MTR Analysis

Run parallel tests to compare protocols:

# In one terminal
mtr -r -c 200 -4 google.com > ipv4_results.txt

# In another terminal
mtr -r -c 200 -6 google.com > ipv6_results.txt

# Compare the results
diff -y ipv4_results.txt ipv6_results.txt

Continuous monitoring script:

#!/bin/bash
# Monitor IPv6 routing performance over 24 hours

while true; do
    timestamp=$(date +"%Y-%m-%d %H:%M:%S")
    echo "=== $timestamp ===" >> ipv6_monitoring.log
    mtr -r -c 10 -6 -n google.com >> ipv6_monitoring.log
    sleep 300  # Test every 5 minutes
done

Advanced Routing Analysis Tools

tracepath6: Path MTU Discovery

tracepath6 discovers the maximum transmission unit (MTU) along the IPv6 path. For detailed MTU discovery guidance, see IPv6 path MTU discovery.

# Discover path MTU to destination
tracepath6 google.com

# Test specific port
tracepath6 -p 443 cloudflare.com

Output shows where MTU changes occur, which can impact performance:

 1?: [LOCALHOST]                      pmtu 1500
 2:  2001:db8:1::1                    1.234ms
 3:  2001:db8:100::1                  5.432ms
 4:  2001:db8:200::1                 12.567ms pmtu 1280
 5:  2607:f8b0:4004:c07::71          25.123ms reached

A drop to 1280 bytes (IPv6 minimum MTU) is normal, but aggressive fragmentation can degrade performance.

ping6: Basic Latency Testing

ping6 provides simple latency measurements. For comprehensive ping and ICMPv6 testing, see IPv6 ping and ICMPv6 testing.

# Basic IPv6 ping
ping6 google.com

# Send specific number of packets
ping6 -c 100 2606:4700:4700::1111

# Flood ping (requires root, use carefully)
sudo ping6 -f google.com

# Set packet size
ping6 -s 1232 google.com  # 1232 + 48 byte header = 1280

# Preload: send 3 packets as fast as possible, then normal interval
ping6 -l 3 cloudflare.com

# Interval between packets (0.1 seconds)
ping6 -i 0.1 google.com

# Record route (limited support)
ping6 -R google.com

Calculate statistics:

# Run 1000 pings and analyze
ping6 -c 1000 google.com | tee ping_results.txt

# Extract average latency
grep "rtt min/avg/max" ping_results.txt

Using curl and wget for Application-Layer Testing

Test real-world performance as applications experience it:

# Force IPv6 and show timing
curl -6 -w "\nTotal time: %{time_total}s\nDNS lookup: %{time_namelookup}s\nConnect time: %{time_connect}s\nTime to first byte: %{time_starttransfer}s\n" -o /dev/null -s https://www.google.com

# Compare IPv4 vs IPv6 download speeds
time curl -4 -o /dev/null https://speed.cloudflare.com/100mb
time curl -6 -o /dev/null https://speed.cloudflare.com/100mb

# Test multiple times for average
for i in {1..10}; do
    curl -6 -w "%{time_total}\n" -o /dev/null -s https://www.google.com
done | awk '{sum+=$1} END {print "Average:", sum/NR, "seconds"}'

BGP Routing Analysis

BGP (Border Gateway Protocol) controls how autonomous systems exchange routing information. IPv6 and IPv4 use separate BGP tables, which can result in different routing paths. For information on announcing IPv6 prefixes via BGP, see announcing IPv6 prefixes with BGP.

Checking BGP Path Information

Use looking glass servers to examine BGP routing:

Online Looking Glass Services:

Example queries:

# Check BGP route to your IPv6 prefix
show bgp ipv6 unicast 2001:db8::/32

# View AS path to destination
show bgp ipv6 unicast 2607:f8b0:4004::/48

# Check route from multiple perspectives
# Use different looking glass servers to see global routing

Analyzing AS Path Length

# Use traceroute to identify AS numbers
traceroute6 -A google.com

# Or use mtr with AS number lookup
mtr --aslookup -6 cloudflare.com

AS path considerations:

Identifying Routing Asymmetry

# Check outbound route
traceroute6 -n google.com

# Check inbound route (requires access to remote system)
# Ask remote end to traceroute back to you
# Or use online tools like:
# https://www.speedguide.net/tools/MTR-traceroute-test.php

Asymmetric routing is normal but can impact performance if return path is suboptimal.

Performance Metrics and Benchmarking

Establishing Baselines

Establish a baseline of expected performance. For dual-stack implementation guidance, see dual-stack networking guide and dual-stack test explained.

#!/bin/bash
# IPv6 routing performance baseline script

echo "=== IPv6 Routing Performance Baseline ==="
echo "Date: $(date)"
echo ""

# Test major CDN providers
destinations=(
    "google.com"
    "cloudflare.com"
    "github.com"
    "amazon.com"
    "microsoft.com"
)

for dest in "${destinations[@]}"; do
    echo "Testing $dest:"

    # Traceroute hop count
    hops=$(traceroute6 -m 30 "$dest" 2>/dev/null | grep -c "^ ")
    echo "  Hops: $hops"

    # Average latency over 10 pings
    avg_latency=$(ping6 -c 10 "$dest" 2>/dev/null | tail -1 | awk -F'/' '{print $5}')
    echo "  Avg latency: ${avg_latency}ms"

    # MTR summary
    mtr -r -c 20 -6 -n "$dest" | tail -1
    echo ""
done

Run this monthly to track routing changes over time.

Comparing IPv4 vs IPv6 Performance

#!/bin/bash
# Compare IPv4 and IPv6 routing performance

destination="google.com"

echo "=== IPv4 vs IPv6 Routing Comparison: $destination ==="
echo ""

# IPv4 metrics
echo "IPv4:"
ping4_result=$(ping -c 50 -4 "$destination" 2>/dev/null | tail -1)
echo "  Ping: $ping4_result"

ipv4_hops=$(traceroute -4 -m 30 "$destination" 2>/dev/null | grep -c "^ ")
echo "  Hops: $ipv4_hops"

# IPv6 metrics
echo ""
echo "IPv6:"
ping6_result=$(ping -c 50 -6 "$destination" 2>/dev/null | tail -1)
echo "  Ping: $ping6_result"

ipv6_hops=$(traceroute -6 -m 30 "$destination" 2>/dev/null | grep -c "^ ")
echo "  Hops: $ipv6_hops"

# MTR comparison
echo ""
echo "=== Detailed MTR Comparison ==="
echo "IPv4:"
mtr -r -c 50 -4 -w "$destination"
echo ""
echo "IPv6:"
mtr -r -c 50 -6 -w "$destination"

Key comparison metrics:

  1. Latency difference: IPv6 should be within 5-15ms of IPv4
  2. Hop count: Should be similar (±2 hops)
  3. Packet loss: Should be comparable
  4. Path stability (StDev): Should be similar
  5. Geographic routing: Check if paths take similar routes

Real-World Performance Scenarios

Test routing performance under different conditions:

Geographic diversity:

# Test routing to different continents
mtr -r -c 50 -6 google.com          # North America
mtr -r -c 50 -6 google.co.uk        # Europe
mtr -r -c 50 -6 google.co.jp        # Asia
mtr -r -c 50 -6 google.com.au       # Australia

Time-of-day variations:

# Run tests at different times to identify congestion patterns
0 */3 * * * /usr/local/bin/ipv6_perf_test.sh >> /var/log/ipv6_perf.log

CDN provider comparison:

# Compare different CDN performance
for cdn in cloudflare.com fastly.com akamai.com amazon.com; do
    echo "=== $cdn ==="
    mtr -r -c 30 -6 "$cdn"
    echo ""
done

Continuous Monitoring Solutions

For ongoing IPv6 traffic monitoring and analysis, see monitoring IPv6 traffic for comprehensive monitoring strategies.

Smokeping for Long-Term Monitoring

Smokeping provides continuous latency graphing:

# Install smokeping (Ubuntu/Debian)
sudo apt install smokeping

# Configure IPv6 targets in /etc/smokeping/config.d/Targets
+ IPv6_Destinations
menu = IPv6 Targets
title = IPv6 Routing Performance

++ Google_IPv6
menu = Google IPv6
title = Google IPv6 DNS
host = 2001:4860:4860::8888

++ Cloudflare_IPv6
menu = Cloudflare IPv6
title = Cloudflare IPv6 DNS
host = 2606:4700:4700::1111

Prometheus and Blackbox Exporter

For modern monitoring infrastructure:

# blackbox.yml configuration
modules:
  icmp_ipv6:
    prober: icmp
    timeout: 5s
    icmp:
      preferred_ip_protocol: "ip6"

  http_ipv6:
    prober: http
    timeout: 5s
    http:
      preferred_ip_protocol: "ip6"

RIPE Atlas Measurements

RIPE Atlas provides globally distributed testing:

  1. Create account at https://atlas.ripe.net
  2. Define measurement (ping, traceroute, DNS, etc.)
  3. Select IPv6 protocol
  4. Choose probe distribution
  5. Analyze results globally

This reveals routing performance from multiple perspectives worldwide.

Troubleshooting Poor Routing Performance

High Latency Diagnosis

If IPv6 shows higher latency than IPv4:

  1. Run MTR to both protocols: Identify where latency diverges
  2. Check for geographic detours: Use WHOIS to identify router locations
  3. Test at different times: Rule out temporary congestion
  4. Contact your ISP: Report suboptimal routing with MTR evidence
# Generate evidence for ISP
echo "=== IPv6 Performance Issue Report ===" > isp_report.txt
echo "Date: $(date)" >> isp_report.txt
echo "" >> isp_report.txt
echo "IPv4 Route:" >> isp_report.txt
mtr -r -c 100 -4 google.com >> isp_report.txt
echo "" >> isp_report.txt
echo "IPv6 Route:" >> isp_report.txt
mtr -r -c 100 -6 google.com >> isp_report.txt

Packet Loss Investigation

If experiencing packet loss:

  1. Identify where loss occurs: Use MTR to find problematic hop
  2. Check if loss persists to destination: Intermediate loss often doesn't matter (ICMP rate limiting)
  3. Test with different packet sizes: May indicate MTU issues
  4. Try TCP instead of ICMP: Some routers handle differently
# Comprehensive packet loss analysis
mtr -r -c 500 -6 destination.com
mtr -r -c 500 -6 -T -P 443 destination.com  # TCP
mtr -r -c 500 -6 -u -P 53 destination.com   # UDP

Routing Loops Detection

Detect routing loops (rare but serious):

# Look for repeated IP addresses in traceroute
traceroute6 -n destination.com | sort | uniq -c | sort -rn

If you see the same router multiple times, a routing loop exists.

Best Practices

  1. Establish baselines - Run performance tests regularly to understand normal behavior
  2. Compare with test-ipv6.run - Use https://test-ipv6.run for quick latency comparison
  3. Test from multiple locations - Use VPS, RIPE Atlas, or looking glasses for geographic diversity
  4. Monitor long-term - Set up Smokeping or Prometheus for trend analysis
  5. Document findings - Keep records of routing changes and performance degradation
  6. Test both protocols - Always compare IPv6 against IPv4 to identify protocol-specific issues
  7. Check multiple destinations - Poor routing to one site doesn't indicate systemic problems
  8. Time your tests - Run tests during peak and off-peak hours
  9. Use appropriate tools - MTR for diagnosis, ping for quick checks, traceroute for path analysis
  10. Report issues - Contact ISPs and network operators with detailed MTR reports

Conclusion

Testing IPv6 routing performance requires a combination of tools and techniques. Start with simple latency tests using test-ipv6.run to establish baselines, then use traceroute6 to examine routing paths, and leverage mtr for detailed continuous analysis. Compare IPv6 performance against IPv4 using parallel tests, and investigate any significant differences in latency, hop count, or packet loss.

Understanding BGP routing, analyzing AS paths, and monitoring performance over time provides deeper insights into how your traffic routes across the internet. While IPv6 routing has matured significantly, differences in peering relationships and infrastructure optimization mean performance can vary. Regular testing and monitoring ensure you can identify and address routing performance issues quickly.

For quick assessments, test-ipv6.run provides instant latency comparison between IPv4 and IPv6, helping identify if routing performance warrants deeper investigation. For detailed analysis, MTR remains the gold standard for diagnosing routing performance issues, combining traceroute path analysis with continuous ping statistics to reveal exactly where performance problems occur.