How the Internet works

The Internet Layer, chapter 10 of 36

IPv6: The Second Attempt

No server leased the laptop its IPv6 address, and no ARP found the router. One 134-byte multicast frame did both.

The resolver returned two addresses for www.example.net, and the default policy table of RFC 6724 ranks the IPv6 one, 2001:db8:c000:80::80, above 192.0.2.80. The laptop can wrap the same SYN in a header of 40 bytes instead of 20, with addresses four times as long and fewer fields. The dual-stack twin is about to leave the laptop as a 94-byte frame, 20 bytes longer than the reference IPv4 SYN.

40 bytes
the fixed IPv6 header, twice the size of IPv4's for addresses four times as long
134 bytes
one Router Advertisement: prefix, default router, router MAC address, and DNS server
40.70%
of 8-octet Hop-by-Hop probes to web servers lost on the way in 2014 and 2015 (RFC 7872)

Where each IPv4 field went

The IPv4 and IPv6 headers of our SYN at the same scale, 32 bits to a row. Step through or click a field to see what IPv6 kept, renamed, moved, or removed, then put an extension header behind the fixed header.

Why 128 bits, and who chose them?

In August 1990 Frank Solensky, Phill Gross, and Sue Hares projected that the Class B space would run out by March 1994 (RFC 1752, Section 2). The IPng directorate reviewed CATNIP, SIPP, and TUBA, and "all were found wanting to some degree" (RFC 1752, Section 1). SIPP was praised as "aesthetically beautiful", but the majority felt that its 64-bit addresses left too little space for the hierarchy of the future Internet (RFC 1752, Section 8.2).

After a retreat near Chicago in May 1994, Steve Deering and Paul Francis proposed to double SIPP's address to 16 bytes. RFC 1752, Section 10.2 reports no unanimity but "a clear majority" for 16 bytes.

Where did the options go?

They moved into a chain behind the fixed header. The Next Header field names either the transport protocol or an extension header, and each extension header has its own Next Header field (RFC 8200, Section 4). No node on the path may insert or delete one, and until the packet reaches its destination, only the Hop-by-Hop Options header may be processed.

A Type 0 Routing header could name the same two routers many times and make a packet bounce between them. Philippe Biondi and Arnaud Ebalard showed an 88-fold amplification at CanSecWest in 2007, and RFC 5095 deprecated the type the same year (RFC 5095, Section 1).

What is the 20-bit flow label for?

A source should give each transport connection its own label, chosen from an approximately uniform distribution and kept for all packets of the flow (RFC 6437, Section 3). A router or load balancer can then hash the label with the two addresses and spread flows over equal-cost paths without walking the extension header chain.

Our dump shows a label of 0 because scapy built it. By default, a Linux laptop takes a random hash for each connection and sets the top bit 0x80000, so its SYN carries a label between 0x80000 and 0xFFFFF [Linux2026].

Why is every LAN a /64?

Not because of routing: forwarding must work for any prefix length up to /128 (RFC 7608). The /64 comes from the interface identifier. RFC 4291, Section 2.5.1 requires 64-bit identifiers for all unicast addresses that do not start with binary 000, and SLAAC ignores a prefix whose length plus the identifier length is not 128.

The boundary was once expected at /80. O'Dell's "8+8" proposal and the expectation that 64-bit EUI-64 hardware addresses would replace 48-bit MAC addresses moved it. Ethernet kept 48 bits, but the boundary stuck: offered prefixes longer than /64 for autoconfiguration, FreeBSD, Linux, NetBSD, OpenBSD, and Windows all ignored them (RFC 7421, Section 4.3.1).

How does the laptop find the router without ARP?

Neighbor Discovery replaces ARP, ICMP Router Discovery, and ICMP Redirect with five ICMPv6 messages. Every one is sent with Hop Limit 255 and rejected with any other value, so a forged one cannot come from off the link (RFC 4861, Section 3.1). The home router multicasts a 134-byte Router Advertisement from fe80::1 to ff02::1, with the prefix 2001:db8:a001:1::/64, a Router Lifetime of 2700 seconds, the ISP resolver, and its own MAC address.

That last option saves the SYN a round trip. It puts the router into the neighbor cache in the state STALE (RFC 4861, Section 6.3.4), so the SYN goes straight to 00:00:5e:00:53:01 without a Neighbor Solicitation.

Why did the MAC address leave the address?

The original method copied it. Modified EUI-64 inserts ff:fe into the middle of the 48-bit MAC address and inverts the universal/local bit (RFC 4291, Appendix A), so our laptop's 00:00:5e:00:53:1a becomes 2001:db8:a001:1:200:5eff:fe00:531a. The same 64 bits then follow the laptop into every network it joins.

The repairs were random temporary addresses and, in RFC 7217, a keyed hash that stays the same on one network and differs on every other. RFC 8064, Section 3 made that the recommended default in 2017. The Linux kernel still defaults to EUI-64 and no temporary addresses [Linux2026].

laptopsolicited-node grouphome router fe80::1 DAD NS for the link-local addressRS to ff02::2RA to ff02::1: prefix, RDNSSDAD NS for 2001:db8:a001:1::23SYN, router MAC taken from the RA
From the book: From link-up to the first SYN on the home LAN

The book keeps asking

This chapter has 5,531 words and 11 questions. These 5 are answered only in the book and the audiobook.

  • What does the SYN look like behind an IPv6 header?
  • How is a 128-bit address organized?
  • How does the laptop give itself an address?
  • What is left for DHCPv6?
  • Which source address goes into the SYN?

Open the sources

  • RFC 8200 Internet Protocol, Version 6 (IPv6) Specification 2017, Internet Standard, STD 86
  • RFC 1752 The Recommendation for the IP Next Generation Protocol 1995, Proposed Standard
  • RFC 4291 IP Version 6 Addressing Architecture 2006, Draft Standard
  • RFC 4861 Neighbor Discovery for IP version 6 (IPv6) 2007, Draft Standard
  • RFC 4862 IPv6 Stateless Address Autoconfiguration 2007, Draft Standard
  • RFC 8981 Temporary Address Extensions for Stateless Address Autoconfiguration in IPv6 2021, Proposed Standard
  • RFC 7872 Observations on the Dropping of Packets with IPv6 Extension Headers in the Real World 2016, Informational
  • RFC 9915 Dynamic Host Configuration Protocol for IPv6 (DHCPv6) 2026, Internet Standard, STD 102

All 73 documents this chapter cites, each with a link to its publisher and a copy kept here.

The Internet Layer, chapter 11 of 36

MTU, Fragmentation, and the Black Hole

The Internet Layer, chapter 12 of 36

NAT, CGNAT, and the Middlebox Internet

The Internet Layer, chapter 13 of 36

Living with Two Protocols

Routing, chapter 14 of 36

Inside One Network: Forwarding, OSPF, and IS-IS

Routing, chapter 15 of 36

BGP: The Protocol That Holds It Together

Routing, chapter 16 of 36

Peering, Transit, and the Money

Routing, chapter 17 of 36

Securing the Routing System

Routing, chapter 18 of 36

MPLS and Segment Routing

Routing, chapter 19 of 36

Anycast and CDNs

Transport, chapter 20 of 36

UDP: Eight Bytes of Header

Transport, chapter 21 of 36

TCP: The Connection

Transport, chapter 22 of 36

Congestion Control: From Collapse to BBR

Transport, chapter 23 of 36

Beyond TCP: SCTP, DCCP, and Multipath

Names and Trust, chapter 24 of 36

DNS: The Namespace and the Wire Format

Names and Trust, chapter 25 of 36

Resolvers, DNSSEC, and Encrypted DNS

Names and Trust, chapter 26 of 36

TLS 1.3: The Handshake

Names and Trust, chapter 27 of 36

Certificates and the Web PKI

Applications, chapter 28 of 36

HTTP: Semantics and HTTP/1.1

Applications, chapter 29 of 36

HTTP/2: Multiplexing over One Connection

Applications, chapter 30 of 36

QUIC: A Transport in Userspace

Applications, chapter 31 of 36

HTTP/3: The Web on QUIC

Applications, chapter 32 of 36

Mail: SMTP and Forty Years of Patches

Applications, chapter 33 of 36

Time, Shells, and Files: NTP, SSH, Telnet, and FTP

The Whole Path, chapter 34 of 36

Measuring and Debugging the Path

The Whole Path, chapter 35 of 36

The Whole Journey, Byte by Byte

The Whole Path, chapter 36 of 36

Ossification and What Comes Next

You have reached the server. The book goes further.

Everything on this site is a short version. Follow the Packet is the long one: 36 chapters and about 280,000 words, with every protocol fact traced to the section of the standard that defines it, every byte dump built by a script you can run, and a directory of more than a thousand cited documents. It comes as a printable book and as an audiobook.

Hear how chapter 1 opens. 70 seconds, narrated by a synthetic voice.

Get the book or the audiobook Read the start of chapter 1 Browse every source

Cover of Follow the Packet: How the Internet Works, Layer by Layer, from ARPANET to QUIC, by Wolfgang Kerschbaumer

The signup uses double opt-in. Every message includes an unsubscribe link.

Published by Sysinit Press. The public addresses, AS numbers and names of the scenario come from ranges reserved for documentation, and the home network uses private addresses, so the site describes no real network. RFC texts are copied unchanged from the RFC Editor.