NAT64 is a stateful translation mechanism that allows IPv6-only clients to communicate with IPv4 servers. It embeds the destination IPv4 address within an IPv6 address using a /96 prefix.
Well-Known Prefix (RFC 6052):
- Prefix: 64:ff9b::/96
- Globally defined for NAT64 translation
- Last 32 bits contain the IPv4 address
- Example: 192.0.2.1 → 64:ff9b::192.0.2.1 or 64:ff9b::c000:0201
Address Format:
- Bits 0-95: NAT64 prefix (96 bits)
- Bits 96-127: IPv4 address (32 bits)
- Total: 128-bit IPv6 address
Translation Example:
- IPv4: 192.0.2.1 (hex: C000:0201)
- NAT64 Prefix: 64:ff9b::/96
- Result: 64:ff9b::c000:0201 or 64:ff9b::192.0.2.1
How NAT64 Works:
- IPv6 client queries DNS64 for a domain (e.g., example.com)
- DNS64 returns a synthesized AAAA record using NAT64 prefix + IPv4 address
- Client sends IPv6 packet to NAT64 address (e.g., 64:ff9b::93.184.216.34)
- NAT64 gateway extracts IPv4 address from last 32 bits
- Gateway translates IPv6 packet to IPv4 and forwards to destination
- Response is translated back to IPv6 and returned to client
Network-Specific Prefixes (NSP):
Organizations can use custom /96 prefixes instead of the well-known prefix:
- Examples: 2001:db8:1c0:2:21::/96, fd00:64::/96
- Allows multiple NAT64 gateways or private deployments
- Must coordinate with DNS64 configuration
- Not globally routable (for internal use)
Deployment Scenarios:
- Mobile networks: IPv6-only LTE/5G with NAT64 for IPv4 access
- 464XLAT: Combination of NAT64 and CLAT for mobile devices
- Enterprise: IPv6-only internal networks accessing legacy IPv4 services
- Data centers: IPv6-native infrastructure with IPv4 backward compatibility
Limitations:
- Stateful mechanism requires gateway capacity planning
- Breaks some IPv4-embedded protocols (FTP active mode, SIP)
- Cannot be used for inbound IPv4 connections to IPv6 servers
- Application Layer Gateways (ALGs) may be needed for certain protocols