IPv4 and IPv6: what is the difference?
IPv4 and IPv6 are two versions of the same idea: a numbering plan for every device on the internet. IPv6 exists because IPv4 ran out of numbers.
Why two versions exist
IPv4 was designed in the early 1980s, when the internet joined a few thousand computers. An IPv4 address is a 32-bit number, which gives 2 to the power 32, or about 4.3 billion, possible addresses. That looked endless then. With billions of phones, computers, televisions and meters now online, it is far too few.
IPv6 uses a 128-bit number. That gives about 340 undecillion addresses (a 39-digit number): enough to give every grain of sand on Earth its own address many times over. The shortage cannot happen again.
There was an "IPv5", but it was an experimental protocol for streaming that never went into general use, so the next version was numbered 6.
Side by side
| IPv4 | IPv6 | |
|---|---|---|
| Length | 32 bits | 128 bits |
| How it is written | Four decimal numbers with dots: 198.51.100.14 | Eight groups of hex digits with colons: 2001:db8::14 |
| Number of addresses | About 4.3 billion | About 3.4 × 10^38 |
| Sharing one address between many devices (NAT) | Very common | Not needed |
| Automatic set-up | Needs a DHCP server (your router) | A device can make its own address from the network's prefix |
| Private ranges | 10.x.x.x, 172.16 to 172.31.x.x, 192.168.x.x | fc00::/7 (addresses starting fc or fd) |
How to read an IPv6 address
A full IPv6 address has eight groups of four hex digits. Hex digits run 0 to 9 and then a to f. Two rules make it shorter:
- Leading zeros in a group can be dropped:
0db8becomesdb8. - One run of all-zero groups can be replaced by a double colon
::, but only once in an address.
So 2001:0db8:0000:0000:0000:0000:0000:0001 is written 2001:db8::1. Our IPv6 expand and shorten tool does this in both directions.
Do the two work together?
Not directly. An IPv4-only device cannot talk to an IPv6-only server. In practice this is hidden from you: most networks run both side by side ("dual stack"), and your device simply uses whichever one works, usually preferring IPv6. Some mobile networks are IPv6-only inside and translate when you visit an IPv4-only website.
Is IPv6 faster or safer?
Neither by itself. Speed depends on the route your data takes, and on some networks IPv6 is slightly quicker because it avoids the address sharing that IPv4 needs. Security depends on the firewall in your router and device, not on the version. One real difference: with IPv6, each device at home can have its own public address, so the router's firewall, not address sharing, is what keeps strangers out. Home routers block unasked incoming connections by default.
Do I need to do anything?
No. If your provider and router support IPv6, it is already on. If the home page shows "Not available on this connection" beside IPv6, your provider or router has not turned it on. Everything still works over IPv4.
Why did the IPv4 addresses run out?
The central pool was handed out completely in 2011, and the regional registries have run dry since then. Providers now share one IPv4 address between many customers, which is called carrier-grade NAT.
Can I turn IPv6 off?
You can, in the router or the device, but there is rarely a reason to. Turning it off does not make a connection safer or faster.