Connecting Legacy IPv4 Services to Pure IPv6 Clients with NAT64 & DNS64
How we implemented NAT64 and DNS64 prefix synthesis to allow IPv6-only mobile devices to access legacy IPv4-only enterprise application servers.
βDNS64 synthesizes synthetic IPv6 AAA A records out of thin air to bridge legacy IPv4 backends with pure IPv6 mobile clients.β
The Setup
In January 2014 at Net4 India, we expanded IPv6 connectivity for enterprise clients hosting mobile backend API services. Mobile carriers were aggressively deploying IPv6-only cellular networks to combat IPv4 address scarcity.
However, many enterprise clients ran legacy IPv4-only database and payment processing backends that could not be modified.
The Mess
Mobile clients connecting over pure IPv6 subnets failed to connect to IPv4-only backend API servers:
[CLIENT API ERROR LOG] 2014-01-14 10:12:00 - iOS Mobile Client
Target Host: api.clientbank.com (IPv4-Only: 202.54.12.80)
DNS Query: TYPE AAAA for api.clientbank.com -> Response: NODATA (0 AAA Records)
Socket Error: Address family not supported by protocol (AF_INET6 -> No IPv6 Route)
Connection Status: Aborted (100% Failure Rate for IPv6-Only Mobile Subscribers)
Because the domain returned zero IPv6 AAAA records, IPv6-only mobile devices aborted socket establishment without falling back to IPv4.
The Solution
I deployed an enterprise NAT64 / DNS64 gateway architecture using BIND9 DNS64 synthesis and Linux Tayga stateful NAT64 translation:
- DNS64 Prefix Synthesis: Configured DNS64 on our recursive DNS servers to intercept IPv4 A records and synthesize IPv6 AAA A records using the well-known prefix
64:ff9b::/96. - Stateful NAT64 Gateway: Deployed Tayga NAT64 instances mapping the synthesized
64:ff9b::/96IPv6 traffic to an outbound IPv4 NAT pool.
# BIND9 /etc/bind/named.conf.options - DNS64 Configuration
options {
directory "/var/cache/bind";
dns64 64:ff9b::/96 {
clients { any; };
mapped { any; };
exclude { 127.0.0.0/8; 10.0.0.0/8; };
};
};
# /etc/tayga.conf - Stateful NAT64 Gateway Configuration
tun-device nat64
ipv4-addr 192.168.255.1
ipv6-addr 2001:db8:1::1
prefix 64:ff9b::/96
dynamic-pool 192.168.255.0/24
# Verify Tayga Translation Status
tayga --debug
# Output: TAYGA 0.9.2: Subnet 64:ff9b::202.54.12.80 mapped to 192.168.255.12 (ACTIVE)
The Results
The stateful NAT64/DNS64 gateway seamlessly bridged legacy IPv4 backends with modern IPv6 clients:
- IPv6 Mobile Reachability: 100% of IPv6-only mobile clients connected without backend modifications.
- DNS Synthesis Latency: Sub-millisecond (0.4ms) DNS64 record generation.
- Backend Application Changes: ZERO lines of application code modified.
Key Takeaway
Deploying NAT64 paired with DNS64 allows pure IPv6 clients to seamlessly query and connect to legacy IPv4-only backends without modifying application source code.
Architecture and decisions: mine. Debugging sessions at odd hours: mine. AI assistance: structure, syntax, first draft. β Sachin
Sachin Kumar Sharma
Associate Director (Infrastructure & Cloud Architecture Strategy) | 20+ Yrs Exp
Architecting resilient multi-cloud enterprise landing zones, SDN overlay fabrics, DevSecFinOps automation pipelines, and autonomous Agentic AI platforms.
π‘ Related Engineering Articles
IPv6 Transition Strategies: Dual-Stack Coexistence with A10 Networks ADC NAT-PT
How we implemented A10 Thunder ADC NAT-PT (Protocol Translation) to allow legacy IPv4-only enterprise application servers to communicate with IPv6 client subnets.
Solving IPv4 Exhaustion: Building an MP-BGP Dual-Stack IPv6 Carrier Core
How we migrated a Tier-3 ISP core network to MP-BGP Dual-Stack IPv6, allocating /48 enterprise subnets and managing dual-stack routing tables.
GENEVE vs VXLAN: Why We Re-Engineered 400 Hypervisors During an Live Cloud Migration
A 2018 war story on migrating IBM Cloud SDDC workloads from NSX-V (VXLAN) to NSX-T (GENEVE), hardware VTEP MTU mismatches, and why packet encapsulation headers break legacy network tools.
π¬ Stay Updated on Tech Releases
Sign up to get notified when I publish new production war stories, agentic AI architecture blueprints, or open-source infrastructure tools.