Skip to content

Metadata Card

AttributeContent
VolumeVol 4 — Computer Networking
ChapterChapter 13: IPv6 Basics
PrerequisitesChapter 9 (Network Layer: IPv4 header, CIDR, NAT, ICMP)
NextChapter 14: Network Performance & Optimization
Theory Depth(3/5)
Python Relevance≈60%; socket programming, scapy ICMPv6 packet construction
Core Concepts128-bit address space, NDP, SLAAC, AAAA records, dual stack, NAT64
Code~120 lines

Your Progress

"The post road faces a fundamental problem: there aren't enough post road coordinates. IPv4's 32-bit spell coordinates ran out long ago; portal address translation (NAT) is just a temporary workaround. IPv6 uses 128-bit array coordinates to give every grain of magic sand a unique post road address."

IPv4 Address Exhaustion Timeline

2011 Feb: IANA allocated last 5 /8 blocks to five RIRs
2011 Apr: APNIC (Asia-Pacific) exhausted
2012 Sep: RIPE NCC (Europe) exhausted
2014 Jun: LACNIC (Latin America) exhausted
2015 Sep: ARIN (North America) exhausted
2019 Nov: RIPE completely exhausted

NAT — a temporary workaround: 1 public IP can serve hundreds of internal devices via port translation + state table. But at a cost: breaks end-to-end model, external can't initiate connections, complex NAT traversal.

IPv6's core philosophy: Restore the internet's original design — every device gets a globally reachable IP.

IPv6 Header — What Was Removed, What Was Added

IPv6 header: Fixed 40 bytes (no IHL, no checksum, no router fragmentation).

FeatureIPv4IPv6
Header size20-60 bytes (IHL + Options)Fixed 40 bytes
Address length32 bits128 bits
ChecksumRecalculated per hopRemoved (relies on upper layers)
FragmentationRouters can do itSender does it (Path MTU Discovery)
OptionsInside header, variable lengthMoved to extension headers (Next Header chain)
IHLNeededRemoved (fixed length)
Flow LabelAdded (QoS marking)

Design philosophy:

  1. Removed checksum: Link layer has CRC, upper layers have checksums. IP recalculating is redundant.
  2. No router fragmentation: Sender must do Path MTU Discovery. If larger packets are needed, use extension headers.
  3. Extension header chain: Optional features in extension headers, linked by Next Header. Routers don't need to parse them.

IPv6 Address Representation

128 bits, written as colon hexadecimal:

Full:      2001:0db8:85a3:0000:0000:8a2e:0370:7334
Simplified: 2001:db8::8a2e:370:7334

Three simplification rules:

  1. Leading zeros in each 16-bit segment can be omitted
  2. One contiguous block of zero segments can be replaced with :: (only once!)
  3. IPv4-mapped addresses: ::ffff:192.168.1.1

Address Types

TypePrefixPurpose
Global Unicast2000::/3Internet-routable
Unique Localfc00::/7Private (like 10.0.0.0/8)
Link-Localfe80::/10Single subnet, auto-configured
Loopback::1Like 127.0.0.1
Unspecified::Like 0.0.0.0
Multicastff00::/8One-to-many

NDP — Neighbor Discovery Protocol

Replaces ARP in IPv6. Uses ICMPv6 (types 133-137):

  • Neighbor Solicitation/Advertisement (like ARP)
  • Router Solicitation/Advertisement (network configuration)
  • Redirect (better path notification)

SLAAC — Stateless Address Autoconfiguration

Routers advertise prefixes; hosts generate their own interface identifier (EUI-64 from MAC, or privacy extensions). No DHCP server needed.

Transition Technologies

TechnologyHow It WorksBest For
Dual StackBoth IPv4 and IPv6 stacksGradual transition
TunnelingIPv6 packets inside IPv4 (6to4, Teredo)When only IPv4 infrastructure exists
NAT64/DNS64Translate IPv6 → IPv4 at gatewayIPv6-only clients accessing IPv4-only servers

Traveler's Notes

IPv6 was designed in 1998 but took over 20 years for large-scale deployment. Not because IPv6 is bad, but because NAT + CIDR extended IPv4's lifespan and global hardware/software upgrades require economic as well as technical decisions. Today, major ISPs and cloud providers are all IPv6-ready. The transition isn't "if" but "when" — and for many networks, it's already happening.

Built with VitePress | Software Systems Atlas