Living with IPv4: dual stack, NAT64/DNS64 and 464XLAT
Operate dual-stack networks without letting Happy Eyeballs mask IPv6 faults, test IPv6 and IPv4 reachability independently, compute DNS64/NAT64 addresses under 64:ff9b::/96, explain 464XLAT for IPv4 literals and deploy IPv6-mostly networks with DHCPv4 Option 108.
Contentsand lesson path
On this page
- Why it matters
- Dual stack, Happy Eyeballs and testing each family separately
- NAT64/DNS64, 464XLAT and IPv6-mostly networks (Option 108)
- Check your understanding
- Apply it
- Review prompt
Lessons of IPv6 Addressing & Operation
- IPv6 addresses without fear: notation, scopes and types Concept · 20 min
- Neighbor Discovery replaces ARP: NS/NA, RS/RA and duplicate address detection Concept · 20 min
- Lab: SLAAC and DHCPv6 side by side, watched in Wireshark Lab · 30 min
- Worked example: a /48 site plan and the ICMPv6 you must allow Worked example · 25 min
- Living with IPv4: dual stack, NAT64/DNS64 and 464XLAT Concept · 15 min
- Check: IPv6 addressing and troubleshooting scenarios Knowledge check · 8 questions
What you will learn
- Explain transition mechanisms (NAT64/DNS64, 464XLAT) at an overview level and test IPv6-only and dual-stack reachability.
01. Why it matters
Suppose an enterprise enables IPv6 across its campus VLANs alongside IPv4. Nobody files a single ticket for months—until a synthetic probe runs curl -6 https://api.example.net and reveals IPv6 routing at the edge has been broken since day one. Elsewhere, a mobile operator or modern office wants to retire scarce RFC 1918 IPv4 pools from endpoint VLANs while legacy IPv4-only apps and older office printers must still keep working.
Coexisting with IPv4 relies on two distinct operational models: dual stack (where client connection-racing timers can mask silent outages) and IPv6-only or IPv6-mostly translation (NAT64/DNS64, 464XLAT, and DHCPv4 Option 108). Understanding both prevents hidden IPv6 black holes and explains how an IPv6-only host reaches the IPv4 Internet.
02. Dual stack, Happy Eyeballs and testing each family separately
Running dual stack—providing both IPv4 and IPv6 addresses, routes, and DNS (A and AAAA) records—lets endpoints speak natively to both worlds without translation. On healthy dual-stack systems, RFC 6724 default address selection evaluates a policy table and ranks Global Unicast IPv6 (::/0, precedence 40, label 1) above IPv4 (::ffff:0:0/96, precedence 35, label 4), so traffic shifts organically onto IPv6. However, if a host holds only a ULA (fc00::/7, label 13, precedence 3) plus IPv4, RFC 6724 Rule 5 ("Prefer matching label") compares source and destination labels before Rule 6 checks destination precedence: the ULA source (label 13) does not match a global IPv6 destination (label 1), whereas the host's IPv4 source and destination both share label 4, so the host falls back to IPv4 for public dual-stack destinations (while precedence 3 also ranks ULA destinations below GUA 40 and IPv4 35).
Why did our synthetic probe catch a broken IPv6 path that browser users missed? Because modern browsers and HTTP libraries implement Happy Eyeballs v2 (RFC 8305). After resolving AAAA and A, the client tries IPv6 first, waits a short Connection Attempt Delay (recommended default 250 ms), and starts an IPv4 connection in parallel—keeping whichever completes its handshake first. If IPv6 packets fall into a black hole, users see only a brief quarter-second delay before IPv4 completes the page load, while an organisation can leave broken IPv6 undetected for months unless monitoring probes each family directly.
Therefore, never validate dual-stack health with a browser or plain curl https://...—always pin each address family separately:
curl -6 -I https://api.example.netvscurl -4 -I https://api.example.net(verifying TCP, TLS, and HTTP over both families).ping -6 2001:db8:10::1vsping -4 198.51.100.1(checking basic Layer 3 reachability per family).traceroute -6vstraceroute -4(locating the exact hop where IPv6 diverges or stalls).
When not to stay dual stack everywhere: Keeping two routing tables, two ACL sets, DHCPv4 pools, and CGNAT doubles operational surface and leaves IPv4 exhaustion unsolved. Once internal VLANs or mobile cores outgrow RFC 1918 space, operators shift clients to IPv6-only or IPv6-mostly and translate at the boundary. Note also that older automatic tunnelling schemes are legacy: 6to4 anycast (192.88.99.1) was deprecated by RFC 7526 and Teredo is discouraged in modern networks.
03. NAT64/DNS64, 464XLAT and IPv6-mostly networks (Option 108)
On an IPv6-only endpoint with no IPv4 address configured, three mechanisms handle legacy IPv4 targets and gradual VLAN migration:
- Domain names (
DNS64+NAT64): When an IPv6-only host querieslegacy.exampleand receives only anArecord (198.51.100.10, noAAAA), a DNS64 resolver (RFC 6147) synthesises anAAAArecord by embedding the 32-bit IPv4 address inside the well-known NAT64 prefix64:ff9b::/96(RFC 6052):198.51.100.10(0xc6.0x33.0x64.0x0a) becomes64:ff9b::c633:640a. The host sends IPv6 packets to64:ff9b::c633:640a, and a stateful NAT64 gateway (RFC 6146) translates headers into IPv4 toward the server. Ifdual.examplealready has a realAAAArecord, DNS64 returns that realAAAAunchanged so traffic flows natively over IPv6 without hitting NAT64. - Hard-coded IPv4 literals (
464XLAT, RFC 6877): If an older app or VPN client connects straight to198.51.100.10without querying DNS, DNS64 never sees the request. 464XLAT places a stateless CLAT (Customer-side translator) on the phone or CPE router—giving local apps a local IPv4 interface (192.0.0.0/29) and performing 1:1 statelessIPv4 -> IPv6header translation across the IPv6-only access network without keeping per-flow NAT state—paired with a stateful PLAT (Provider NAT64) at the edge to translate back (IPv6 -> IPv4) toward the server. - Gradual migration with IPv6-mostly (RFC 8925 DHCPv4 Option 108): Rather than breaking legacy IPv4-only printers or IoT sensors by shutting off DHCPv4 overnight, an access VLAN can advertise DHCPv4 Option 108 (
IPv6-Only Preferred) with a minimum hold-off timer (V6ONLY_WAIT). Modern laptops and phones equipped with a CLAT request Option 108 inDHCPDISCOVER, skip or release their IPv4 lease when Option 108 returns, and operate IPv6-only via NAT64/DNS64 + 464XLAT—while legacy IPv4-only devices ignore Option 108 and keep a regular IPv4 lease on the same VLAN.
Testing reachability from an IPv6-only host: Confirm DNS64 synthesis, NAT64 prefix discovery, and NAT64 forwarding separately so you can isolate resolver vs gateway failures:
dig AAAA legacy.example: Success returns a synthesised64:ff9b::...AAAArecord;NOERRORwith zero answers means DNS64 synthesis is not active.dig AAAA ipv4only.arpa: Discovers the network's NAT64 prefix (64:ff9b::/96or a custom prefix) via RFC 7050 when not supplied in an RAPREF64option (RFC 8781);NXDOMAINor an empty answer indicates prefix discovery is missing.ping -6 64:ff9b::198.51.100.10(orcurl -6): Tests the NAT64 forwarding path directly without DNS; replies confirm translation works, whereas timeouts isolate a NAT64 gateway or routing failure.
Do not confuse 64:ff9b::c633:640a with ::ffff:198.51.100.10: An IPv4-mapped IPv6 address (::ffff:0:0/96) is strictly a local host notation for dual-stack socket APIs (such as [::] accepting IPv4 connections) and must never be routed on the wire.
Verify the 64:ff9b::/96 bit embedding in Python:
import ipaddress
v4 = ipaddress.IPv4Address("198.51.100.10")
nat64 = ipaddress.IPv6Address(int(ipaddress.IPv6Address("64:ff9b::")) | int(v4))
print("DNS64 64:ff9b::/96 for 198.51.100.10 ->", nat64)DNS64 64:ff9b::/96 for 198.51.100.10 -> 64:ff9b::c633:640aDNS64+NAT64: [IPv6-only Host] -(64:ff9b::c633:640a)-> [NAT64] --IPv4--> [Server]
464XLAT : [App->IPv4 lit] -> [CLAT 4->6] ==IPv6==> [PLAT/NAT64 6->4] -> [Server]04. Check your understanding
05. Apply it
Run curl -6 -I https://example.com and curl -4 -I https://example.com from a dual-stack terminal (or inspect ip -6 route and ip -4 route inside a lab) to verify both address families independently. Next, convert 203.0.113.44 into its 64:ff9b::/96 NAT64 address by hand (64:ff9b::cb00:712c) and verify it in Python.
Next, connect your IPv6 addressing, VLANs, and routing skills in DNS (for AAAA and DNS64 synthesis), DHCP & NAT, or IP Routing Fundamentals.
06. Review prompt
Explain why Happy Eyeballs masks broken IPv6 paths and why RFC 6724 keeps ULA + IPv4 hosts on IPv4, trace how DNS64/NAT64 and 464XLAT handle names versus IPv4 literals, and describe how DHCPv4 Option 108 enables IPv6-mostly VLANs.
References
- RFC 8305: Happy Eyeballs Version 2
- RFC 6724: Default Address Selection for IPv6
- RFC 6052: IPv6 Addressing of IPv4/IPv6 Translators
- RFC 6146: Stateful NAT64
- RFC 6147: DNS64: DNS Extensions for Network Address Translation
- RFC 6877: 464XLAT: Combination of Stateful and Stateless Translation
- RFC 8925: IPv6-Only Preferred Option for DHCPv4
- RFC 7050: Discovery of the IPv6 Prefix Used for IPv6 Address Synthesis
- RFC 8781: Discovering PREF64 in Router Advertisements
- RFC 7526: Deprecating the Anycast Prefix for 6to4 Relay Routers
Your progress
Reading state
Sign in to save that you finished reading this lesson.
Prove this skill
8 questions · about 6 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.