IPv4 vs IPv6
How IPv4 and IPv6 differ, why both exist and how to tell which you use.
There are two versions of the Internet Protocol in use today. Most of the internet supports both, and many connections have one address of each kind.
| IPv4 | IPv6 | |
|---|---|---|
| Example | 203.0.113.42 | 2001:db8:85a3::8a2e:370:7334 |
| Size | 32 bits | 128 bits |
| Total addresses | About 4.3 billion | About 3.4 × 1038 |
| Written as | Four decimal numbers separated by dots | Eight groups of hex digits separated by colons; runs of zeros shorten to :: |
| Sharing | Usually shared by a whole household via NAT | Each device can have its own public address |
Why IPv6 exists
IPv4 ran out of new addresses years ago. Providers stretch the remaining supply with NAT, sometimes sharing one address among many customers (carrier-grade NAT, which uses the 100.64.0.0/10 range). IPv6 solves the shortage with an enormous address space.
Which one am I using?
If your network supports both, your device generally prefers IPv6 and falls back to IPv4. A website only sees the address used for that particular connection. Our My IP page shows the address your visit came from, and the API lets you force either one with curl -4 or curl -6.
Related
- What is an IP address?
- What is DNS? (A records hold IPv4 addresses, AAAA records hold IPv6)