128 bits, written in eight groups
IPv4 has about 4.3 billion addresses and they ran out. IPv6 has 2 to the power 128. Type an address below to expand it, shorten it and see what kind it is.
Build the 40-byte header
The IPv6 header has a fixed size and no checksum. Change a field and the bytes change.
IPv4 against IPv6
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits | 128 bits |
| Header | 20 bytes plus options, 12 fields | 40 bytes fixed, 8 fields |
| Header checksum | Yes, recomputed at every hop | None: link layer and transport already check |
| Fragmentation | Routers may fragment | Only the sender fragments (path MTU discovery) |
| Options | In the header | Extension headers chained by Next header |
| Address configuration | DHCP or by hand | Stateless autoconfiguration (SLAAC) or DHCPv6 |
| Finding neighbours | ARP | Neighbour Discovery (ICMPv6) |
| Broadcast | Yes | No: multicast instead |
IPv4
IPv6
Each square metre
IPv6 addresses for every square metre of the Earth’s surface (510 million square kilometres)
Getting from IPv4 to IPv6
Dual stack
Hosts and routers run both protocols side by side and pick IPv6 when the other end has it.
Tunneling
An IPv6 packet rides inside an IPv4 packet (protocol 41, called 6in4) across IPv4-only networks. The tunneling page shows the same wrapping with real bytes.
Translation
A gateway (NAT64) converts between IPv6 and IPv4 headers so IPv6-only hosts can reach IPv4-only servers.
What a real machine looks like
Output of python3 lab.py --internet on the author’s laptop, addresses hidden. Run it on your own machine to see yours.
1. IPv6 addresses on this machine (interface, type, address, prefix length) lo loopback (::1) ::1/128 wlo1 link-local (fe80::/10), valid on this link only fe80::[hidden]/64 tailscale0 unique local (fc00::/7), private fd7a:115c:[hidden]/128 tailscale0 link-local (fe80::/10), valid on this link only fe80::[hidden]/64 br-d74921045334 link-local (fe80::/10), valid on this link only fe80::[hidden]/64 2. What the types mean link-local: every IPv6 interface has one, it never leaves the link (replaces ARP-style local talk). global unicast: a public address; the part after the first 64 bits is the interface identifier. this machine has a global IPv6 address: no 3. Loopback test (connect to ::1) server received: hello over IPv6 from ::1 4. One real IPv6 connection to the Internet (Google Public DNS, TCP port 53) could not connect: Network is unreachable (no working IPv6 route)
Reading it: the laptop has a link-local address on each interface and a private Tailscale address, but no global address, and a connection to a public IPv6 server failed with no route. Its current network does not offer IPv6, so this machine is not yet reachable over IPv6 even though its software supports it.