IP addresses: IPv4 vs IPv6 explained
What an IP address is, why IPv4 ran out, and how IPv6 fixes it — including shorthand and practical differences.
On this page
- What an IP address is
- IPv4: the address that ran out
- IPv6: the replacement
- Practical differences
- Why both still exist
- Should you care?
- Summary
- FAQ
- What is the main difference between IPv4 and IPv6?
- Why do we still use IPv4 if IPv6 is better?
- What is NAT and why does IPv6 not need it?
- How do you write IPv6 addresses in shorthand?
Every device on the internet needs an address — an IP address — so data knows where to go. This article explains IP addresses and why two versions exist.
What an IP address is
An IP address identifies a device (or a network interface) on the internet, like a street address for data. When you request a page, the request is addressed to the server's IP; the reply is addressed to yours.
Two versions exist today: IPv4 (the old one, still everywhere) and IPv6 (the replacement).
IPv4: the address that ran out
IPv4 addresses look like 192.168.1.1 — four numbers from 0 to 255, separated by dots. That gives 2^32 addresses: about 4.3 billion.
That sounds like a lot, but the internet has more devices than that. Phones, laptops, smart TVs, doorbells — each needs an address. IPv4 ran out in the 2010s, which is why things got complicated: addresses are reused (NAT — many devices share one public IP), and older networks became scarce and expensive.
IPv6: the replacement
IPv6 uses 128-bit addresses: 2^128 — enough for every device on Earth many times over. IPv6 addresses look like:
2606:4700::6810:84e5
They are written as eight groups of hex digits, separated by colons. Two shortcuts make them shorter:
- Leading zeros are dropped —
06810becomes6810. ::replaces one run of zero groups —2606:4700:0000:0000:0000:0000:6810:84e5becomes2606:4700::6810:84e5. A IPv6 address may contain::only once.
Practical differences
| IPv4 | IPv6 | |
|---|---|---|
| Size | 32-bit (4.3B) | 128-bit (virtually unlimited) |
| Format | 4 decimal groups | 8 hex groups |
| NAT needed | Usually | No (each device has its own) |
| Auto-config | DHCP | SLAAC (stateless) |
| Security (IPsec) | Optional | Built in |
Why both still exist
The internet is enormous and IPv4 infrastructure is everywhere — routers, servers, firewalls, enterprise networks. Moving everything to IPv6 takes time. Today most networks run dual-stack: both protocols operate in parallel, and the system prefers IPv6 when available.
Should you care?
For everyday users, mostly not — the network handles it. But it matters when debugging connections, reading server logs, or configuring networks. A site is IPv6-ready when your device can reach it over a 2606:... address without a translation layer.
Summary
IPv4 ran out of addresses, so IPv6 was created with a vastly larger space and better features. Both exist side by side thanks to dual-stack. Understanding the formats and the shorthand helps when reading logs and configuring networks — even if the internet hides most of it from you.
FAQ
What is the main difference between IPv4 and IPv6?
IPv4 uses 32-bit addresses (about 4.3 billion total) written as four decimal groups like 192.168.1.1. IPv6 uses 128-bit addresses (virtually unlimited) written as eight hexadecimal groups like 2606:4700::6810:84e5. IPv6 also includes built-in IPsec and stateless auto-configuration (SLAAC).
Why do we still use IPv4 if IPv6 is better?
The internet's IPv4 infrastructure is everywhere — routers, servers, firewalls, enterprise networks. Moving everything takes time. Most networks run dual-stack: both protocols in parallel, preferring IPv6 when available.
What is NAT and why does IPv6 not need it?
NAT (Network Address Translation) lets many devices share one public IPv4 address because IPv4 addresses ran out. IPv6 has enough addresses for every device to have its own public address, so NAT is unnecessary.
How do you write IPv6 addresses in shorthand?
Two shortcuts: drop leading zeros in each group (06810 → 6810) and use :: to replace one run of zero groups (2606:4700:0000:0000:0000:0000:6810:84e5 → 2606:4700::6810:84e5). An address may contain :: only once.
Sources
- Cloudflare Learning Center — IPv4 vs IPv6 (cloudflare.com/learning/dns/glossary/ipv4-address)
- IANA — IPv6 address space (iana.org)
Share this guide
Related guides
- How DNS works: a plain explanation
What happens when you type a web address? A simple walkthrough of DNS — domain hierarchy, resolvers, caching and TTL.
- What is a CDN? A plain explanation
Why web pages load fast everywhere: how content delivery networks cache files at the edge, route visitors to the nearest server, and protect sites from attacks.
- How HTTPS works: the lock icon explained
What actually happens when you see the padlock? Encryption, certificates and why every website should use HTTPS.