NAT64 and DNS64
Configure stateful NAT64 to let IPv6-only clients reach the IPv4 Internet (RFC 6146). Configure DNS64 and explain its limits around DNSSEC and IPv4 literals (RFC 6147). Choose between the well-known prefix 64:ff9b::/96 and a local-use prefix (RFC 6052, RFC 8215).
Take the quiz · pass mark 70% · 9 questions
Explanation
NAT64 with DNS64 is the standard way to give IPv6-only clients access to IPv4-only servers. It pairs two components: a stateful NAT64 translator (RFC 6146) in the data path and a DNS64 resolver (RFC 6147) that invents the IPv6 address the client connects to.
Stateful NAT64 (RFC 6146)
NAT64 sits at the border. When an IPv6-only client sends a packet to an IPv4-embedded IPv6 address (inside the NAT64 prefix), the translator uses SIIT (L6.03) to rewrite it to IPv4 and, like IPv4 NAPT, multiplexes many IPv6 clients behind a pool of public IPv4 addresses, keeping per-flow state so replies map back. It is stateful (unlike plain SIIT) precisely because many clients share few IPv4 addresses. The IPv4 destination is recovered from the IPv6 address by the RFC 6052 mapping.
DNS64 (RFC 6147)
The client only knows how to open IPv6 sockets, so it needs an AAAA record. When a name has only an A record (IPv4), the DNS64 resolver synthesises a AAAA by embedding that IPv4 into the NAT64 prefix (RFC 6052). The client connects to that synthetic IPv6 address, which routes to the NAT64 box, which translates to the real IPv4 server. If a real AAAA exists, DNS64 returns it unchanged and the traffic stays native.
DNS64 has two well-known limits:
- DNSSEC: synthesising a AAAA breaks the signature. A validating resolver doing DNS64 must handle this carefully; a validating client that requested DNSSEC data will see the synthesis as tampering. This is a fundamental tension, documented in RFC 6147.
- IPv4 literals and non-DNS referrals: if an application uses a hard-coded IPv4 literal (no DNS lookup), DNS64 never runs and the connection fails. This is exactly the gap that 464XLAT/CLAT (L6.05) fills.
Which prefix?
The NAT64 prefix can be:
- The well-known prefix 64:ff9b::/96 (RFC 6052). Convenient and recognisable, but it may only be used within a single operator's domain and cannot be routed on the global Internet; it also only works for globally unique IPv4.
- A network-specific prefix from your own space, or the local-use translation prefix 64:ff9b:1::/48 defined by RFC 8215, which exists precisely so operators have a well-defined non-global prefix for local NAT64/translation without carving it out of production space.
Pick the well-known /96 for a simple single-domain deployment; pick 64:ff9b:1::/48 or your own prefix when you need a local-use or multi-prefix design.
ictNetworks scenario
ictNetworks runs its IPv6-only mobile access with NAT64 behind a small pool of public IPv4, and DNS64 on its resolvers using the well-known prefix 64:ff9b::/96 for the simple case, switching to the RFC 8215 local-use prefix 64:ff9b:1::/48 in a region that needs a second, non-global translation prefix. It documents the DNSSEC interaction and relies on CLAT (L6.05) so that IPv4-literal apps still work.
Drawing diagram…
(The diagram uses the well-known prefix for recognisability; 203.0.113.80 is a documentation address. Per RFC 6052 §3.1 the well-known prefix is only for globally unique IPv4 — for non-global/documentation IPv4 use a network-specific prefix such as 2001:db8:64::/96, as the runnable lab does. See the caveat under Example 2.)
Worked examples
Example 1: The well-known prefix
The NAT64 well-known prefix, written as a /96, is 64:ff9b::/96 (RFC 6052). Traffic to any address inside it is sent to the NAT64 box.
Example 2: Synthesising the AAAA for an IPv4-only server
An IPv4-only web server is at 203.0.113.80 (hex cb 00 71 50). DNS64 synthesises the AAAA by embedding it in the well-known /96: 64:ff9b::cb00:7150. The IPv6-only client connects there and NAT64 translates it to 203.0.113.80.
RFC 6052 §3.1 caveat. 203.0.113.80 is a documentation address, used here only to make the embedding concrete. The well-known prefix 64:ff9b::/96 must not represent non-global IPv4 (private and other special-use ranges, which include the documentation blocks): a production well-known-prefix NAT64 embeds a globally unique IPv4. When you must translate documentation or other non-global IPv4 — as in the runnable L6-q03 lab — use a network-specific prefix from your own space, e.g.
2001:db8:64::/96. The embedding is identical: 203.0.113.80 becomes 2001:db8:64::cb00:7150.
Example 3: The local-use prefix
When a second, non-global translation prefix is needed, RFC 8215 reserves 64:ff9b:1::/48 for local use, so the operator does not have to borrow from production address space.
Lab
Goal: Make an IPv6-only client reach an IPv4-only web server at 203.0.113.80.
You need: a topology with an IPv6-only client, a NAT64 translator (for example Jool in stateful NAT64 mode, or tayga in userspace) with a small IPv4 pool, a DNS64 resolver (for example Unbound with dns64, BIND, or a small synthesiser), and an IPv4-only web server at 203.0.113.80. (Resolver and Jool syntax vary by version — check the docs.)
- Confirm the client is IPv6-only and cannot reach 203.0.113.80 directly.
- Configure NAT64 with a translation prefix and the IPv4 pool. Because the server uses documentation IPv4 (203.0.113.80), use a network-specific prefix such as
2001:db8:64::/96rather than the well-known64:ff9b::/96— RFC 6052 §3.1 reserves the well-known prefix for globally unique IPv4. - Point the client at the DNS64 resolver; confirm a name with only an A record now returns a synthetic AAAA in
2001:db8:64::/96, and compute that address by hand for 203.0.113.80 (2001:db8:64::cb00:7150). curlthe server by name from the client and confirm it works through NAT64; capture both sides.- Demonstrate the two limits: (a) connect to an IPv4 literal and show it fails (motivating CLAT), and (b) note the DNSSEC interaction.
What to submit: the NAT64 and DNS64 configuration, the hand-computed synthetic AAAA, the working curl and captures, and the write-up of the IPv4-literal and DNSSEC limits.
Summary
- NAT64 (RFC 6146) statefully translates IPv6-only clients to IPv4 servers behind a pool of public IPv4.
- DNS64 (RFC 6147) synthesises AAAA records by embedding IPv4 in the NAT64 prefix (RFC 6052).
- DNS64 breaks DNSSEC and does nothing for IPv4 literals; CLAT (L6.05) covers the literal gap.
- Choose the well-known 64:ff9b::/96 for a single domain, or the RFC 8215 local-use prefix 64:ff9b:1::/48 / your own prefix otherwise.
- Next lesson (L6.05): 464XLAT, CLAT and IPv6-mostly networks.
Quiz imported · 9 questions · pass mark 70%. Lab questions are not auto-marked.