Skip to content
Network compatibility

Dual stack: how clients choose between IPv4 and IPv6

A dual-stack host is reachable over IPv4 and IPv6. A client may receive several A and AAAA answers, sort them, and schedule attempts so a broken path does not create a long user-visible delay. The modern strategy is described by the Happy Eyeballs algorithm.

2 min readReviewed and updated: August 6, 2026

Key points in one minute

  • A records contain IPv4 while AAAA records contain IPv6.
  • A client may stagger attempts across address families.
  • The first successful connection determines the path actually used.
  • A DNS record alone does not prove route availability.

Concurrent name resolution

Happy Eyeballs recommends starting AAAA and A queries close together instead of waiting indefinitely for one family. Results are sorted under the client's policy. This reduces visible delays on partially broken networks.

Racing connections without a burst

Attempts are scheduled rather than launched indiscriminately. Once one connection succeeds, the others are canceled. This retains an IPv6 preference while allowing IPv4 to succeed when the IPv6 path is unavailable or significantly slower.

Address families on a proxy path

The proxy endpoint family and destination family are separate. A client can reach a proxy over IPv4 while the proxy reaches a site over IPv6, when protocol and routing support it. Logs should capture both hops.

Dual-stack diagnostics

Record the A and AAAA set, then run forced IPv4 and IPv6 tests against your own service. Measure resolution, connection, and TLS separately. Finally test automatic selection to observe the client's real behavior.

Practical checklist

  1. 1Retrieve current A and AAAA records.
  2. 2Test each address family explicitly.
  3. 3Record proxy and destination families separately.
  4. 4Compare DNS, connect, and TLS timing.
  5. 5Test automatic selection after isolated checks.

Sources and documentation

This material is based on primary, official, and technical sources. The article is an original summary written for this knowledge base.

  1. 1.RFC Editor / IETF: Happy Eyeballs Version 2
  2. 2.RFC Editor / IETF: Internet Protocol, Version 6 Specification
  3. 3.curl project: CURLOPT_RESOLVE

Continue reading

More articles on related topics

Step-by-step diagnostics

Proxy connection failed: diagnose the exact connection stage

Read

DNS and SOCKS5

DNS over SOCKS5: where the domain name is resolved

Read

Operations

DNS cache and TTL: why a new address is not immediate

Read