The Plain Picture#
A city runs out of 6-digit phone numbers. Instead of juggling tricks forever, it switches to 12-digit numbers — enough for every person, every car and every lamp post, forever.
The Real Name#
IPv6 uses 128-bit addresses instead of IPv4's 32 bits. That's 2¹²⁸ ≈ 3.4 × 10³⁸ addresses — effectively unlimited. It's written as 8 groups of 4 hex digits (How Computers Work Ch 3), separated by colons:
2001:0db8:0000:0000:0000:0000:0000:0001Two shortening rules:
Leading zeros in a group can be dropped:
0db8→db8,0001→1.One run of all-zero groups can be replaced by
::.
2001:0db8:0000:0000:0000:0000:0000:0001 → 2001:db8::1Useful IPv6 addresses: ::1 is loopback (like 127.0.0.1); addresses starting fe80: are link-local
(like 169.254.x.x); 2001:db8::/32 is reserved for documentation examples.
Under the Hood#
CIDR works the same way (
2001:db8:abcd::/48). The standard subnet size is /64 — that leaves 64 host bits, 18 billion billion addresses per subnet.Because there are so many addresses, every device can have a public address — no NAT needed. Your phone on mobile data very likely has one already.
Adoption is gradual: roughly 40–50% of traffic reaching Google uses IPv6 (it varies by country; India is among the highest, largely because of its mobile networks). Most systems run dual-stack — both IPv4 and IPv6 at the same time.
Gotchas
::may appear only once in an address; otherwise you couldn't tell how many zero groups each one hides.No NAT doesn't mean no firewall. With public addresses on every device, firewall rules (Security Fundamentals) matter even more.
Check yourself
3 questionsHow many bits is an IPv6 address?
Show answerHide answer
128.
Shorten 2001:0db8:0000:0000:0abc:0000:0000:0001.
Show answerHide answer
2001:db8::abc:0:0:1. Both zero runs are two groups long; when runs tie, the standard (RFC 5952)
compresses the first one, and the other is written as 0:0. 2001:db8:0:0:abc::1 is also valid, just
not the standard form.
What's the IPv6 loopback address?
Show answerHide answer
::1.