🔄 IPv6 Transition 5 phút đọc

Dual-Stack Deployment

Run IPv4 and IPv6 simultaneously during the transition period with dual-stack networking.

What Is Dual-Stack?

Dual-stack is the most common IPv6 transition strategy. It runs IPv4 and IPv6 simultaneously on the same network infrastructure, allowing devices to communicate using either protocol.

Why Dual-Stack?

During the transition from IPv4 to IPv6, not all services and networks support IPv6. Dual-stack ensures compatibility:

  • IPv6-capable clients connect via IPv6 when available
  • IPv4-only services remain accessible
  • No tunneling overhead or translation complexity

How It Works

A dual-stack device has both an IPv4 and an IPv6 address:

eth0: 192.168.1.100       (IPv4)
eth0: 2001:db8:1::100     (IPv6)

When connecting to a remote server, the device uses the Happy Eyeballs algorithm (RFC 8305):

  1. Start both IPv6 and IPv4 connection attempts
  2. Prefer IPv6 if it responds within ~250ms
  3. Fall back to IPv4 if IPv6 is slow or unavailable

Configuration

Linux Server

# /etc/netplan/01-config.yaml (Ubuntu)
network:
  ethernets:
    eth0:
      addresses:
        - 192.168.1.100/24
        - 2001:db8:1::100/64
      routes:
        - to: default
          via: 192.168.1.1
        - to: default
          via: 2001:db8:1::1

DNS Configuration

Add both A and AAAA records for your services:

www.example.com.    A       93.184.216.34
www.example.com.    AAAA    2001:db8::1

DNS clients will receive both records and choose based on their connectivity.

Web Server (Nginx)

server {
    listen 80;
    listen [::]:80;          # IPv6
    listen 443 ssl;
    listen [::]:443 ssl;     # IPv6 + SSL
    server_name example.com;
}

Challenges

  • Double the management — Two sets of addresses, routing, and firewall rules
  • Security gaps — IPv6 firewall rules are often forgotten when IPv4 rules are updated
  • DNS complexity — Must maintain A and AAAA records
  • Monitoring — Need to track connectivity and performance for both protocols

Best Practices

  • Enable IPv6 on all new deployments
  • Mirror IPv4 firewall rules for IPv6
  • Monitor IPv6 traffic separately to identify issues
  • Test both protocols during deployment
  • Use SLAAC for client networks, static addressing for servers

Xem thêm