Cloud concept · Updated

NAT64 - NAT64 is a network translation mechanism that enables IPv6-only clients to communicate with IPv4 destinations by translating packets between the two IP versions.

In short

NAT64 provides a compatibility path when workloads adopt IPv6 before all their dependencies support it. Commonly paired with DNS64, it lets IPv6-only applications reach IPv4 services without assigning IPv4 addresses to every client, while retaining IPv4 connectivity at the translation boundary.

Cloud Concepts Hub →

6 key aspects of NAT64

NAT64 combines routed address translation, commonly assisted by DNS64, with state and capacity management to connect IPv6-only clients to IPv4 dependencies.

01
IPv6-to-IPv4 packet translation

NAT64 translates between IPv6 client traffic and IPv4 destination traffic, including the necessary header and checksum changes. It provides interoperability rather than tunneling or end-to-end IPv6 connectivity.

02
DNS64-assisted destination discovery

DNS64 synthesizes IPv6 destination addresses from IPv4 DNS records when suitable native IPv6 records are absent. Clients must use the intended resolver path, and synthesis does not fix applications that require IPv4 sockets.

03
Translation-prefix routing

Traffic addressed to the configured NAT64 prefix must reach the translator. Align DNS64 synthesis, route tables, translator configuration, and IPv4 destination reachability so that synthesized addresses have a working forwarding path.

04
Stateful address and port sharing

Common cloud implementations share a pool of IPv4 addresses across many IPv6 clients by tracking transport mappings. Concurrent connection limits, port availability, idle timeouts, and return-path affinity affect reliability.

05
Incremental IPv6 adoption

IPv6-only workloads can retain access to IPv4 dependencies while native IPv6 destinations remain directly reachable. This reduces client-side IPv4 allocation without requiring every dependency to migrate at once.

06
Explicit compatibility and security boundaries

NAT64 does not automatically support every protocol, repair embedded IPv4 addresses, or publish IPv6 servers to IPv4 clients. Validate application behavior and apply security controls independently of translation.

What is NAT64

3 min read

NAT64 connects IPv6 clients to IPv4 destinations by translating IP headers and addresses rather than encapsulating one protocol inside another. In a typical stateful deployment, the translator maps IPv6 source addresses and transport ports to addresses and ports from an IPv4 pool. It records each flow so that IPv4 replies can be translated back into IPv6 packets and delivered to the originating client. TCP, UDP, and ICMP translation are common capabilities, but support for other protocols depends on the implementation.

The IPv6 destination address identifies an IPv4 destination through an address-embedding scheme. A widely used translation prefix is 64:ff9b::/96, although deployments can use suitable network-specific prefixes. Routing must direct traffic for the configured prefix to the NAT64 translator. The translator also needs IPv4 reachability to the destination, and return traffic must reach the translator that holds the flow state.

DNS64 usually makes this process transparent to applications that use hostnames. When a destination has an IPv4 A record but no usable IPv6 AAAA record, a DNS64 resolver synthesizes an AAAA response containing the translation prefix and embedded IPv4 address. The application opens an IPv6 connection to that address, and the network sends it through NAT64. DNS64 synthesizes DNS answers; NAT64 translates packets. Neither function substitutes for the other, and independently validating DNSSEC clients require careful handling of synthesized answers.

For example, an IPv6-only application subnet might need to download packages from an IPv4-only repository. The subnet uses a DNS64-enabled resolver and has a route for the translation prefix to a NAT64 gateway. The gateway connects to the repository over IPv4 and translates responses back to IPv6. For an internet destination, the translation path needs public IPv4 egress. For a private IPv4 dependency, private routing and an appropriate translator address pool can provide connectivity without internet traversal.

NAT64 is useful during staged IPv6 adoption because it removes the need for an IPv4 address on every client while preserving access to remaining IPv4 dependencies. Dual-stack networking is different: clients retain both protocol stacks and select an appropriate destination address. Native IPv6 traffic should normally follow native IPv6 routes rather than pass through NAT64. An IPv6 egress-only internet gateway controls native IPv6 internet egress but does not translate traffic to IPv4.

Compatibility testing remains necessary. An application that opens an IPv4 socket to a literal IPv4 address cannot use DNS64 synthesis to become IPv6-capable. Protocols that embed IPv4 addresses in payloads, require unsupported IP protocols, or depend on unsolicited inbound connections can also fail. A client-side translation mechanism such as the CLAT component of 464XLAT can address some IPv4-only application requirements, but it is an additional capability rather than an automatic property of NAT64.

Operationally, stateful NAT64 introduces connection state, port allocation limits, translation costs, and a shared dependency. Size the translation tier for concurrent connections and throughput, distribute it across failure domains, and ensure routing preserves flow affinity. Monitor allocation failures, connection counts, timeouts, packet drops, and latency. Test path MTU discovery and ICMP handling, because translation changes packet headers and can expose fragmentation problems.

NAT64 is not encryption, an application proxy, or a replacement for security policy. Apply explicit ingress and egress controls and retain enough translation telemetry to associate shared IPv4 traffic with originating IPv6 workloads. A public translator's IPv4 addresses may also become the addresses that external services must allowlist. Standard stateful outbound translation does not provide general IPv4-initiated access to IPv6 servers; publishing those servers requires a separately designed ingress solution.