跳到主要内容

IPv6 Pitfalls and Happy Eyeballs

IPv4 versus IPv6

Internet Protocol has 2 versions to date:

VersionIntroduction
IPv4January 1980
IPv6December 1995

IPv6 was developed to deal with the long-anticipated problem of IPv4 address exhaustion, and was intended to replace IPv4. But as of July 2026, the transition is still far from completion.

Which one am I using?

Windows uses a prefix table to determine which address to use when multiple addresses are available for a Domain Name System (DNS) name.

Open CMD or PowerShell, use this command to view prefix policies:

netsh interface ipv6 show prefixpolicies

prefix policies

Explanation for Prefixes
PrefixPrecedenceLabelUsage
::1/128500Localhost
::/0401Default unicast
::ffff:0:0/96354IPv4-mapped IPv6 address
2002::/163026to4
2001::/3255Teredo tunneling
fc00::/7313Unique local address
::/9613IPv4-compatible addresses (deprecated)
fec0::/10111Site-local address (deprecated)
3ffe::/161126bone (returned)

Source: Wikipedia

To prefer IPv6 over IPv4, the ::/0 prefix should have a higher precedence than the ::ffff:0:0/96 prefix, and vice versa.

To confirm preference of IPv6 over IPv4, perform the following commands:

  1. Open the CMD or PowerShell.
  2. Use the ping command to check the preferred IP version. For example, ping example.com.
  3. If IPv6 is preferred, you should see an IPv6 address being returned in the response.

ping result

提示

By default, Windows favors IPv6 global unicast addresses over IPv4 addresses. You can use registry key to configure it.

IPv6 Pitfalls

As IPv6 is the future, we should prioritize using it. Unfortunately, sometimes it will let us down, for things like IPv6 brokenness, that many IPv6 networks are unreachable from parts of the Internet, and applications that try to reach those networks appear unresponsive.

For example, we ping the same domain example.com using IPv6 and IPv4 respectively:

ping using IPv6

ping using IPv4

IPv6 keeps getting timeout, while IPv4 is good. What a bummer. So we are stuck with the old boring IPv4? Not necessarily, here comes Happy Eyeballs to the rescue.

What is "Happy Eyeballs"?

Happy Eyeballs (also called Fast Fallback) is an algorithm published by the IETF that makes dual-stack applications (those that understand both IPv4 and IPv6) more responsive to users by attempting to connect using both IPv4 and IPv6 at the same time (preferring IPv6), thus minimizing IPv6 brokenness and DNS whitelisting experienced by users that have imperfect IPv6 connections or setups. The name "happy eyeballs" derives from the term "eyeball" to describe endpoints which represent human Internet end-users, as opposed to servers.

Implementations of Happy Eyeballs exist in major browsers like Chrome, Firefox, and tools like curl.

It has 3 versions to date:

VersionIntroduction
Version 1 (RFC 6555)April 2012
Version 2 (RFC 8305)December 2017
Version 3In draft

References