Dual stack and transition
The internet is moving from IPv4 to IPv6, but slowly, so most devices speak both. Follow one laptop as it asks DNS for both kinds of address, races IPv6 against IPv4 with Happy Eyeballs, and then, on an IPv6-only network, reaches an IPv4-only site through DNS64 and a NAT64 gateway.
5 quick questions
Pick an answer to see why. Your score saves with your progress.
01A dual-stack laptop looks up www.example.com. Which DNS records tell it the site's IPv6 and IPv4 addresses?
An AAAA record holds a 128-bit IPv6 address (here 2001:db8:10::10); an A record holds a 32-bit IPv4 address (here 203.0.113.10).
02The IPv6 path to a site is broken but IPv4 works. What does Happy Eyeballs do?
RFC 8305 staggers the attempts instead of waiting for a timeout, so a broken IPv6 path costs a quarter of a second, not many seconds.
03On an IPv6-only network, DNS64 answers legacy.example.net (A 198.51.100.20) with 2001:db8:64::c633:6414. Where did that address come from?
The last 32 bits, c633:6414, are 198.51.100.20 written in hex (c6 33 64 14). The NAT64 gateway reads them back out to know where to send the IPv4 packet.
04What does a NAT64 gateway do with the laptop's packet?
NAT64 (RFC 6146) translates: it replaces the IPv6 header with an IPv4 header and keeps state like a home NAT, then translates the reply back to IPv6.
05How is a 6in4 tunnel different from NAT64?
6in4 (RFC 4213) puts the IPv6 packet inside IPv4 with protocol number 41; the far end unwraps it. Both ends must speak IPv6. NAT64 lets an IPv6 device talk to a device that only speaks IPv4.
Glossary
- IPv6
- Internet Protocol version 6: 128-bit addresses written in hex groups, like 2001:db8:1::10. It exists because IPv4's 32-bit addresses ran out.
- Dual stack
- Running IPv4 and IPv6 side by side on the same device or network, each with its own addresses and routes.
- AAAA record
- The DNS record that holds an IPv6 address. The A record holds an IPv4 address.
- Happy Eyeballs
- A rule (RFC 8305) for connecting to a dual-stack site: try IPv6 first, start IPv4 shortly after if IPv6 is slow, keep whichever connects first.
- IPv6-only network
- A network that gives devices only IPv6 addresses. Many mobile networks work this way.
- DNS64
- A resolver feature (RFC 6147) that builds an AAAA record from an A record by putting the IPv4 address inside a NAT64 prefix.
- NAT64
- A gateway (RFC 6146) that translates IPv6 packets into IPv4 packets and back, so IPv6-only devices can reach IPv4-only sites.
- Tunnel
- Carrying a packet of one protocol inside another, for example IPv6 inside IPv4 (6in4), to cross a network that only speaks the outer one.
Notes and sources
- 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.
- 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.
- Happy Eyeballs (RFC 8305) recommends a 250 ms Connection Attempt Delay and a 50 ms Resolution Delay; browsers and operating systems tune these.
- 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.
- 464XLAT (RFC 6877) adds a small translator on the phone itself, so apps that only know IPv4 still work on an IPv6-only mobile network.
Quiz Unlocks after the last step.