IPv6 NAT64 Translator

Translate IPv4 ↔ IPv6 using a /96 NAT64 prefix (default 64:ff9b::/96).

About This Tool

The NAT64 IPv6 Address Translator converts between IPv4 addresses and their NAT64 IPv6 representations, enabling IPv6-only networks to communicate with IPv4 hosts. NAT64 is a crucial IPv6 transition mechanism (RFC 6146) that allows IPv6-only clients to access IPv4 servers by embedding the IPv4 address within an IPv6 address using a /96 prefix. The well-known prefix 64:ff9b::/96 is commonly used, but ISPs and enterprises may use custom Network-Specific Prefixes (NSP). This tool supports both directions and custom prefixes for testing and deployment scenarios.

How to Use

  1. Select translation direction: IPv4 → IPv6 or IPv6 → IPv4
  2. Enter the NAT64 prefix (default is the well-known 64:ff9b::/96)
  3. For IPv4 to IPv6: Enter an IPv4 address (e.g., 192.0.2.1)
  4. For IPv6 to IPv4: Enter a NAT64 IPv6 address (e.g., 64:ff9b::192.0.2.1)
  5. Click "Translate" to perform the conversion
  6. The result shows the translated address
  7. Custom prefixes must be /96 networks for proper NAT64 operation

Features

  • Bidirectional NAT64 address translation
  • Supports well-known prefix 64:ff9b::/96 (RFC 6052)
  • Accepts custom Network-Specific Prefixes (NSP)
  • Validates prefix length (/96 requirement)
  • Clear error messages for invalid inputs
  • RFC 6146 compliant translation
  • Real-time conversion
  • Handles both compressed and expanded IPv6 formats

Common Use Cases

  • Testing NAT64 deployments in IPv6-only networks
  • Understanding how IPv6-only clients reach IPv4 servers
  • Debugging connectivity issues in NAT64 environments
  • Configuring DNS64 and NAT64 together for IPv6 transition
  • Planning IPv6-only mobile networks (464XLAT architecture)
  • Analyzing NAT64 gateway configurations
  • Educational purposes: learning IPv6 transition mechanisms
  • Verifying NAT64 address synthesis in packet captures
  • Testing custom NSP deployments
  • Understanding carrier-grade NAT64 implementations

Technical Details

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:

  1. IPv6 client queries DNS64 for a domain (e.g., example.com)
  2. DNS64 returns a synthesized AAAA record using NAT64 prefix + IPv4 address
  3. Client sends IPv6 packet to NAT64 address (e.g., 64:ff9b::93.184.216.34)
  4. NAT64 gateway extracts IPv4 address from last 32 bits
  5. Gateway translates IPv6 packet to IPv4 and forwards to destination
  6. 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