Windows 10 is not using my IPv6 address by default
I have IPv6 addresses from sixxs.net but if I ping a host that has both IPv4 and IPv6 addresses (i.e. www.google.com or www.facebook.com) I get the IPv4 address on windows 10 but on all the windows 7 and windows 8.1 machines in the same network get the IPv6 address. I have to use -6 to force it to ping the IPv6.
I have tried the shortcuts mentioned here https://support.microsoft.com/en-us/kb/929852 to prefer IPv6 over IPv4 but it does not fix the issue. When I go to web sites that are IPv4 and IPv6 I always get the IPv4 page.
test-ipv6.com is telling me that my browser has a real working IPv6 address but is avoiding using it. http://test-ipv6.com/faq_avoids_ipv6.html
h:\>ping www.facebook.com Pinging star.c10r.facebook.com [31.13.66.1] with 32 bytes of data: Reply from 31.13.66.1: bytes=32 time=8ms TTL=87 h:\>ping -6 www.facebook.com Pinging star.c10r.facebook.com [2a03:2880:f013:1:face:b00c:0:1] with 32 bytes of data: Reply from 2a03:2880:f013:1:face:b00c:0:1: time=145ms
netsh interface ipv6 show prefixpolicies Querying active state... Precedence Label Prefix ---------- ----- -------------------------------- 50 0 ::1/128 40 1 ::/0 35 4 ::ffff:0:0/96 30 2 2002::/16 5 5 2001::/32 3 13 fc00::/7 1 11 fec0::/10 1 12 3ffe::/16 1 3 ::/96
UPDATE
Thought there was an issue with my router. When I upgraded from Shibby Tomato v131 to v132 it seemed to fix the issue but now it's back again. It still works with Windows 7 and 8.1 but not Windows 10. I use fixed wireless so there is some latency in my internet connection already. When I use the IPv6 tunnel it sometimes adds significant latency (59-100ms). I think there is a feature of windows 10 that will favor IPv4 if IPv6 is significantly slower but I don't know what the limits are.
2nd Update
If I disable IPv4 then IPv6 works properly. If I ping a hostname that has both IPv4 and IPv6 it will ping the IPv6 address.
>ping facebook.com Pinging facebook.com [2a03:2880:2130:7f20:face:b00c:0:25de] with 32 bytes of da a: Reply from 2a03:2880:2130:7f20:face:b00c:0:25de: time=161ms Reply from 2a03:2880:2130:7f20:face:b00c:0:25de: time=317ms Reply from 2a03:2880:2130:7f20:face:b00c:0:25de: time=215ms Reply from 2a03:2880:2130:7f20:face:b00c:0:25de: time=154ms Ping statistics for 2a03:2880:2130:7f20:face:b00c:0:25de: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 154ms, Maximum = 317ms, Average = 211ms
I had the same niggling issue -- ipv4 and ipv6 both work, but if I try to ping (or browse etc.) any name with an IPv4 A record, Windows would always prefer that over the v6 (AAAA) address. There is logic inside the network stack that sorts the addresses from a DNS query to choose which to prefer. In my case, it was preferring the v4 addresses because my Wifi interface supports wake-on-LAN aka always-on-always-connected (AOAC), but apparently only for IPv4.
There's an ETW trace point you can enable to find out exactly what is happening when it sorts the addresses; here's an example of how to do that using the built-in netsh tool. I'm using www.google.com as an example, but any host with both A and AAAA records should work.
netsh trace start provider=Microsoft-Windows-TCPIP level=5 keywords=ut:TcpipRoute
ping -n 1 www.google.com
netsh trace stop
netsh trace convert %TEMP%\NetTraces\NetTrace.etl
Now, look in the nettrace.txt
file that it wrote, and hopefully you'll find a clue. In my case, it was:
[Microsoft-Windows-TCPIP]IP: Address pair (::ffff:192.168.1.100, ::ffff:74.125.28.99) is preferred over (2601:XXX:XXX:XXX:XXX:XXX:XXX:XXX, 2607:f8b0:400e:c04::67) by SortOptions: 0, Reason: Prefer Aoac Interface (Rule D 1.1).
(where XXX is my public IPv6 address that I've redacted).
I don't know if there is any way to override this specific rule (now I know why it's making that choice, I'm comfortable enough leaving it as-is).