Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Lesson 5 of 6 · Concept · 15 min · revision 1

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

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.net vs curl -4 -I https://api.example.net (verifying TCP, TLS, and HTTP over both families).
  • ping -6 2001:db8:10::1 vs ping -4 198.51.100.1 (checking basic Layer 3 reachability per family).
  • traceroute -6 vs traceroute -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:

  1. Domain names (DNS64 + NAT64): When an IPv6-only host queries legacy.example and receives only an A record (198.51.100.10, no AAAA), a DNS64 resolver (RFC 6147) synthesises an AAAA record by embedding the 32-bit IPv4 address inside the well-known NAT64 prefix 64:ff9b::/96 (RFC 6052): 198.51.100.10 (0xc6.0x33.0x64.0x0a) becomes 64:ff9b::c633:640a. The host sends IPv6 packets to 64:ff9b::c633:640a, and a stateful NAT64 gateway (RFC 6146) translates headers into IPv4 toward the server. If dual.example already has a real AAAA record, DNS64 returns that real AAAA unchanged so traffic flows natively over IPv6 without hitting NAT64.
  2. Hard-coded IPv4 literals (464XLAT, RFC 6877): If an older app or VPN client connects straight to 198.51.100.10 without 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 stateless IPv4 -> IPv6 header 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.
  3. 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 in DHCPDISCOVER, 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 synthesised 64:ff9b::... AAAA record; NOERROR with zero answers means DNS64 synthesis is not active.
  • dig AAAA ipv4only.arpa: Discovers the network's NAT64 prefix (64:ff9b::/96 or a custom prefix) via RFC 7050 when not supplied in an RA PREF64 option (RFC 8781); NXDOMAIN or an empty answer indicates prefix discovery is missing.
  • ping -6 64:ff9b::198.51.100.10 (or curl -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:

Python · Synthesising a DNS64 address in 64:ff9b::/96
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)
Expected output
DNS64 64:ff9b::/96 for 198.51.100.10 -> 64:ff9b::c633:640a
Text · DNS64/NAT64 vs 464XLAT packet path (architectural overview; not run in container)
DNS64+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

Practice check · 3 questions

Address selection, DNS64 with DNSSEC and IPv6-mostly Option 108

Apply RFC 6724 label selection, DNS64/DNSSEC constraints and DHCPv4 Option 108 migration behaviour.

Q1. An internal office VLAN deploys only IPv6 ULA (`fd00::/8`) alongside private IPv4 (`10.0.0.0/8` behind NAT44) and expects clients to reach dual-stack SaaS sites over IPv6. Why do workstations consistently choose IPv4 instead?
Q2. An IPv6-only client runs a local DNSSEC-validating stub resolver behind a DNS64 server, and lookups for signed IPv4-only domains fail validation even though non-validating hosts reach them. Why?
Q3. On a campus migrating toward IPv6-only access VLANs, enabling DHCPv4 Option 108 (`IPv6-Only Preferred`) lets laptops with a 464XLAT CLAT drop IPv4 while older network printers still work on the same VLAN. How?
Practice only: not graded, not saved, not evidence.

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

Your progress

Reading state

Sign in to save that you finished reading this lesson.

Sign in to mark reading complete

Prove this skill

8 questions · about 6 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.
Take the skill check