IP

Dual-Stack Networks

Running IPv4 and IPv6 simultaneously on the same network infrastructure.

The Internet with Two Stacks: IPv4 and IPv6

The internet currently uses two IP protocol families. IPv4 and IPv6 have different header formats, address spaces, and configuration mechanisms. A host that supports only IPv4 cannot communicate directly with an IPv6-only host without translation or another transition mechanism.

One transition strategy is Dual Stack: running complete IPv4 and IPv6 protocol stacks in parallel. Both protocols can then use the same physical infrastructure, while an administrator can deploy IPv6 in stages.

In such an environment, the same host has IPv4 and IPv6 configuration. An application can select an address family according to DNS results, address-selection policy, and route availability. The connection then uses the native protocol of the selected family.

describes a configuration in which servers, routers, and end devices can support IPv4 and IPv6 simultaneously. Communication with an IPv4 host uses IPv4, while communication with an IPv6 host uses IPv6. The Dual Stack definition uses complete implementations of both protocols, rather than merely two addresses. Each stack maintains its own connection state, error handling, and forwarding rules. This also includes the control messages required by the relevant family on both ends of a connection.

How a Dual Stack Device Works: The Host Perspective

A dual-stack end device, such as a laptop, has two complete and independent sets of networking configuration running in parallel. Each stack has its own addresses, routes, and interface-selection rules. A configuration error in one stack need not affect the other, but it can change the selected path.

Two Addresses, Two Gateways

A dual-stack device's network interface (e.g., its Wi-Fi or Ethernet adapter) will have at least two distinct IP addresses assigned to it:

  • An IPv4 address, mask, and default gateway (e.g., 192.168.1.100).
  • An IPv6 address, prefix length, and default gateway (e.g., 2001:db8:acad:1::100).

These addresses can be configured manually or assigned automatically by DHCP for IPv4 and DHCPv6 or SLAAC for IPv6. IPv6 can have both a link-local and a global address, so an interface may have more than one IPv6 entry. The device maintains separate routing tables and communicates via a distinct for each version.

The Protocol Choice: The Role of DNS

When a user types www.example.com into a browser, the address-family choice uses the Domain Name System (DNS)together with the operating system's address-selection policy. An A or AAAA record alone does not guarantee a working path to the service.

  1. The Dual Query: A dual-stack computer queries DNS for www.example.com. It can request both address record types: an A record for IPv4 and an AAAA record for IPv6.
  2. The DNS Response: The DNS server looks up the name.
    • If a name identifies an IPv4-only service, DNS returns an A record.
    • If a service is available only over IPv6, DNS returns a AAAA record.
    • In a documentation example, both records can use reserved addresses: A 192.0.2.10192.0.2.10 and AAAA 2001:db8:1::102001:db8:1::10.
  3. Address Selection: The system receives both addresses and applies address-selection rules. The second version of the "Happy Eyeballs" algorithm starts connection attempts for candidate addresses with a short delay between them. IPv6 can receive preference when policy and route availability allow it. The ordering is therefore policy-driven rather than a fixed promise that IPv6 always wins. A site can change the policy when operational testing shows that another order is preferable.
  4. Communication: The winning attempt uses the selected address family natively. If the IPv6 path does not respond, Happy Eyeballs can continue with IPv4, limiting delay caused by an unavailable path. With only an A record, the connection uses IPv4 from the start. The algorithm does not translate packets between families; it selects one of the available native connection attempts.

How a Dual Stack Network Works: The Infrastructure Perspective

For dual-stack hosts to use both families, the relevant infrastructure must support IPv4 and IPv6. Not every Layer 2 element must inspect both protocols, but routers and filtering services on the path need configuration for the family in use. DNS service, automatic configuration, and firewall rules must also cover both types of traffic.

Layer 1: The Physical Layer

The physical infrastructure (Ethernet cables, fiber optics, and Wi-Fi radio waves) carries signals independently of the IP version. The same wiring and radio channels can carry frames containing IPv4 and IPv6 packets.

Layer 2: The Data Link Layer

Standard Layer 2 devices such as Ethernet switches mainly use MAC addresses and EtherType to forward frames within a segment. They can carry IPv4 and IPv6 frames over the same network, although filters and access-control features may distinguish the two families.

Layer 3: The Role of a Dual-Stack Router

A dual-stack router runs independent forwarding mechanisms for IPv4 and IPv6 on the same hardware. Each family has its own routes, neighbors, and filtering rules.

  • Dual IP Interfaces: Every interface on the router that participates in the dual-stack network is configured with both an IPv4 address and an IPv6 address.
  • Dual Routing Tables: The router maintains two entirely separate routing tables. One table contains only IPv4 routes, learned from IPv4 routing protocols. The other contains only IPv6 routes, learned from IPv6 routing protocols.
  • Dual Routing Protocols: The router must run routing protocols for both address families. For example, it might run OSPFv2 to exchange IPv4 routes with its neighbors and, simultaneously, OSPFv3 to exchange IPv6 routes.

When a dual-stack router receives a packet, it reads the Version field in the header. For 4 it uses the IPv4 stack and routing table; for 6 it uses the IPv6 stack and routing table. Both mechanisms operate independently over the same physical infrastructure, and a missing route in one table does not create a route in the other. Routing protocols, default routes, and firewall state must therefore be checked separately for IPv4 and IPv6.

The Dual-Stack Strategy: Benefits and Costs

Dual stack supports a gradual IPv6 rollout while preserving IPv4 service. It also requires parallel configuration, monitoring, and security controls for both protocol families.

Advantages of Dual Stack

  • Native Communication and Compatibility: A connection to a host in the same address family can avoid address translation. Dual stack provides access to IPv4 and IPv6 services when the corresponding routes and DNS records exist. The path may still use tunnels or other operator-specific mechanisms.
  • Host Address Selection: For an end device, address selection is usually automatic. The operating system and Happy Eyeballs can use an available family, while the connection still depends on gateways, routes, and firewall rules.
  • Connection Continuity:The "Happy Eyeballs" algorithm can start an IPv4 attempt when the IPv6 attempt does not respond. This limits the impact of an unavailable path when the service publishes both records and both families are configured.

Disadvantages and Challenges

  • It Does Not Solve IPv4 Exhaustion: Dual stack keeps IPv4 support, so demand for the IPv4 address space remains. Hosts can use private addresses and NAT, so a globally unique IPv4 address is not required for every device. NAT64 serves a different scenario: it lets IPv6-only clients reach IPv4-only services.
  • Administrative Complexity and Cost: Running two protocols in parallel expands the configuration scope. Administrators must maintain:
    • Two sets of addressing plans.
    • Two sets of routing protocols.
    • Two sets of DNS records.
    • Two sets of security policies and firewall rules.
    This scope increases training requirements and the number of places where a configuration error can occur.
  • More Security Controls: Running both protocols requires monitoring threats in IPv4 and IPv6. Security teams should maintain firewall rules, router protection, and event logging for both families, since omitting one can create an unintended access path.

Dual stack remains a practical transition mechanism while IPv4 services are widely available. It gives users and services direct access to either family, but it requires ongoing IPv4 and IPv6 addressing. Further IPv4 reduction can lead to IPv6-only models with translation or gateways for legacy services.

Related articles