IPv4 or IPv6: which are you using?
—
- Your IP address
- Internet provider
Read by this site’s own edge for this visit. Not kept, and no one else is asked.
Convert between IPv4 and IPv6
- IPv4-mapped
- NAT64
- 6to4 prefix
- As one number
- Full form
- Short form
- IPv4 inside
IPv4 and IPv6, side by side
| IPv4 | IPv6 | |
|---|---|---|
| Address size | 32 bits | 128 bits |
| How many | 4,294,967,296 (about 4.3 billion) | about 3.4 × 1038 |
| Written as | Four decimal numbers: 203.0.113.7 | Eight hexadecimal groups, zeros shortened: 2001:db8::7 |
| In a URL | http://203.0.113.7/ | In brackets: http://[2001:db8::7]/ |
| DNS record | A | AAAA |
| Header | 20 to 60 bytes, variable | 40 bytes, fixed, with optional extension headers |
| Header checksum | Yes | No - left to the layers above and below |
| Fragmentation | By the sender or by routers on the way | By the sender only |
| Smallest MTU every link must carry | 576 bytes to reassemble (68 to forward) | 1,280 bytes |
| Finding neighbours | ARP | Neighbor Discovery (ICMPv6) |
| Getting an address | DHCP, or set by hand | SLAAC, DHCPv6, or set by hand |
| Broadcast | Yes | No - multicast instead |
| Sharing one address | Common: NAT puts a home behind one public address | Rare: each device usually gets its own |
| Defined in | RFC 791, 1981 | RFC 1883 in 1995, then RFC 2460, now RFC 8200 (2017) |
The same idea in both: equivalent addresses
| IPv4 | IPv6 | |
|---|---|---|
| Loopback (this machine) | 127.0.0.1 (all of 127.0.0.0/8) | ::1 |
| Unspecified / any | 0.0.0.0 | :: |
| Default route | 0.0.0.0/0 | ::/0 |
| Private networks | 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 | fc00::/7 (in practice fd00::/8) |
| Link-local | 169.254.0.0/16 | fe80::/10 |
| Multicast | 224.0.0.0/4 | ff00::/8 |
| Every device on the link | 255.255.255.255 (broadcast) | ff02::1 (all-nodes multicast) |
| For documentation and examples | 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | 2001:db8::/32, 3fff::/20 |
| Shared by a provider (CGNAT) | 100.64.0.0/10 | None needed |
From the IANA special-purpose address registries. Check whether any address is private.
How IPv6 addresses are shortened
Two rules, from RFC 5952. Leading zeros in each group are dropped: 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8:0:0:0:0:0:1. Then the longest run of all-zero groups is replaced by ::, once: 2001:db8::1. Letters are written in lower case. The converter above shows any address both ways.
How IPv4 ran out
| 1981 | IPv4 defined in RFC 791. |
| 1993 | CIDR replaces class A, B and C networks, slowing the spending of IPv4. |
| 1995 | IPv6 first specified, in RFC 1883. |
| 1998 | IPv6 revised as RFC 2460. |
| 3 February 2011 | IANA hands its last five /8 blocks to the five regional registries. Its free pool of IPv4 is empty. |
| 15 April 2011 | APNIC, the Asia-Pacific registry, reaches its final /8. |
| 8 June 2011 | World IPv6 Day: major sites turn IPv6 on for 24 hours. |
| 6 June 2012 | World IPv6 Launch: they leave it on. |
| 14 September 2012 | RIPE NCC, for Europe and the Middle East, reaches its final /8. |
| 10 June 2014 | LACNIC, for Latin America, reaches its final /10. |
| 24 September 2015 | ARIN, for North America, runs out of free IPv4. |
| 2017 | AFRINIC, for Africa, enters its exhaustion phase. |
| 2017 | IPv6 becomes a full Internet Standard, RFC 8200. |
| 25 November 2019 | RIPE NCC makes its last ordinary /22 allocation. |
By the numbers: what the registries have handed out
Computed from every allocation the five regional internet registries have published (NRO delegated statistics, snapshot of ), the same records the map on the front page is drawn from.
| IPv4 handed out | 3,687,775,072 addresses: 85.9% of all IPv4, and 98.1% of everything below 224.0.0.0 - the rest of that is mostly private and reserved ranges no registry hands out. IPv4 is, for practical purposes, all spoken for. |
| IPv6 handed out | 496,573 blocks the size of a /32, about 0.0925% of the 2000::/3 range that all public IPv6 comes from. Put the other way: for every address handed out, about 1,080 more are still waiting. |
| Countries holding IPv4 | 238, led by the United States (43.6%), China (9.3%), Japan (5.1%), the United Kingdom (3.8%), Germany (3.4%). |
IPv4 by registry
| ARIN | 1,645,591,808 addresses | 44.6% |
| APNIC | 889,139,520 addresses | 24.1% |
| RIPE NCC | 854,641,184 addresses | 23.2% |
| LACNIC | 182,257,664 addresses | 4.9% |
| AFRINIC | 116,144,896 addresses | 3.1% |
IPv4 by the decade it was handed out
| Before 1990 | 205,607,936 addresses | 5.6% |
| 1990s | 1,104,335,360 addresses | 29.9% |
| 2000s | 1,314,781,568 addresses | 35.7% |
| 2010s | 877,955,104 addresses | 23.8% |
| 2020s | 185,095,104 addresses | 5.0% |
IPv6 by registry
| RIPE NCC | 182,339 /32s | 36.7% |
| ARIN | 144,745 /32s | 29.1% |
| APNIC | 140,986 /32s | 28.4% |
| LACNIC | 17,127 /32s | 3.4% |
| AFRINIC | 11,374 /32s | 2.3% |
Free to quote with a link to iphere.app/ipv4-vs-ipv6. Source data: the Number Resource Organization.
Questions
What is the difference between IPv4 and IPv6?
IPv4 addresses are 32 bits long, so there are about 4.3 billion of them, and they have all been handed out. IPv6 addresses are 128 bits, enough for every device to have its own. IPv6 also simplifies the packet header and drops broadcast. The two are not compatible on the wire: a device needs one or the other, or both, to reach a site.
Is IPv6 better than IPv4?
For the internet as a whole, yes: it removes the shortage that forced homes and phone networks behind shared addresses. For one connection, neither is reliably faster or safer. Speed depends on the route, and both carry the same encrypted traffic.
Which one am I using?
The answer at the top of this page is the one this visit actually used. When your network has both, most devices try IPv6 first and fall back to IPv4 if it answers more slowly.
Can an IPv4 address be written as IPv6?
Yes, in several standard ways. ::ffff:192.0.2.1 is the IPv4-mapped form (RFC 4291), and 64:ff9b::192.0.2.1 is how an IPv6-only network reaches it through NAT64 (RFC 6052). The converter above works them out for any address.
Why is IPv4 still used if it ran out?
Because almost everything already speaks it, and NAT lets many devices share one public address. Running out made IPv4 addresses expensive - they are bought and sold - rather than unusable. IPv6 grows alongside it instead of replacing it overnight.
Should I turn IPv6 off?
Usually not. Modern systems are built expecting it, and turning it off can slow some connections or break features. If a particular network misbehaves over IPv6, that is a problem to fix in that network.
See also
What is my IPv6 address? · CIDR and subnet calculator · What is my IP address, and the map of the whole address space around it, drawn from the same registry records.
Updated . Standards: RFC 791 (IPv4), RFC 8200 (IPv6), RFC 4291 (IPv6 addressing), RFC 5952 (IPv6 text form), RFC 6052 (NAT64).