Marcio Cunha

NAT64 and DNS64: How IPv6 Devices Access IPv4 Services

Learn how NAT64 and DNS64 work together to allow modern, pure IPv6 networks to seamlessly communicate with legacy servers stuck on the older IPv4 protocol.

Marcio Cunha12 min
Also available in:EspañolPortuguês
Summary
  • The exhaustion of IPv4 addresses forced a global transition to IPv6, but much of the legacy internet still relies on older infrastructure.
  • The DNS64 mechanism intercepts name resolution queries and crafts synthetic IPv6 addresses for servers that only possess IPv4 records.
  • The NAT64 gateway handles the actual packet translation, converting traffic flowing from the IPv6 side into standard IPv4 format.
  • Deploying pure IPv6 networks combined with translation gateways significantly reduces operational costs associated with dual-stack management.
  • Applications that embed raw IP addresses directly in their source code encounter connectivity barriers and require refactoring under NAT64.

The challenge of coexistence between old and new network addresses

The internet is undergoing a slow yet irreversible transition from the original IP protocol, known as IPv4 and currently depleted, to its modern successor, IPv6. Practically speaking, IPv6 provides enough addresses to connect every grain of sand on Earth, while IPv4 has suffered from chronic scarcity for over a decade. The catch is that these two worlds cannot talk directly to each other: a device running purely IPv6 cannot send packets to a server that only understands IPv4. This technological gap is bridged by two essential tools working in tandem: DNS64 and NAT64. Together, they act as a high-performance simultaneous interpreter, enabling modern devices to reach legacy services without requiring complex server-side upgrades.

Understanding the role of DNS64 in name resolution

To grasp how this magic happens, we must recall how the internet operates when we type a web address into a browser. The DNS system, acting like the phone book of the internet, translates human-readable domain names into numerical IP addresses. When a pure IPv6 device queries a legacy site that only has an IPv4 address, standard DNS resolvers return an error because no matching record exists. This is where DNS64 steps in. It intercepts the query and, upon noticing the target only has an IPv4 address, takes that legacy number and encapsulates it inside a special IPv6 prefix reserved for translation. In practice, the modern device receives a synthetic IPv6 address that looks foreign but works seamlessly within its operating system.

How NAT64 handles physical packet translation

Armed with the synthetic IPv6 address generated by DNS64, the device dispatches its data packets toward the destination. However, the destination server's edge router still only understands IPv4. At this exact moment, NAT64 takes over the connection. NAT64, short for Network Address Translation in its combined protocol version, operates as a packet translator positioned at the network boundary. It ingests the packet traveling in IPv6 format, strips the wrapper, translates the header into standard IPv4, and injects it into the legacy network. When the server replies, the process happens in reverse: the NAT64 gateway receives the IPv4 packet, converts it into IPv6, and returns it to the originating device transparently.

Architecture and deployment topology in real-world networks

Implementing this architecture requires careful strategic planning from network administrators. Typically, NAT64 is deployed on edge routers or next-generation firewalls capable of processing high volumes of packet translation without introducing performance bottlenecks. Furthermore, the IPv6 prefix utilized by DNS64 must be consistently configured across the infrastructure to prevent routing loops or mismatches. Many organizations rely on the well-known prefix designated by the internet standards (64:ff9b::/96) to simplify deployment, although organization-specific prefixes can also be applied. Proper sizing of the edge hardware is vital, as translation demands heavy CPU processing to rewrite packet headers in real-time.

Structural limitations and operational pitfalls

Despite being an elegant solution, the combination of DNS64 and NAT64 is not a silver bullet and presents critical constraints that every network engineer must understand. The most severe hurdle occurs when applications embed literal IP addresses directly into their source code or communication protocols rather than using domain names. Because NAT64 relies on DNS64 to craft synthetic addresses, outbound connections starting directly from a hardcoded IP will fail instantly. Another critical challenge involves application-layer protocols that carry addressing information inside their payloads, such as active FTP or legacy VoIP protocols, which mandate the use of additional mechanisms known as Application Layer Gateways to fix packet contents.

Final considerations on the future of protocol migration

The synergy between DNS64 and NAT64 forms an indispensable bridge for the ultimate migration toward a pure IPv6 internet infrastructure. While technical constraints persist for poorly designed applications or legacy-dependent systems, this model allows service providers and enterprises to drastically cut operational costs by eliminating expensive public IPv4 addresses. As the IT ecosystem continues its relentless evolution, mastering these concepts ensures that protocol transitions remain completely invisible to the end user, preserving global connectivity and preparing architectures for future exponential growth.