IPv4IPv6IPv6IPv446
Envelope seal: indigo travels on IPv6, orange on IPv4Laptop chips: the IPv4 stack (4) and the IPv6 stack (6)Lanes: IPv4 at the back, IPv6 at the frontCrack and red ×: the broken IPv6 link Happy Eyeballs works aroundThe laptop runs IPv4 (192.168.1.10) and IPv6 (2001:db8:1::10) side by side. DNS returns an AAAA and an A record for www.example.com; Happy Eyeballs tries IPv6 first, starts IPv4 after 250 ms and keeps whichever connects first. On an IPv6-only network, DNS64 builds 2001:db8:64::c633:6414 from 198.51.100.20 and the NAT64 gateway translates to IPv4 from 192.0.2.64. Addresses are documentation values: IPv6 from 2001:db8::/32 (RFC 3849), IPv4 from RFC 5737, the home LAN from RFC 1918. Times and port numbers are illustrative.

Dual stack

  1. A stack is the software that sends one kind of packet. Your laptop runs two: IPv4 with 192.168.1.10 and IPv6 with 2001:db8:1::10. Running both at once is called dual stack, and most networks work this way.

Happy Eyeballs

IPv6-only: NAT64 + DNS64

The packets, field by field

;; step 1/11 · two-stacks · stack
;; at your laptop
laptop, both stacks up:
  IPv4  192.168.1.10/24     (home LAN, RFC 1918)
  IPv6  2001:db8:1::10/64   (global, 2001:db8:1::/64)
IPv4 addresses are 32 bits, IPv6 addresses 128 bits (RFC 8200)
each stack has its own address, routes and default gateway

Happy Eyeballs (RFC 8305) recommends a 250 ms Connection Attempt Delay and a 50 ms Resolution Delay; browsers and operating systems tune these. The NAT64 prefix 2001:db8:64::/96 is a network-specific prefix (RFC 6052). Many real networks use the well-known prefix 64:ff9b::/96, which must not carry documentation addresses like 198.51.100.20. Tunnels are the other transition tool: 6in4 (RFC 4213) wraps a whole IPv6 packet inside IPv4, protocol number 41, to cross an IPv4-only network. A tunnel carries the packet unchanged; NAT64 translates it.