IPv6 Addressing & Dual Stack
IPv6 address format, address types, SLAAC vs DHCPv6, NDP, dual-stack vs NAT64, and Kubernetes dual-stack clusters.
Overview
Overview IPv6 uses 128-bit addresses written as eight 16-bit groups in colon-hex notation (e.g., 2001:0db8:85a3::8a2e:0370:7334). Leading zeros in each group can be omitted, and one consecutive run of all-zero groups can be replaced with ::.
Address types: - Link-local (fe80::/10): auto-configured, not routable, used on-link for NDP. Every interface has one. - Global unicast (2000::/3): globally routable, equivalent to IPv4 public addresses. - Unique local (fc00::/7): like RFC 1918, not globally routable. - Multicast (ff00::/8): replaces IPv4 broadcast. NDP uses multicast for neighbor discovery. - Anycast: same address assigned to multiple nodes; routing delivers to nearest.
Address configuration: - SLAAC (Stateless Address Autoconfiguration): host generates its own address from the link-local prefix + EUI-64 (derived from MAC). No DHCP server needed. Router sends RA (Router Advertisement) with prefix. - DHCPv6: like DHCPv4 but stateful. Assigns addresses from a pool. Required when you need to control specific assignments.
NDP (Neighbor Discovery Protocol): replaces ARP. Uses ICMPv6 multicast instead of broadcast. Key messages: Router Solicitation (RS), Router Advertisement (RA), Neighbor Solicitation (NS), Neighbor Advertisement (NA).
Dual-stack runs IPv4 and IPv6 simultaneously. A host gets both addresses and prefers IPv6 (Happy Eyeballs RFC 8305). NAT64 + DNS64 translates IPv6-only client connections to IPv4 backends — the DNS64 resolver synthesizes AAAA records for IPv4-only destinations.
Kubernetes dual-stack (stable in 1.23): pods and services get both IPv4 and IPv6 addresses. Requires two pod CIDRs, two service CIDRs, and a CNI that supports dual-stack (Calico, Cilium).
Key concepts
- EUI-64
- SLAAC
- NDP
- NAT64 / DNS64
- Happy Eyeballs
Interview questions
- What is the difference between SLAAC and DHCPv6, and when do you use each?
- How does Kubernetes dual-stack work, and what changes when you enable it?
Sign up free to read the full topic
More Networking topics
Start free on Cariara · Coding problems · System design studio