本文へ移動

IPv4 and IPv6

IPv4 gave the internet about four billion addresses. That sounded limitless in 1981 and ran out in 2011. IPv6 is the replacement, and for the last decade most connections have quietly run both at once.

The shapes

An IPv4 address is four numbers from 0 to 255, written with dots: 203.0.113.42. That is 32 bits, so 4,294,967,296 addresses in total.

An IPv6 address is 128 bits, written as eight groups of four hexadecimal digits: 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Runs of zeros are collapsed to '::', so that same address is normally written 2001:db8:85a3::8a2e:370:7334. The space is 340 undecillion addresses — enough that every network gets a block far larger than the whole of IPv4.

Why the exhaustion mattered

The response to running out was NAT: put a whole household, then a whole city, behind one address. NAT works, but it breaks the assumption the internet was designed around — that any host can address any other. Incoming connections need port forwarding, peer-to-peer protocols need relay servers, and abuse attribution becomes a shared-address problem.

IPv6 restores end-to-end addressing. That is its real benefit, more than the raw number: your devices can have globally unique addresses again.

Running both at once

Almost nothing is IPv6-only, so the near-universal arrangement is dual stack: your connection has both, and each site is reached over whichever family both ends support. A site with a AAAA record gets IPv6; one without falls back to IPv4.

This is why a page like this one can only report the family your request actually arrived on. To show both honestly it has to measure both, by asking one hostname that exists only over IPv4 and another that exists only over IPv6 — which is exactly what the dual-stack test on the front page does where it is configured.

Privacy differences worth knowing

Early IPv6 setups derived the second half of the address from the device's MAC address, which made a laptop trackable across every network it joined. Privacy extensions (RFC 8981) fixed that by generating temporary random addresses that rotate, and every current operating system uses them by default.

The other difference is scope: with NAT, everything in your house shares one address. With IPv6, each device usually has its own, which is better for reachability and means a site can distinguish your phone from your laptop where it previously could not.

更新: