IPv4 vs IPv6 — why the internet needed more addresses
IPv4's 32 bits allow for about 4.3 billion addresses — a number the internet has already run out of. IPv6 exists to fix that permanently, and understanding the difference explains why NAT became so important, and why you'll still see both formats for years to come.
Beginner
2 min read
IPv4 ran out of room
Every IPv4 address you've seen so far in this domain (192.168.1.5,
93.184.216.34) is a 32-bit number, written as four bytes separated by dots.
32 bits allows for 2³² addresses — about 4.3 billion, which sounded
enormous in the 1980s and is nowhere near enough for a world of phones,
laptops, servers, and IoT devices all needing their own address. The
available pool of public IPv4 addresses has effectively run out.
This exhaustion is a big part of why NAT became so essential — it's not
just a home-router convenience, it's the mechanism that let millions of
private devices share one shrinking pool of public IPv4 addresses instead of
each needing their own.
IPv6: the permanent fix
IPv6 uses 128-bit addresses instead of 32 — that's 2¹²⁸ possible
addresses, a number large enough that address exhaustion isn't a realistic
concern again. IPv6 addresses look completely different from IPv4:
Written as eight groups of hex digits separated by colons, instead of four
decimal bytes separated by dots. Two shorthand rules make them less painful
to read and write:
Leading zeros in any group can be dropped (0db8 → db8).
One run of consecutive all-zero groups can be collapsed to :: (used
at most once per address, since two :: would make the expansion
ambiguous) — 2001:0db8:0000:0000:0000:0000:0000:0001 becomes
2001:db8::1.
Practical differences that actually show up
No NAT required — IPv6's address space is large enough that every
device really can have its own globally routable address, removing the
original reason NAT existed (though NAT-like techniques can still be used
for other reasons, like network segmentation).
:: as a bind address — binding a server to :: in IPv6 means "listen
on every interface," the direct equivalent of 0.0.0.0 in IPv4.
A separate DNS record type — a domain's IPv4 address lives in an A
record; its IPv6 address lives in a separate AAAA record. A server can
(and often does) have both simultaneously.
Dual-stack, not a hard cutover — most real networks run IPv4 and IPv6
side by side today. A client and server negotiate whichever both support,
which is why IPv6 adoption has been a decades-long gradual transition
rather than a single flag-day switch.
Why this matters day to day
Seeing a ::1 in a log (IPv6's loopback address, equivalent to IPv4's
127.0.0.1) or an AAAA record in a DNS lookup isn't a bug — it's just the
other address family already in use alongside IPv4. Cloud providers and
CDNs already serve plenty of traffic over IPv6, so recognizing the format
on sight, rather than assuming every address must look like four dotted
numbers, is worth having internalized.