System Design Space
Knowledge graphSettings

Updated: April 21, 2026 at 3:20 PM

IPv4 and IPv6: the evolution of IP addressing

medium

IPv4 address scarcity, IPv6 differences, dual-stack migration, routing changes, and operational adoption risks.

This chapter matters because the 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 transition, NAT, routing, and operational risk so that migration does not become a permanent source of technical debt.

In interviews and architecture discussions, it helps frame stack choice and migration strategy as a long-horizon design 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)

The original IPv4 specification and the baseline principles of IP networking.

Перейти на сайт

IPv4 and IPv6 solve the same problem: packet addressing and routing in IP networks. But the difference between them stopped being just an address-length question a long time ago. This is really about the cost of network legacy, operational complexity, and how a platform will scale over time.

In real systems, migration is never just about switching protocols. Teams have to live with dual-stack, NAT, and often CGNAT, which erodes direct connectivity and makes incident diagnosis harder.

IPv6 also changes how you think about prefix allocation, SLAAC versus DHCPv6, neighbor discovery, and the routing model around BGP and OSPF.

That is why migration always touches DNS, MTU behavior, firewall rules, external protection such as WAF and DDoS controls, plus observability, phased rollout, and explicit fallback strategy.

What matters about IPv4 and IPv6

IPv4

32-bit addressing with a limited global address pool. It remains the baseline internet protocol, but it no longer offers enough room to grow without operational workarounds.

IPv6

128-bit addressing, a cleaner prefix model, and a network design that does not depend on constant fights over public address space.

Why migration still matters

IPv4 scarcity pushes teams toward NAT and workaround-heavy operations, which makes troubleshooting and long-term scaling harder.

RFC

RFC 8200 (IPv6)

The current IPv6 specification: base header format, behavior, and implementation requirements.

Перейти на сайт

Key differences between IPv4 and IPv6

AspectIPv4IPv6Architecture impact
Address size32 bits128 bitsIPv6 removes the hard limit on globally routable address space.
Notation format192.0.2.102001:db8::10Logs, regular expressions, access-control rules, and operational tooling must understand the new format.
Address translationAlmost everywhereUsually unnecessaryTracing gets easier, but firewall quality and access policy discipline become more important.
AutoconfigurationUsually DHCPSLAAC and/or DHCPv6Provisioning can be faster, but address and prefix policy still needs to stay explicit.
CompatibilityHistoric baselineNo direct backward compatibilityIn practice you still need dual-stack or controlled transition mechanisms.

How IPv4 and IPv6 headers are structured

Below is the base header layout: IPv4 is usually 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, when present, increase header size beyond 20 bytes and may affect fast-path processing.

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 fixed base header.

RFC

RFC 4271 (BGP-4)

The baseline inter-domain routing specification; IPv6 routes are distributed through MP-BGP extensions.

Перейти на сайт

What changes in routing

Address model and route aggregation

IPv4: Address scarcity and NAT complicate end-to-end tracing and address planning.

IPv6: Global unicast addressing enables a cleaner prefix hierarchy and simpler route aggregation.

Architecture impact: It becomes easier to scale multi-region networks and reduce one-off routing rules.

Control plane and neighbor discovery

IPv4: ARP + ICMPv4 + OSPFv2 and BGP for the IPv4 address family.

IPv6: NDP (ICMPv6) + OSPFv3 + MP-BGP for IPv6 paths.

Architecture impact: Operations need explicit checks for RA/NDP behavior, IPv6 route announcements, and prefix filtering.

Traffic engineering and resilience

IPv4: Load balancing and failover are often tied to NAT-era workarounds.

IPv6: Paths are usually cleaner, but dual-stack requires separate IPv4 and IPv6 service-level tracking.

Architecture impact: Latency and loss should be measured per address family with an explicit fallback strategy.

Typical IPv4 traffic path

Client
Home router / CGNAT
ISP core
Transit / peering
Edge + NAT44
Service

Typical IPv6 traffic path

Client
IPv6 access
ISP core
Transit / peering
Edge / load balancer
Service

Related chapter

TCP protocol

Handshake, window management, and retransmissions on top of IP transport.

Open chapter

How IPv4 and IPv6 affect TCP

IPv4 and 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, it helps to separate those layers explicitly and explain how IP-level decisions shape TCP behavior.

  • IP determines path properties, while TCP adapts its sending rate to observed delay and loss.
  • Network changes such as MTU, NAT, and asymmetric paths directly affect RTT, retransmission rate, and TCP throughput.
  • In dual-stack systems, TCP behavior can diverge between IPv4 and IPv6, so metrics should be split by family.

What IPv6 gives you

  • Virtually unlimited address space without a NAT-heavy architecture.
  • Cleaner end-to-end connectivity for services, IoT, and p2p scenarios.
  • Simpler address planning and routing policy in large networks.
  • A healthier foundation for long-lived platform architecture.

Practical migration risks

  • Legacy readiness gaps in load balancers, access-control rules, monitoring, and log parsing.
  • Dual-stack increases the failure surface if operations are not disciplined.
  • Security baseline mistakes where IPv6 stays open 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: not a big-bang cutover, but a staged dual-stack rollout with measurements at every step.

  1. Run an inventory across DNS, CDN, WAF, load balancers, ingress, databases, observability, and external APIs.
  2. Enable dual-stack in non-critical environments and measure IPv4 and IPv6 metrics separately.
  3. Roll out AAAA records in stages: internal services first, then edge systems and public APIs.
  4. Validate security policy for both stacks: firewalls, SG/NACL, rate limiting, and DDoS protection.
  5. Update runbooks, alerts, rollback paths, and IPv6-specific incident playbooks.
  6. Only after stable behavior should you gradually increase the IPv6 traffic share.

Practical takeaway

IPv6 migration is not only an addressing exercise. It changes routing operations end to end: prefix policy, BGP announcements, dual-stack observability, and incident response playbooks. The earlier those concerns are built into platform design, the cheaper future growth and reliability become.

Related chapters

  • OSI model - helps localize IPv4/IPv6 incidents by layer instead of mixing network and transport concerns.
  • TCP protocol - shows how routes, MTU, and packet loss shape RTT, retransmissions, and throughput.
  • UDP protocol - matters for latency-sensitive paths and transport trade-offs over IPv4 and IPv6.
  • Domain Name System (DNS) - covers AAAA and A records, resolution strategy, and how DNS choices shape the real traffic path.
  • HTTP protocol - connects application behavior with staged dual-stack rollout and client-library behavior.
  • Load Balancing - how to build L4/L7 balancing and failover for both address families at the same time.
  • Remote call approaches - how addressing and routing shape retry behavior, timeout policy, and service resilience.
  • Multi-region and global systems - global routing, peering, and traffic policy in multi-region architecture.

Enable tracking in Settings