Loading content...
All the transition mechanisms we've studied so far—dual-stack, tunneling, 6to4, Teredo—share a common assumption: hosts have IPv4 connectivity that can be leveraged to reach IPv6 destinations. But what about the inverse scenario?
As IPv4 address exhaustion intensifies, some networks are deploying IPv6-only. Mobile carriers, in particular, find that allocating IPv4 addresses to every smartphone is unsustainable. These networks use IPv6 exclusively for their internal infrastructure.
But here's the challenge: much of the Internet's content remains IPv4-only. How can an IPv6-only smartphone access an IPv4-only website?
The answer is NAT64—a protocol translation mechanism that converts IPv6 packets to IPv4 packets and vice versa. Unlike tunneling (which encapsulates one protocol inside another), NAT64 performs actual protocol conversion, enabling true interoperability between IPv6-only clients and IPv4-only servers.
By the end of this page, you will understand NAT64's translation architecture, how DNS64 synthesizes AAAA records for IPv4-only hosts, the Well-Known Prefix (64:ff9b::/96) and operator-specific prefixes, stateful vs stateless NAT64, translation of headers and protocols, deployment patterns in mobile and enterprise networks, and the differences between NAT64 and NAT44.
NAT64 performs network address and protocol translation between IPv6 and IPv4. It translates IPv6 packets to IPv4 packets (and the reverse for responses), enabling IPv6-only clients to communicate with IPv4-only servers.
IPv6-only Client NAT64 Gateway IPv4-only Server
2001:db8::1 Translation 192.0.2.100
| | |
|--IPv6 packet------->| |
| |--IPv4 packet-------->|
| |<--IPv4 response------|
|<--IPv6 response-----| |
Unlike tunneling, the NAT64 gateway completely reconstructs packets:
To the client, the server appears to be an IPv6 host. To the server, the client appears to be an IPv4 host.
For the IPv6 client to address an IPv4 server, the IPv4 address must be represented as an IPv6 address. This is done by embedding the 32-bit IPv4 address within a 128-bit IPv6 address using a NAT64 prefix.
Well-Known Prefix (WKP):
64:ff9b::/96
To represent 192.0.2.100 (0xC000:0264):
64:ff9b::192.0.2.100 (mixed notation)
64:ff9b::c000:264 (pure hex)
When the NAT64 gateway receives traffic destined for 64:ff9b::/96, it:
64:ff9b::/96 is globally routable (via the NAT64 gateway), but operators can use their own prefixes:
Operator Prefix: 2001:db8:64::/96
IPv4 192.0.2.100 → 2001:db8:64::c000:264
Operator prefixes allow multiple NAT64 translations in different network segments, custom routing policies, and privacy (not revealing that NAT64 is in use).
| Prefix | Length | Usage | Notes |
|---|---|---|---|
| 64:ff9b::/96 | /96 | Well-Known Prefix | Standardized; globally recognizable |
| 64:ff9b:1::/48 | /48 | Well-Known for private IPv4 | RFC 8215; for RFC 1918 addresses |
| Operator /96 | /96 | Custom prefix | 32-bit IPv4 in last 32 bits |
| Operator /64 | /64 | Custom with suffix | IPv4 split across address |
A /96 prefix leaves exactly 32 bits for the IPv4 address—a perfect fit. The IPv4 address occupies the last 32 bits of the IPv6 address, making extraction trivial. Other prefix lengths require more complex embedding schemes defined in RFC 6052.
NAT64 alone isn't enough. When an IPv6-only client wants to access 'www.ipv4only.example.com', it queries DNS for an AAAA record. If the server is IPv4-only, there's no AAAA record to return—the client can't communicate.
DNS64 solves this by synthesizing AAAA records for IPv4-only hosts.
Without DNS64:
With DNS64:
DNS64's logic (per RFC 6147):
Receive AAAA query:
IF authoritative AAAA record exists:
Return real AAAA (dual-stack host, no translation needed)
ELSE:
Query for A record
IF A record exists:
Synthesize AAAA = NAT64_PREFIX + IPv4_address
Return synthesized AAAA
ELSE:
Return NXDOMAIN (host doesn't exist in either protocol)
Critical behavior: DNS64 returns real AAAA records when they exist. Translation only occurs for IPv4-only destinations. This ensures optimal paths for dual-stack servers.
Synthesized AAAA records inherit the TTL of the underlying A record, but DNS64 may impose minimums/maximums:
Typical policy: honor A record TTL, but clamp to reasonable bounds (e.g., 60s minimum, 1 hour maximum).
Synthesized AAAA records cannot be DNSSEC-signed (the DNS64 server doesn't have the authority's private key). Clients validating DNSSEC will reject synthesized records unless DNSSEC validation is disabled for synthesized responses. This is a known limitation of DNS64.
There are two modes of NAT64 operation: stateful and stateless. Stateful NAT64 is far more common, especially for providing IPv4 Internet access to IPv6-only clients.
Stateful NAT64 (RFC 6146) maintains a mapping table between IPv6 client sessions and IPv4 addresses, similar to traditional NAT44.
Outbound Flow (IPv6 → IPv4):
Inbound Flow (IPv4 → IPv6):
| IPv6 Source | IPv6 Port | IPv4 Source | IPv4 Port | IPv4 Dest | Protocol |
|---|---|---|---|---|---|
| 2001:db8::1 | 45000 | 203.0.113.50 | 40000 | 192.0.2.100 | TCP |
| 2001:db8::2 | 52000 | 203.0.113.50 | 40001 | 192.0.2.100 | TCP |
| 2001:db8::1 | 37000 | 203.0.113.50 | 40002 | 198.51.100.1 | UDP |
Stateful NAT64 requires a pool of IPv4 addresses to assign to translated sessions. Just like NAT44:
Example Configuration Concept:
nat64 v4 pool ipv4-pool 203.0.113.0/24
nat64 prefix 64:ff9b::/96
nat64 enable
This provides 256 IPv4 addresses, potentially supporting 256 × 64,000 ≈ 16 million+ concurrent sessions.
Mobile carriers deploying NAT64 need carrier-grade implementations: support for millions of simultaneous sessions, logging requirements for legal compliance, high availability, and integration with policy systems. These are not simple firewall NAT features.
Stateless NAT64, also called SIIT (Stateless IP/ICMP Translation), performs address translation without maintaining per-session state. This enables bidirectional communication initiation and scales better.
Instead of dynamic port mapping, stateless NAT64 uses algorithmic address translation:
Example Addressing:
IPv6 network: 2001:db8::/96
IPv4 network: 192.0.2.0/24
Mapping rule: 2001:db8::x ↔ 192.0.2.x
Host A IPv6: 2001:db8::100 ↔ 192.0.2.100
Host B IPv6: 2001:db8::101 ↔ 192.0.2.101
Stateless translation directly converts headers:
IPv6 → IPv4:
IPv4 → IPv6:
ICMP Translation: ICMP types differ between v4 and v6. SIIT translates:
| Feature | Stateful NAT64 | Stateless NAT64 (SIIT) |
|---|---|---|
| Session state | Required | Not required |
| Direction | IPv6-initiated only | Bidirectional |
| Scalability | Limited by state table | Unlimited (no state) |
| Address usage | Many-to-few (NAT) | One-to-one mapping |
| IPv4 requirement | Pool of IPv4 addresses | IPv4 per host |
| Use case | General Internet access | Datacenter/enterprise translation |
Stateless NAT64 is ideal when you have enough IPv4 addresses for 1:1 mapping and need bidirectional initiation. Typical scenarios: datacenter servers reachable via both protocols, or transitioning enterprise networks where external IPv4 addresses are available for key servers.
NAT64 + DNS64 works well for most applications, but some applications don't use DNS—they use literal IPv4 addresses embedded in application protocols, configuration files, or code. These break on IPv6-only networks.
464XLAT (RFC 6877) solves this by adding client-side translation.
'464' refers to the address translation sequence:
CLAT (Customer-side Translator):
PLAT (Provider-side Translator):
The CLAT creates a virtual IPv4 interface on the device:
Address assignment:
Translation:
Example flow:
App sends: src=192.0.0.2 dst=93.184.216.34
CLAT translates: src=2001:db8::1 dst=64:ff9b::5db8:d822
PLAT translates: src=203.0.113.50 dst=93.184.216.34
Server sees standard IPv4
464XLAT has been adopted extensively by mobile carriers:
For users, this is transparent—they simply 'have IPv4 connectivity' even though the carrier network is IPv6-only.
464XLAT provides 100% IPv4 application compatibility on IPv6-only networks. Combined with NAT64/DNS64, it means carriers can deploy IPv6-only and still guarantee all applications work. This has driven the fastest IPv6 adoption: mobile networks.
Protocol translation is inherently complex. IPv4 and IPv6, while similar, have differences that create translation challenges.
Fragment Handling:
Header Length:
Checksums:
Some application protocols embed IP addresses in their payload:
FTP: The PORT/PASV commands include IPv4 addresses in ASCII. NAT64 ALG must:
SIP: Session Initiation Protocol uses IP addresses in SDP bodies:
c=IN IP4 192.0.2.100
NAT64 ALG rewrites during translation.
Reality: ALGs are complex and often break. The trend is toward ALG-independent protocols (like ICE for media negotiation) that don't embed addresses.
IPv6 hosts are expected to perform Path MTU Discovery; routers don't fragment. But NAT64 must handle fragmented IPv4 responses:
This reassembly requirement creates state (buffering fragments) even in 'stateless' modes.
Application Layer Gateways are the weakest point of any NAT, including NAT64. They're difficult to implement correctly, create security vulnerabilities, and can't keep up with new protocols. The ideal solution is applications that don't need ALGs—which increasingly is the case with modern protocols.
NAT64 deployment varies significantly based on network type and requirements.
Typical Architecture:
Why IPv6-only for mobile?
Major deployments:
| Scenario | DNS64 | NAT64 Type | 464XLAT | Notes |
|---|---|---|---|---|
| Mobile carrier | Carrier DNS | Stateful (PLAT) | Yes (CLAT on device) | Primary IPv6 adoption driver |
| Enterprise internal | Internal DNS | Stateful or Stateless | Optional | For IPv4 legacy access |
| Datacenter servers | Not required | Stateless (SIIT) | No | Servers have IPv4 addresses |
| Home network | ISP DNS | Stateful | Router (CLAT) | Emerging in fiber deployments |
When to deploy NAT64:
Implementation options:
Integration requirements:
To test NAT64/DNS64, try accessing ipv4only.arpa (a special test domain that only has A records). On a properly configured IPv6-only network with DNS64, you should be able to reach it—proof that DNS64 is synthesizing and NAT64 is translating.
NAT64 occupies a unique position among transition mechanisms—it's the only one designed for IPv6-only networks accessing IPv4 content.
| Mechanism | Client Protocol | Server Protocol | Method | Use Case |
|---|---|---|---|---|
| Dual-Stack | IPv4 + IPv6 | IPv4 or IPv6 | Native both | General transition |
| 6in4 Tunnel | IPv6 | IPv6 | Encapsulation | IPv6 over IPv4 infrastructure |
| 6to4 | IPv6 | IPv6 | Auto tunnel | Deprecated |
| Teredo | IPv6 | IPv6 | UDP tunnel | NAT traversal (legacy) |
| NAT64 | IPv6 | IPv4 | Translation | IPv6-only accessing IPv4 |
NAT64 and traditional IPv4 NAT (NAT44) share similarities but have key differences:
Similarities:
Differences:
| Aspect | NAT44 | NAT64 |
|---|---|---|
| Translation | IPv4 ↔ IPv4 | IPv6 ↔ IPv4 |
| Header modification | Minimal | Complete reconstruction |
| Checksum recalculation | Partial | Complete |
| ICMP handling | Simple | Complex (different ICMPs) |
| DNS integration | Optional | Essential (DNS64) |
| Fragmentation | Simple | Complex (different models) |
NAT64's role decreases as IPv4 content diminishes:
The Internet's transition direction has effectively reversed. Early mechanisms (6to4, Teredo) assumed IPv4 was the reliable base and IPv6 needed help reaching it. NAT64 assumes IPv6 is the reliable base and IPv4 is the legacy that needs access. This reflects IPv6's maturity as the 'default' protocol for new deployments.
NAT64 represents the culmination of IPv6 transition mechanisms—enabling the final stage where networks are IPv6-only while maintaining access to legacy IPv4 content. Let's consolidate the key principles:
Module Complete:
You have now completed the comprehensive study of IPv6 Transition Mechanisms. From dual-stack (native support for both protocols) through tunneling (encapsulating IPv6 in IPv4), the automatic approaches of 6to4 and Teredo (with their limitations), to NAT64 (enabling IPv6-only networks to access IPv4 content), you understand the complete toolkit that has enabled—and continues to enable—the Internet's transition to IPv6.
This knowledge is essential for any network engineer working with modern networks. While specific mechanism choices depend on circumstances, understanding the principles and trade-offs of each approach allows you to design, deploy, and troubleshoot networks during this ongoing transition period.
You now understand NAT64 comprehensively: translation architecture, DNS64 synthesis, prefix options, stateful vs stateless operation, 464XLAT for complete compatibility, translation challenges, and deployment patterns. Combined with your knowledge of dual-stack, tunneling, 6to4, and Teredo, you have mastered the IPv6 transition mechanisms toolkit.