This chapter matters because the real story is not just address exhaustion, but long-lived infrastructure migration, compatibility, and the cost of network legacy.
In practice, it helps you plan address space, dual-stack transitions, NAT, routing, and operational risk so that migration does not turn into permanent technical debt.
In interviews and design reviews, it lets you discuss stack choice and migration strategy as a long-horizon architectural problem rather than a formal protocol upgrade.
Practical value of this chapter
Addressing strategy
Supports long-term address planning without creating migration technical debt.
Migration realism
Guides phased transition design with dual-stack compatibility and operational risk control.
Network scalability
Shows how addressing choices affect infrastructure growth and operational complexity.
Interview relevance
Provides strong reasoning for stack selection and migration strategy discussions.
RFC
RFC 791 (IPv4)
Original IPv4 specification and core Internet Protocol principles.
IPv4 and IPv6 solve the same problem: packet addressing and routing in IP networks. The difference is scale, operational complexity, and long-term sustainability: IPv4 relies on NAT and compromises, while IPv6 provides a durable foundation without address scarcity.
Core idea of IPv4 and IPv6
IPv4
32-bit addressing (about 4.3 billion addresses). The baseline Internet protocol, but the global address pool has been exhausted.
IPv6
128-bit addressing (virtually inexhaustible space), simplified routing, and modern-first networking capabilities.
Why migration is needed
NAT and workaround-heavy IPv4 operations increase complexity, break end-to-end visibility, and degrade observability.
RFC
RFC 8200 (IPv6)
Current IPv6 specification: format, behavior, and protocol requirements.
Key differences
| Aspect | IPv4 | IPv6 | Architecture impact |
|---|---|---|---|
| Address size | 32 bits | 128 bits | IPv6 removes the hard system limit on the number of routable addresses. |
| Notation format | 192.0.2.10 | 2001:db8::10 | Logs, regex, ACL, and tooling must be updated for a new address format. |
| NAT | Almost everywhere | Usually unnecessary | Tracing gets simpler, but firewall and access policy quality become more critical. |
| Autoconfiguration | Mostly DHCP | SLAAC and/or DHCPv6 | Provisioning can be faster, but addressing policy needs to stay explicit. |
| Compatibility | Historic baseline | Not backward compatible | In practice you need dual-stack or controlled transition mechanisms. |
Header content visualization
Below is the base header layout: IPv4 is typically 20 bytes without options, while IPv6 keeps a fixed 40-byte base header and moves optional behavior into extension headers.
IPv4 Base Header
160 bitsVer
4 bits
IHL
4 bits
DSCP/ECN
8 bits
Total Len
16 bits
Identification
16 bits
Flags + Frag Offset
16 bits
TTL
8 bits
Protocol
8 bits
Hdr Checksum
16 bits
Source Address
32 bits
Destination Address
32 bits
IPv4 options (if present) increase header size beyond 20 bytes and may impact fast-path handling.
IPv6 Base Header
320 bitsVer
4 bits
Traffic Class
8 bits
Flow Label
20 bits
Payload Len
16 bits
Next Header
8 bits
Hop Limit
8 bits
Source Address [127:96]
32 bits
Source Address [95:64]
32 bits
Source Address [63:32]
32 bits
Source Address [31:0]
32 bits
Destination Address [127:96]
32 bits
Destination Address [95:64]
32 bits
Destination Address [63:32]
32 bits
Destination Address [31:0]
32 bits
Additional IPv6 behavior is encoded through extension headers after the base header.
RFC
RFC 4271 (BGP-4)
Inter-domain routing baseline; IPv6 routes are distributed with MP-BGP extensions.
What changed in traffic routing
Address model and route aggregation
IPv4: Address scarcity and NAT complicate end-to-end tracing and address planning.
IPv6: Global unicast space enables cleaner prefix hierarchy and route aggregation.
Architecture impact: It is easier to scale multi-region networks and reduce policy-routing exceptions.
Control plane and neighbor discovery
IPv4: ARP + ICMPv4 + OSPFv2/BGP (IPv4 AFI).
IPv6: NDP (ICMPv6) + OSPFv3 + MP-BGP for IPv6 paths.
Architecture impact: Operations need explicit RA/NDP checks, IPv6 announcements validation, and prefix filters.
Traffic engineering and resilience
IPv4: Load balancing and failover are often entangled with NAT-era workarounds.
IPv6: Paths are usually cleaner; dual-stack requires independent IPv4/IPv6 SLI/SLO tracking.
Architecture impact: Latency/loss should be measured per address family with controlled fallback behavior.
Typical IPv4 traffic path
Typical IPv6 traffic path
Related chapter
TCP protocol
Handshake, window control, and retransmissions over IP transport.
IPv4/IPv6 interaction with TCP
IPv4/IPv6 handle addressing and packet delivery between hosts, while TCP runs on top of IP to provide reliability, byte ordering, and congestion control. In interviews and design docs, explicitly separating these layers demonstrates stronger troubleshooting and trade-off reasoning.
- IP selects path properties, while TCP adapts throughput to observed delay and loss.
- Network changes (MTU, NAT, asymmetric paths) directly affect RTT, retransmit rate, and throughput.
- In dual-stack systems, TCP behavior can diverge between IPv4 and IPv6, so metrics must be split by family.
IPv6 capabilities
- Virtually unlimited address space for growth without a NAT-heavy architecture.
- Cleaner end-to-end connectivity for services, IoT, and p2p scenarios.
- Simpler route policy and address planning in large networks.
- A healthier long-term foundation for platform architecture.
Real-world risks
- Legacy readiness gaps: old load balancers, ACLs, monitoring, and regex parsers for logs.
- Dual-stack increases the failure surface if operations are not disciplined.
- Security baseline mistakes: open IPv6 paths while IPv4 is properly locked down.
- Some external integrations are still IPv4-only.
How to migrate to IPv6 safely
The practical path is almost always gradual: dual-stack rollout with measurements, not a big-bang cutover.
- Run an inventory: DNS, CDN, WAF, LB, ingress, databases, observability, external APIs.
- Enable dual-stack in non-critical environments and measure IPv4/IPv6 metrics separately.
- Roll out AAAA records gradually: internal services first, then edge and public APIs.
- Validate security policy for both stacks: firewall, SG/NACL, rate limiting, DDoS controls.
- Update runbooks and alerts: diagnostics, rollback paths, IPv6 incident playbooks.
- Only after stable SLOs, increase IPv6 traffic share step by step.
Practical takeaway
IPv6 migration is not only an addressing task. It changes routing operations end to end: prefix policy, BGP announcements, dual-stack observability, and incident response playbooks. The earlier these concerns are included in platform design, the cheaper growth and reliability become over time.
Related chapters
- OSI model - helps localize IPv4/IPv6 issues by layer and separate network from transport concerns.
- TCP protocol - shows how IP routing, MTU, and loss affect RTT, retransmits, and throughput.
- UDP protocol - important for latency-sensitive paths and transport trade-offs over IPv4/IPv6.
- Domain Name System (DNS) - covers AAAA/A records, resolution strategy, and real traffic impact.
- HTTP protocol - connects application protocol behavior with dual-stack rollout realities.
- Load Balancing - how to design L4/L7 balancing and failover for IPv4 and IPv6 in parallel.
- Remote call approaches - how addressing and routing shape retry/timeout strategy and service resilience.
- Multi-region and global systems - global routing, peering, and traffic policy in multi-region architecture.
