Skip to content

hop 15 of 32 · 5 min

The address space that does not run out

IPv4 has 4.3 billion addresses and they ran out. IPv6 has 128 bit addresses, which is about 340 undecillion, enough that exhaustion is not a consideration.

Writing one

code
2001:0db8:0000:0000:0000:ff00:0042:8329
2001:db8::ff00:42:8329          same address, shortened

Leading zeroes in a group are dropped, and one run of all zero groups becomes ::. Only one such run may be shortened, or the length would be ambiguous.

What changed besides size

No fragmentation by routers. The sender discovers the path MTU and sizes packets itself. Routers only forward.

No header checksum. The link layer and the transport layer both check, so a third check recomputed at every hop was removed. This makes forwarding cheaper.

Fixed 40 byte header. Options live in extension headers chained after it, so the common case is a fixed size parse.

No broadcast. Replaced by multicast, so a device that does not care is not interrupted.

Address autoconfiguration. A device can construct its own address from the router's advertised prefix, with no DHCP server involved.

No NAT, and what that changes

Every device can have a globally routable address, which restores end to end reachability. Peer to peer becomes straightforward again, and STUN and TURN become unnecessary.

It also means a device is reachable by default, so the firewall becomes the thing doing the protecting rather than NAT doing it as a side effect. That is a clearer design and requires actually configuring it.

Why the transition took so long

The two protocols are not interoperable. An IPv6 host cannot talk to an IPv4 host directly, so during the transition everything must support both, which is called dual stack and means running two networks.

Nobody gains from moving until enough others have, which is a coordination problem rather than a technical one. NAT relieved the pressure that would have forced it, so IPv4 with NAT kept working well enough for decades.

IPv4IPv6
Address32 bits128 bits
Header20 bytes, variable40 bytes, fixed
Fragmentationrouters maysender only
Checksumyesno
Address resolutionARPNeighbour Discovery
NATuniversalunnecessary

Mobile networks and large providers have largely moved, and adoption now runs at roughly 40 to 50 percent of traffic globally.