If you're experiencing slow internet browsing, sluggish application startup, or noticeable delays when connecting to websites, IPv6 DNS resolution issues might be the culprit. This guide will help you diagnose and fix DNS delays caused by broken or misconfigured IPv6 connectivity.
Modern operating systems are dual-stack by default, meaning they support both IPv4 and IPv6 protocols. When you visit a website, your system performs DNS lookups for both address types:
The problem arises when your system attempts to query for IPv6 addresses but something in your network configuration is broken, causing timeouts that can range from 1-10 seconds per DNS lookup.
Some DNS resolvers (including misconfigured routers, NAT devices, or ISP DNS servers) don't properly handle AAAA queries. Instead of returning a proper negative response (indicating no IPv6 record exists), they simply drop the request. Your system must then wait for the query to timeout before proceeding, causing significant delays.
This is the most common scenario: your network advertises IPv6 support, but the actual connectivity is broken. Common situations include:
Different applications handle DNS lookups differently:
getaddrinfo() may wait for all configured DNS servers to respond before returning resultsWhen DNS servers return error responses (like FORMERR) for AAAA queries, some resolvers don't cache these negative responses. This means every DNS lookup repeats the failed AAAA query instead of immediately skipping to IPv4.
Before applying fixes, you need to identify the root cause of your DNS delays.
Visit https://test-ipv6.run to get a comprehensive analysis of your IPv6 configuration. This tool will:
Pay special attention to the Dual Stack Test result. If this test fails while IPv4 works, you likely have broken IPv6 causing DNS delays.
On Linux/macOS:
time dig example.com A
time dig example.com AAAA
On Windows (PowerShell):
Measure-Command { Resolve-DnsName example.com -Type A }
Measure-Command { Resolve-DnsName example.com -Type AAAA }
If AAAA queries take significantly longer (5+ seconds), you have a DNS delay issue.
Use packet capture tools to see what's happening:
Linux/macOS:
sudo tcpdump -i any port 53
Windows: Use Wireshark or built-in packet capture
Look for:
Linux:
ip -6 route show
ip -6 neighbor show
macOS:
netstat -rn -f inet6
Windows:
netsh interface ipv6 show route
If you see IPv6 default routes but no actual IPv6 connectivity, this is your problem.
These solutions address the root cause rather than just masking the symptom.
If you have partial IPv6 configuration, the best approach is to complete it properly:
This is the future-proof solution that gives you the benefits of IPv6.
Linux - Edit /etc/resolv.conf:
# Send A and AAAA queries sequentially using different sockets
options single-request-reopen
# Reduce timeout for faster failure
options timeout:1
# Or send queries one at a time
options single-request
Note: Changes to /etc/resolv.conf may be overwritten by DHCP or NetworkManager. To make them persistent:
For systemd-resolved:
sudo mkdir -p /etc/systemd/resolved.conf.d/
sudo tee /etc/systemd/resolved.conf.d/timeout.conf << EOF
[Resolve]
DNSStubListenerExtra=127.0.0.1:53
EOF
sudo systemctl restart systemd-resolved
For NetworkManager:
sudo tee /etc/NetworkManager/conf.d/dns-timeout.conf << EOF
[connection]
ipv6.dns-options=single-request-reopen,timeout:1
EOF
sudo systemctl restart NetworkManager
macOS - Unfortunately, macOS doesn't support resolver options in the same way. Consider using a local DNS resolver like dnsmasq.
Windows - Configure DNS client settings via Registry (requires admin):
# Run in Administrator PowerShell
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name 'MaxCacheTtl' -Value 86400
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name 'MaxNegativeCacheTtl' -Value 3600
Restart-Service Dnscache
If you have broken 6to4 or Teredo tunnels:
Windows:
# Disable 6to4
netsh interface ipv6 6to4 set state disabled
# Disable Teredo
netsh interface ipv6 teredo set state disabled
# Disable [ISATAP](isatap-explained)
netsh interface ipv6 isatap set state disabled
Linux:
# Disable IPv6 privacy extensions if causing issues
sudo sysctl -w net.ipv6.conf.all.use_tempaddr=0
sudo sysctl -w net.ipv6.conf.default.use_tempaddr=0
If you can't immediately fix IPv6 but need to eliminate delays:
Linux - Edit /etc/gai.conf:
# Uncomment this line to prefer IPv4
precedence ::ffff:0:0/96 100
Windows:
# Run in Administrator PowerShell
# Set IPv4 preference higher than IPv6
New-NetIPInterface -InterfaceAlias "Ethernet" -AddressFamily IPv6 -InterfaceMetric 100
macOS: macOS doesn't provide easy IPv4 preference configuration. Consider disabling IPv6 temporarily (see next section).
Warning: Disabling IPv6 is not recommended as a long-term solution. Many modern services and applications benefit from IPv6, and it's the future of internet addressing. Only use this as a temporary measure while you work on a proper fix.
Linux (temporarily):
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
Linux (permanently) - Add to /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
Then run: sudo sysctl -p
macOS:
networksetup -setv6off Wi-Fi
networksetup -setv6off Ethernet
Windows (Control Panel method):
Windows (PowerShell method):
Disable-NetAdapterBinding -Name "*" -ComponentID ms_tcpip6
After applying fixes, validate that the issues are resolved:
Re-run the timing tests from the diagnostic section. AAAA queries should either:
# Linux/macOS
time curl -I https://www.google.com
# Windows PowerShell
Measure-Command { Invoke-WebRequest https://www.google.com }
The request should complete in under 2 seconds for a working connection.
Visit https://test-ipv6.run again and verify:
# Linux - monitor DNS resolution continuously
watch -n 5 'dig +stats example.com | grep "Query time"'
To ensure your fixes remain effective:
Use browser developer tools (F12) to check DNS timing:
Linux - Install and use dnsperf:
# Create a query file
echo "example.com A" > queries.txt
echo "example.com AAAA" >> queries.txt
# Run performance test
dnsperf -d queries.txt -s 8.8.8.8
Windows - Use built-in Performance Monitor:
By following this guide systematically, you should be able to eliminate IPv6-related DNS delays and restore snappy internet performance. Remember: fixing IPv6 properly is always better than disabling it, as IPv6 is the future of internet connectivity.
For questions or issues not covered here, test your connection at test-ipv6.run and share the results when seeking help online.