sodcalculator

10 Tech How-To

Troubleshoot Slow IPv6 Connections on Linux

Guide 10-55511 · Updated · Step by step

This guide helps you diagnose and fix slow IPv6 connections on Linux systems. It covers checking your IPv6 configuration, testing throughput, identifying common bottlenecks like MTU issues or DNS problems, and applying practical fixes. You’ll need a Linux machine with IPv6 enabled and sudo access for some commands.

What You’ll Need

  • A Linux system with IPv6 configured (most modern distros have it enabled by default).
  • Root or sudo privileges to run diagnostic and configuration commands.
  • Basic familiarity with the terminal.

Step-by-Step

  1. Verify IPv6 is actually in use. Run ip -6 addr show to see if your interface has an IPv6 address. If you only see tentative or no address, IPv6 may not be properly configured. Also check ip -6 route show to confirm a default route exists.
  2. Test raw IPv6 connectivity. Ping a well-known IPv6 host like ping6 -c 5 2606:4700:4700::1111 (Cloudflare DNS). If you see high latency or packet loss, the problem is at the network level, not your system. If ping fails entirely, check your router/firewall and ISP IPv6 support.
  3. Compare IPv4 vs IPv6 throughput. Use a speed test that supports both protocols, or use iperf3 if you have a server. For a quick browser-based test, visit a site like speedtest.net which shows both. If IPv6 is significantly slower, focus on MTU or routing issues.
  4. Check MTU size. A common cause of slow IPv6 is a too-large MTU causing fragmentation. Run ping6 -M do -s 1452 -c 3 2606:4700:4700::1111 to test if the packet is accepted. If it fails, lower the MTU on your interface: sudo ip link set dev eth0 mtu 1400 (replace eth0 with your interface). Test again with ping6 -M do -s 1372 -c 3 to confirm.
  5. Check for IPv6 DNS issues. Slow DNS can make connections feel slow. Test with dig AAAA google.com and time it. If it’s slow, try switching to a fast DNS resolver like Google’s 2001:4860:4860::8888 or Cloudflare’s 2606:4700:4700::1111 by editing /etc/resolv.conf (or using NetworkManager).
  6. Inspect for IPv6 privacy extensions issues. Some systems change addresses frequently, which can cause connection resets. Check with ip -6 addr show for a temporary address. If you see frequent changes, disable privacy extensions by adding net.ipv6.conf.all.use_tempaddr=0 to /etc/sysctl.conf and reload with sudo sysctl -p.
  7. Examine firewall rules. A misconfigured firewall can slow or drop IPv6 packets. Check with sudo ip6tables -L -n -v (if using iptables) or sudo nft list ruleset (for nftables). Look for rules that might be rate-limiting or dropping packets. Temporarily disable the firewall to test: sudo systemctl stop firewalld (if using firewalld) or sudo ufw disable (if using UFW).
  8. Check for IPv6 transition mechanisms. If you have a tunnel like 6to4 or Teredo, it can be slow. Check with ip -6 addr show for addresses starting with 2002: (6to4) or 2001: (Teredo). If present, disable them: sudo sysctl -w net.ipv6.conf.all.accept_ra=0 and sudo sysctl -w net.ipv6.conf.all.autoconf=0, then reboot.
  9. Test with a different IPv6 server. Sometimes the remote server is the bottleneck. Try accessing different IPv6-enabled sites to see if the slowness is universal or specific to one destination.

Common Mistakes

  • Assuming IPv6 is the problem. Often the slowness is due to the remote server or your ISP’s IPv6 routing, not your local machine. Always compare with IPv4 performance.
  • Changing MTU without testing. Setting MTU too low can reduce performance for all traffic. Use the ping test to find the correct value.
  • Forgetting to check DNS. IPv6 DNS lookups can be slower if your resolver is not configured properly. A slow DNS response makes every connection feel sluggish.
  • Overlooking firewall rules. Some firewalls treat IPv6 differently, and rules that are too strict can cause packet drops or delays.

Tips

  • Use ip -s link to see packet statistics. Look for dropped or errored packets, which can indicate MTU or hardware issues.
  • If you’re on a home network, reboot your router. Many routers have buggy IPv6 implementations that improve after a restart.
  • For persistent issues, try disabling IPv6 temporarily to see if the problem is truly IPv6-specific: sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1. Re-enable with =0.
  • Use traceroute6 to see where packets are delayed. This can pinpoint a problematic router in the path.

Troubleshooting

If the steps above don’t resolve the issue, try the following:

  • Check system logs. Look at dmesg and journalctl -xe for IPv6-related errors or warnings.
  • Test with a different network. If possible, connect to a different network (e.g., mobile hotspot) to see if the problem follows your machine or is network-specific.
  • Update your kernel and network drivers. Outdated software can have bugs that affect IPv6 performance.
  • Reconfigure IPv6 from scratch. Use sudo dhclient -6 (if using DHCPv6) or sudo systemctl restart network (on systemd-based systems) to renew your IPv6 configuration.
  • Check for hardware offloading issues. Some network cards have bugs with IPv6 checksum offloading. Try disabling it with sudo ethtool -K eth0 tx off (replace eth0 with your interface).

Frequently Asked Questions

Why is my IPv6 slower than IPv4?

Possible reasons include ISP routing problems, MTU issues, or DNS misconfiguration. Compare the two protocols and run the ping and traceroute tests to isolate the cause.

How do I know if my ISP supports IPv6 properly?

Visit a site like test-ipv6.com to check. If your ISP doesn’t provide a native IPv6 address, you might be using a tunnel, which can be slower.

What is the best MTU for IPv6?

The standard is 1280 bytes (minimum), but the optimal is usually 1500 for Ethernet. Use the ping test with the -M do flag to find the largest size that works without fragmentation.

Can I just disable IPv6 to fix the slowness?

Yes, but it’s not recommended as a permanent solution. Disabling IPv6 can break some modern services. Use it only as a temporary diagnostic step.

Why does my IPv6 address keep changing?

This is due to privacy extensions, which rotate addresses to protect your privacy. It’s normal, but if it causes connection issues, you can disable them as described in the steps.

How do I test IPv6 speed specifically?

Use a speed test that supports IPv6, or use iperf3 with an IPv6 server. You can also use curl -6 -o /dev/null -w '%{speed_upload}' http://speedtest.example.com to measure download speed.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →