Dual-stack networking runs IPv4 (32-bit addresses) and IPv6 (128-bit addresses) simultaneously as two independent Layer 3 routing planes sharing the same physical or virtual NIC, allowing applications to prefer native end-to-end IPv6 via Happy Eyeballs (RFC 8305) while falling back to NAT-translated IPv4 within 250 milliseconds if the IPv6 path stalls. Treating IPv6 as "IPv4 with 128 bits and colons" is the fastest way to break a production network: IPv6 eliminates ARP broadcasts in favor of multicast Neighbor Discovery Protocol (NDP), removes in-flight router packet fragmentation entirely, assigns multiple concurrent addresses per interface, and standardizes almost every local network segment onto a fixed /64 boundary.
When a dual-stack Linux server boots inside a cloud environment or Virtual Datacenter, the kernel initializes separate Forwarding Information Bases (FIBs), neighbor caches, and firewall hooks (nftables inet family) for AF_INET and AF_INET6. Understanding how private scopes, carrier transition blocks, global BGP minimums, and kernel Router Advertisement flags interact prevents subtle blackholes that single-stack tutorials completely miss.
Because the 4.29-billion IPv4 space exhausted its IANA free pool over a decade ago, modern infrastructure relies on overlapping private scopes, carrier-grade NAT blocks, and strict Border Gateway Protocol (BGP) prefix-length filters in the Default-Free Zone (DFZ).
| Architectural Dimension | IPv4 Implementation | IPv6 Implementation | Operational Consequence |
|---|---|---|---|
| Address Width & Format | 32-bit dotted decimal (203.0.113.42) |
128-bit hex groups (2001:db8:4020:1a::2a, RFC 5952 lowercase compressed) |
IPv6 requires bracketed literals in URIs and socket configs (http://[2001:db8::1]:8080) |
| Standard LAN / VLAN Prefix | Variable (/24 typical, /20–/28 common) |
Fixed /64 (64-bit routing prefix + 64-bit Interface ID) |
Prefix lengths longer than /64 (e.g., /80 or /112) break SLAAC and Android Wi-Fi stacks |
| Private Internal Space | RFC 1918 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) |
ULA fd00::/8 (RFC 4193 fc00::/7 with L=1 + random 40-bit Global ID) |
Random 40-bit ULA prefixes (fd9a:3c71:88e2::/48) prevent VPC peering collisions during M&A |
| Shared / Overlay Space | CGNAT 100.64.0.0/10 (RFC 6598) |
Overlay ULAs (e.g., WireGuard / mesh fd7a:115c:a1e0::/48) |
100.64.0.0/10 avoids clashing with home/office 10.x and 192.168.x LANs on VPNs and ISP edges |
| Mandatory Local Control Scope | Optional APIPA (169.254.0.0/16) |
Link-Local fe80::/10 (mandatory on every IPv6-enabled NIC) |
OSPFv3, BGP unnumbered, and NDP Router Advertisements use fe80:: next-hops; disabling it breaks IPv6 |
| Minimum BGP DFZ Prefix | /24 (256 IPv4 addresses) |
/48 (65,536 /64 subnets) |
Transit peers drop /25 IPv4 or /56 IPv6 BGP announcements to cap global TCAM routing table growth |
| L2 Address Resolution | Broadcast ARP (ff:ff:ff:ff:ff:ff) |
Solicited-Node Multicast NDP (ff02::1:ffXX:XXXX, ICMPv6 Types 135/136) |
Idle hosts ignore unrelated neighbor lookups instead of waking up on subnet-wide ARP floods |
Notice the trap around ULA fd00::/8 and RFC 6724 Default Address Selection: unlike IPv4 RFC 1918—which triggers an application fallback only if you explicitly configure NAT—Linux's default /etc/gai.conf ranks IPv4 above IPv6 ULA! If you assign fd00:: addresses alongside RFC 1918 10.x.x.x addresses on a dual-stack internal cluster and resolve a dual-record A + AAAA hostname, getaddrinfo() will silently connect over IPv4 unless Global Unicast IPv6 (2000::/3) is used or gai.conf label precedence is adjusted.
/64In IPv4, hosts almost universally acquire their address, netmask, default gateway, and DNS resolvers from a single DHCPv4 broadcast exchange (DISCOVER -> OFFER -> REQUEST -> ACK). IPv6 splits router discovery from address assignment cleanly:
fe80:: link-local source address—and reply immediately to host Router Solicitations (Type 133). The RA itself supplies the default gateway (the router's fe80:: address!), link MTU, and prefix flags. DHCPv6 intentionally does not contain a default gateway option.A=1, M=0): With the Autonomous (A) flag set, the host takes the advertised /64 network prefix and generates its own 64-bit Interface Identifier (IID), verifying uniqueness on the link via Duplicate Address Detection (DAD). Early stacks used EUI-64 (embedding the NIC's 48-bit MAC with ff:fe in the middle), which leaked hardware identities across networks. Modern Linux kernels and NetworkManager implement RFC 7217 cryptographically stable opaque IIDs (addr_gen_mode = stable-privacy) plus optional RFC 8981 temporary outbound privacy addresses.A=1, M=0, O=1) & RDNSS (RFC 8106): Hosts self-assign /64 addresses via SLAAC and either read DNS resolvers directly from the RA RDNSS option or query DHCPv6 solely for DNS/NTP metadata (Other flag).M=1): Managed environments that require strict central IPAM lease tracking set the Managed (M) flag so dhclient / systemd-networkd requests a /128 address lease from a DHCPv6 server while still learning the default route from ICMPv6 RAs.Why is /64 sacred? RFC 4291 and RFC 7421 fix the boundary at bit 64 so SLAAC, RFC 7217 stable privacy hashing, Cryptographically Generated Addresses (CGA), and NAT64/464XLAT prefix synthesis never have to negotiate variable host bit widths. Even point-to-point router links allocate a /64 from the link pool while configuring /127 (RFC 6164) on the interfaces themselves to mitigate NDP cache exhaustion attacks.
On Ubuntu 24.04 or Debian 12 Linux VPS instances, iproute2 inspects both address families, link-local gateways, and NDP neighbor states (REACHABLE, STALE, DELAY, PROBE):
# 1. Inspect global, ULA, CGNAT, and link-local addresses across interfaces
ip -br -4 addr show
ip -br -6 addr show
# 2. Inspect both independent kernel FIB routing tables
ip -4 route show table main
ip -6 route show table main
# 3. Verify which source IP and next-hop the kernel selects for a dual-stack target
ip route get 1.1.1.1
ip -6 route get 2606:4700:4700::1111
# 4. Inspect IPv6 Neighbor Discovery (NDP) state vs IPv4 ARP cache
ip -6 neigh show dev eth0
ip -4 neigh show dev eth0
forwarding=1 Drops SLAAC Default RoutesOne of the most common production IPv6 outages happens the moment an engineer installs Docker, WireGuard, or Kubernetes on a dual-stack Linux host. Enabling IPv6 packet forwarding (net.ipv6.conf.all.forwarding = 1) instructs the Linux kernel to behave as a router rather than a host. When accept_ra stays at its default value of 1, the kernel stops processing incoming Router Advertisements, causing the IPv6 default route to vanish roughly 30 minutes later when the RA lifetime expires!
To forward container or VPN packets while still accepting upstream SLAAC default routes on your primary WAN/VLAN interface, set accept_ra = 2 explicitly on the ingress NIC:
# /etc/sysctl.d/90-dualstack-hardening.conf
# Enable dual-stack forwarding for WireGuard / containers without losing WAN RA routes
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.eth0.accept_ra = 2
# Generate RFC 7217 opaque stable interface IDs instead of MAC-leaking EUI-64
net.ipv6.conf.default.addr_gen_mode = 2
net.ipv6.conf.all.addr_gen_mode = 2
# Harden against rogue ICMP redirects while preserving Path MTU Discovery
net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
Apply changes deterministically with sudo sysctl --system.
AAAA FallbacksIn IPv4, routers were historically permitted to fragment oversized packets unless the DF (Don't Fragment) bit was set, and many firewall admins developed a habit of dropping all ICMP packets at the perimeter. Dropping all ICMPv6 breaks IPv6 completely.
In IPv6, routers never fragment packets in flight; only the sending host can fragment. When an IPv6 server transmits a 1,500-byte TCP segment across an upstream tunnel, PPPoE link, or VXLAN fabric with a 1,420-byte MTU, the intermediate router drops the packet and returns an ICMPv6 Type 2 (Packet Too Big) message advertising MTU = 1420. If an overly aggressive firewall drops ICMPv6 Type 2, the TCP three-way handshake succeeds (tiny 60-byte SYN/SYN-ACK packets pass fine!), TLS ClientHello stalls as soon as certificate chains exceed the tunnel MTU, and connections hang indefinitely in a Path MTU Discovery (PMTUD) blackhole.
Always permit essential RFC 4890 ICMPv6 control types alongside your default-deny inbound rules in nftables (and review external port rules visually in the Network Builder):
# /etc/nftables.conf excerpt: safe dual-stack ICMPv6 survival rules
table inet filter {
chain input {
type filter hook input priority filter; policy drop;
iif "lo" accept
ct state established,related accept
# Mandatory IPv6 PMTUD, Neighbor Discovery, and Router Advertisements
ip6 nexthdr icmpv6 icmpv6 type {
destination-unreachable,
packet-too-big,
time-exceeded,
parameter-problem,
nd-router-advert,
nd-neighbor-solicit,
nd-neighbor-advert
} accept
icmp type { destination-unreachable, time-exceeded, echo-request } limit rate 10/second accept
tcp dport { 22, 443 } accept
}
}
If an upstream dependency publishes a broken AAAA DNS record on a host where Happy Eyeballs isn't implemented (for example, legacy CLI scripts or custom Python sockets iterating socket.getaddrinfo sequentially), you can temporarily prefer IPv4 system-wide without disabling the inet6 kernel stack (which breaks local sockets bound to ::1) by uncommenting precedence ::ffff:0:0/96 100 in /etc/gai.conf. You can also inspect live DNS A/AAAA resolution and CIDR blocks anytime with our Free Network & Developer Tools.
/25 IPv4 block or a /56 IPv6 block over global BGP?Global internet transit providers and IXP route servers filter out IPv4 prefixes more specific than /24 and IPv6 prefixes more specific than /48 to prevent the global BGP Forwarding Information Base (currently ~1 million IPv4 routes and ~220,000 IPv6 routes) from overflowing hardware router TCAM memory. Smaller allocations like /29 IPv4 or /56 IPv6 must remain aggregated inside your upstream provider's larger BGP announcement.
100.64.0.0/10 instead of 10.0.0.0/8?RFC 6598 reserved 100.64.0.0/10 (100.64.0.0 through 100.127.255.255) for Carrier-Grade NAT between ISP CPE routers and provider NAT gateways. Engineering teams also use subnets inside 100.64.0.0/10 for WireGuard VPN meshes and Kubernetes pod overlays when employees connect from home networks, coffee shops, and corporate LANs that already use 10.0.0.0/8 and 192.168.0.0/16, avoiding split-tunnel route collisions.
ipv6.disable=1 on modern Linux servers?Passing ipv6.disable=1 on the kernel command line breaks systemd socket units, Postfix, Docker port-proxy listeners, and Node.js/Go services that bind dual-stack wildcard sockets ([::]:443) or expect ::1 in /etc/hosts. Keep the IPv6 stack enabled on loopback, enforce strict inet firewall rules, and tune /etc/gai.conf precedence if outbound IPv4 preference is temporarily needed.
Explore With AI & Cite This Page
Open a grounded prompt in your AI assistant or copy a clean Markdown, HTML, or APA reference link.
Validate protocols and subnets directly in your browser or continue reading related architecture notes.
Free IP Subnet Calculator & CIDR Cheat Sheet
What Is My IP — IPv4, IPv6, rDNS & Headers
Linux, Windows & Game Server Hardening Checklist
IPv4 VLSM Capacity Planning: RFC 1918 & RFC 6598 Address Allocation for Multi-Tier VPCs
Systems guide to Variable Length Subnet Masking (VLSM), bitwise CIDR boundary alignment, RFC 1918 vs RFC 6598 collision avoidance, cloud hypervisor reserved IPs, and Python ipaddress automation.
IP Subnetting & CIDR Arithmetic Guide: Bitwise Masks, Kernel FIB Tries & Route Aggregation
How CIDR subnet calculators work at the bit level: 32-bit bitwise AND/OR arithmetic, RFC 3021 /31 router links, Linux kernel fib_trie Longest-Prefix Match, supernet alignment traps, and Python ipaddress CLI recipes.
Inside a /24 Subnet Mask (255.255.255.0): Linux ARP Tables, Cloud SDN VPCs & Broadcast Domains
Why /24 (255.255.255.0) became the universal datacenter VLAN standard: classic 254 usable hosts vs hyperscaler SDN VPC reserved IPs (.1/.2/.3), Linux kernel ARP gc_thresh limits, and L2 packet walks.
East-West Network Segmentation: VLAN/VXLAN Isolation, Linux nftables & Default-Deny Security Groups
Systems engineering guide to east-west microsegmentation: 802.1Q VLAN vs VXLAN overlay encapsulation, O(1) Linux nftables verdict maps, Docker PREROUTING firewall bypasses, and default-deny SDN policies.