IPv6 - IPv4 to IPv6
Transitioning From IPv4 to IPv6
Section titled “Transitioning From IPv4 to IPv6”IPv6 is not backward-compatible with IPv4, meaning IPv6-only devices cannot directly communicate with IPv4-only devices without a translation mechanism. The transition from a predominantly IPv4 internet to one where IPv6 is widely deployed is a long-term process. Several mechanisms have been developed to facilitate this coexistence and gradual migration.
These mechanisms allow networks and applications to support both protocols or to tunnel/translate between them.
Dual Stack
Section titled “Dual Stack”The most common and recommended transition strategy is Dual Stack. In a dual-stack deployment, interfaces on hosts and routers are configured with both IPv4 and IPv6 addresses. Applications can then choose to communicate over IPv4 or IPv6, depending on the capabilities of the destination and network path.
For example, a web server could have both an IPv4 address (e.g., 198.51.100.10) and an IPv6 address (e.g., 2001:db8::10). A dual-stack client can connect to this server using IPv6 if possible, or fall back to IPv4. DNS plays a crucial role by providing both A (IPv4) and AAAA (IPv6) records for hosts.
Diagrammatically: A router or host has separate network stacks for IPv4 and IPv6. It can send and receive IPv4 packets on its IPv4 interface/address and IPv6 packets on its IPv6 interface/address. This allows it to communicate natively with both IPv4 and IPv6 networks/hosts.
Tunneling
Section titled “Tunneling”Tunneling encapsulates IPv6 packets within IPv4 packets (or vice-versa) to traverse a network segment that only supports one protocol. This allows isolated IPv6 networks (sometimes called ‘islands’) to communicate over an IPv4 backbone, or IPv4 networks over an IPv6 backbone.
Several tunneling techniques exist, including:
- Manually configured tunnels (e.g., GRE tunnels): Point-to-point tunnels established by explicit configuration between two endpoints.
- 6to4 (RFC 3056): An older automatic tunneling mechanism that embeds IPv4 addresses into IPv6 prefixes. Largely deprecated due to reliability issues.
- Teredo (RFC 4380): Another automatic tunneling mechanism designed to work behind NATs. Also less favored now.
- ISATAP (Intra-Site Automatic Tunnel Addressing Protocol - RFC 5214): For use within a single organization’s network to connect IPv6 hosts over an IPv4 infrastructure.
- 6rd (IPv6 Rapid Deployment - RFC 5969): Allows ISPs to rapidly provide IPv6 connectivity to customers over their existing IPv4 infrastructure.
Diagrammatically: Imagine two separate IPv6 networks needing to communicate across an IPv4-only internet. An IPv6 packet from Network A is encapsulated within an IPv4 packet by a border router. This IPv4 packet traverses the IPv4 internet. The border router at Network B decapsulates the IPv6 packet and forwards it into Network B.
Translation (NAT64/DNS64)
Section titled “Translation (NAT64/DNS64)”Translation mechanisms allow communication between IPv6-only hosts and IPv4-only hosts/services. The most common modern translation technique is NAT64 combined with DNS64.
- DNS64 (RFC 6147): A DNS server that, when an IPv6-only client requests an IPv4-only hostname, synthesizes an AAAA (IPv6) record from the A (IPv4) record. This synthesized IPv6 address typically embeds the original IPv4 address within a specific NAT64 prefix (e.g., the well-known prefix 64:ff9b::/96).
- NAT64 (RFC 6146): A gateway that translates IPv6 packets from clients (destined for the synthesized IPv6 addresses) into IPv4 packets, and vice-versa for responses. It maintains state for these translations, similar to traditional IPv4 NAT.
How it works: An IPv6-only client wants to access an IPv4-only server (e.g., ipv4.example.com).
- The client queries its DNS64 server for
ipv4.example.com. - The DNS64 server finds only an A record (e.g., 192.0.2.100) for
ipv4.example.com. - The DNS64 server synthesizes an AAAA record (e.g., 64:ff9b::192.0.2.100 or 64:ff9b::c000:0264 in hex) and returns it to the client.
- The client sends IPv6 packets to this synthesized IPv6 address.
- The NAT64 gateway receives these packets, translates the IPv6 headers to IPv4 headers (extracting the destination IPv4 address), and forwards them to the IPv4 server.
- Responses from the IPv4 server are translated back to IPv6 by the NAT64 gateway and sent to the client.
Note: NAT-PT (Network Address Translation - Protocol Translation, RFC 2766) was an earlier translation mechanism but is now deprecated due to significant operational issues and limitations.