Networking

IPv4 vs IPv6: Why the Internet Needed a New Address System

Why IPv4 ran out of addresses, how IPv6 fixes it with 128-bit addresses, how to read the shorter notation, and what NAT, dual-stack and the transition mean in practice.

For decades, every device on the internet got its address from one system: IPv4. Then the internet did something its designers never anticipated — it put billions of phones, laptops, cameras and smart bulbs online — and IPv4 simply ran out of room. IPv6 is the replacement built to never run out again. This article explains why the change was unavoidable, how the two differ, and why you have probably been using both without noticing.

Convert and inspect addresses in either version with the IPv4 / IPv6 tools.

The address shortage

An IPv4 address is 32 bits, which allows 2324.3 billion unique addresses. In the 1980s that seemed limitless. By the 2010s, with more devices than people coming online, the central pools of unallocated IPv4 addresses were formally exhausted. There were no more to hand out.

Two responses emerged: a stop-gap that stretched IPv4, and a permanent fix.

The stop-gap: NAT

Network Address Translation let many devices share one public IPv4 address. Your home router gives every device a private address and presents a single public one to the internet, translating between them. NAT is why “what is my IP” returns one address for your whole household — and it bought IPv4 years of extra life. But it adds complexity, breaks some peer-to-peer connections, and does not create new addresses; it only shares the ones we have.

The fix: IPv6’s 128 bits

IPv6 quadruples the address length to 128 bits, giving 2128 addresses — about 340 undecillion (3.4 × 1038). The number is so large it is effectively infinite: enough to give every grain of sand on Earth billions of addresses. Address scarcity, the problem that defined a decade of networking, simply disappears.

IPv4: 232 ≈ 4.3 × 109   |   IPv6: 2128 ≈ 3.4 × 1038

Reading an IPv6 address

IPv6 is written as eight groups of four hexadecimal digits, separated by colons:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

Two shorthand rules make them less unwieldy:

  • Drop leading zeros in each group: 0db8db8, 00000.
  • Collapse one run of all-zero groups to :: (once per address). So the address above becomes 2001:db8:85a3::8a2e:370:7334.

This is why you see compact addresses like ::1 (the IPv6 equivalent of localhost) or 2001:db8::1. The IPv6 tools expand and compress these for you.

Side by side

IPv4IPv6
Address size32 bits128 bits
Total addresses~4.3 billion~3.4 × 1038
NotationDecimal, dotted (192.168.1.1)Hex, colons (2001:db8::1)
Needs NAT?Yes, in practiceNo — every device can have a public address
ConfigurationManual or DHCPCan auto-configure itself

The transition: dual-stack

You cannot flip the whole internet overnight, so the two run side by side. Most networks are dual-stack: devices and servers speak both, using IPv6 when both ends support it and falling back to IPv4 otherwise. For users this is invisible — your phone has probably used both today without you choosing either.

💡IPv4 is not disappearing soon. Decades of equipment, software and habits depend on it, so the realistic future is a long coexistence — IPv6 growing steadily while IPv4 lingers behind NAT. Knowing both is part of understanding any modern network.

In practice

IPv6 is the answer to a problem IPv4 created by being too successful: the internet outgrew its address space. The new system trades familiar dotted decimals for longer hex addresses in exchange for a supply that will never run dry, plus simpler configuration and no mandatory NAT. Inspect, convert and compare addresses with the IPv4 / IPv6 tools, and see how addressing underpins the whole stack in IP Addressing Explained.

Frequently asked questions

What is the difference between IPv4 and IPv6?

IPv4 uses 32-bit addresses (about 4.3 billion total) written as four numbers like 192.168.1.1. IPv6 uses 128-bit addresses (a practically unlimited number) written as eight hexadecimal groups like 2001:db8::1. IPv6 exists because IPv4 ran out of addresses.

Why did IPv4 run out of addresses?

IPv4's 32 bits allow only about 4.3 billion addresses, designed when few imagined billions of phones, computers and smart devices online at once. Demand outgrew supply, and the central pools of unallocated IPv4 addresses were exhausted in the 2010s.

How many addresses does IPv6 have?

IPv6's 128-bit addresses give 2^128 — roughly 340 undecillion (3.4 × 10^38) — enough to assign trillions of addresses to every person on Earth and never run out. It removes address scarcity as a concern.

Do I need to switch to IPv6?

Most networks run "dual-stack", supporting both at once, so you generally do not have to do anything — your devices use IPv6 where available and IPv4 elsewhere. Over time more of the internet moves to IPv6, but IPv4 will be around for years yet.

What does the :: in an IPv6 address mean?

The double colon is shorthand for one run of all-zero groups, so you do not have to write them out. 2001:db8:0:0:0:0:0:1 becomes 2001:db8::1. You can only use :: once per address, because otherwise it would be ambiguous how many zero groups each one stands for.

Is IPv6 more secure than IPv4?

Not inherently in everyday use. IPv6 was designed with the IPsec security framework in mind, but security depends on configuration, not the address version. One practical difference: with IPv6 every device can have a public address (no NAT), so firewalls matter more — you can no longer rely on NAT to hide internal devices by accident.

Why do I still mostly see IPv4 addresses?

Because the transition is gradual and IPv4 is deeply embedded in decades of equipment and habits. Home networks still hand out 192.168.x.x private addresses, and NAT lets a whole household share one public IPv4 address, which took a lot of pressure off the shortage. IPv6 adoption keeps climbing, but the two will coexist for a long time.

Was this article helpful?