System Design Space
Knowledge graphSettings

Updated: March 24, 2026 at 11:23 AM

IPv4 and IPv6: the evolution of IP addressing

medium

The essence of IPv4/IPv6, key differences, risks and practical path of migration to IPv6.

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

AspectIPv4IPv6Architecture impact
Address size32 bits128 bitsIPv6 removes the hard system limit on the number of routable addresses.
Notation format192.0.2.102001:db8::10Logs, regex, ACL, and tooling must be updated for a new address format.
NATAlmost everywhereUsually unnecessaryTracing gets simpler, but firewall and access policy quality become more critical.
AutoconfigurationMostly DHCPSLAAC and/or DHCPv6Provisioning can be faster, but addressing policy needs to stay explicit.
CompatibilityHistoric baselineNot backward compatibleIn 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 bits

Ver

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 bits

Ver

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

Client
CPE/CGNAT
ISP Core
Transit/Peering
Edge + NAT44
Service

Typical IPv6 traffic path

Client
IPv6 Access
ISP Core
Transit/Peering
Edge/LB
Service

Related chapter

TCP protocol

Handshake, window control, and retransmissions over IP transport.

Open chapter

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.

  1. Run an inventory: DNS, CDN, WAF, LB, ingress, databases, observability, external APIs.
  2. Enable dual-stack in non-critical environments and measure IPv4/IPv6 metrics separately.
  3. Roll out AAAA records gradually: internal services first, then edge and public APIs.
  4. Validate security policy for both stacks: firewall, SG/NACL, rate limiting, DDoS controls.
  5. Update runbooks and alerts: diagnostics, rollback paths, IPv6 incident playbooks.
  6. 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.

Enable tracking in Settings