IPv4 vs IPv6: Differences, Formats and Why Both Exist
There are two versions of the Internet Protocol in use today: IPv4 and IPv6. Both identify devices on a network, but they differ in size, format and how they are deployed.
IPv4 vs IPv6 at a glance
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Format | Four decimal numbers separated by dots | Eight groups of hexadecimal separated by colons |
| Example | 203.0.113.25 | 2001:db8:85a3::8a2e:370:7334 |
| Total addresses | About 4.3 billion | About 3.4 × 1038 |
| NAT needed? | Very common | Not required |
| Built-in IPsec support | Optional | Part of the original design |
Why IPv6 was created
IPv4 offers roughly 4.3 billion addresses, which sounded like plenty in the 1980s. As phones, laptops, TVs and sensors came online, the free pool of IPv4 addresses ran out at the regional registry level. Network address translation (NAT) stretched the supply by letting many devices share one public address, but IPv6 solves the shortage properly with an address space so large that every device can have its own.
How to read an IPv6 address
An IPv6 address has eight groups of up to four hexadecimal digits. To keep them readable, two shortening rules apply:
- Leading zeros in a group can be dropped:
0db8becomesdb8. - One run of consecutive all-zero groups can be replaced by
::(only once per address).
So 2001:0db8:0000:0000:0000:0000:0000:0001 is written 2001:db8::1.
Which one are you using?
Many networks run both at once (called dual stack), and your device prefers IPv6 when it is available. The My IP page shows whether your connection is using IPv4 or IPv6. If you only see IPv4, your ISP or router may not have IPv6 enabled yet — that is still perfectly normal.