IPv4 vs IPv6: Why We Ran Out of Addresses

IPv4 vs IPv6: Why We Ran Out of Addresses

Type 192.168.1.1 into an IP address converter and it returns 3232235777, plus a matching string of 32 bits. That is not a party trick. An IPv4 address is a 32-bit integer wearing four decimal labels, and the shortage follows directly from that width.

Two to the power of 32 is 4,294,967,296. Before a single public address was handed out, chunks were reserved for private networks, loopback, multicast, and experiments. Early allocation was coarse — institutions received blocks far larger than they needed. By the time anyone did the accounting properly, the central pool had handed out its last blocks. That was over a decade ago; recycling and NAT have stretched the rest.

Same job, different width

IPv6 keeps the job and changes the width: 128 bits, about 3.4 × 10^38 addresses — roughly 7.9 × 10^28 times the IPv4 space. That headroom means a home network can give every device a globally routable address instead of hiding behind one shared public IP.

Property IPv4 IPv6
Width 32 bits 128 bits
Total addresses 4,294,967,296 about 3.4 × 10^38
Written as 192.168.1.1 2001:db8::1
Typical home range 192.168.0.0/16 fd00::/8 (unique local)
Status original protocol, exhausted successor, in production

Why we didn’t just widen IPv4

Because “IPv4” is not a document you can edit. Routers, firewalls, and packet parsers on every hop have 32-bit fields baked into their logic and silicon. NAT bought two decades: your router holds one public address and rewrites traffic for every device behind it. It broke end-to-end connectivity and made port forwarding a chore. IPv6 restores end-to-end addressing; most devices now run both stacks, with DNS serving A and AAAA records side by side.

Checking addresses without guessing

The IP address converter takes a dotted IPv4 address and returns the 32-bit integer and dotted binary, all in your browser. It is IPv4-only — paste an IPv6 address and it reports an invalid IP. For subnet arithmetic and ACL comparisons, the integer form is the useful one.

The IP lookup tool sends the address to an external API (api.ip.sb) and returns country, region, city, ISP, ASN, and coordinates. Two limits: geolocation is city-level at best, often worse on mobile networks, and the request only works for public addresses — a private address belongs to your own network, not a database.

The practical rule

Compare IPv4 addresses as integers, not strings. 3232235777 > 3232235521 is obvious; 192.168.1.1 vs 192.168.0.1 makes you stop and think. Your router’s ACL is doing the integer comparison anyway.