IPv4 vs IPv6: What's the Difference?
The internet runs on two versions of the Internet Protocol: IPv4, which has been in use since 1981, and IPv6, its successor designed to solve the address exhaustion crisis. Both coexist today, and understanding their differences is essential for anyone building or operating networked systems.
IPv4: The Foundation
IPv4 was defined in RFC 791 (1981) and uses 32-bit addresses written in dotted-decimal notation: four octets separated by dots, each ranging from 0 to 255. 8.8.8.8, 1.1.1.1, and 192.168.1.1 are all IPv4 addresses. The 32-bit address space provides 232 = approximately 4.3 billion unique addresses.
The global IPv4 address pool was officially exhausted in February 2011, when IANA allocated the last five /8 blocks (one each to the five Regional Internet Registries). APNIC (Asia-Pacific) reached its own exhaustion in 2011, RIPE NCC (Europe/Middle East) in 2019, ARIN (North America) in 2015, LACNIC (Latin America) in 2014, and AFRINIC (Africa) in 2021. New addresses are now obtained only through transfers from existing holders, at market prices of $30–60 per address in 2025.
IPv6: The Successor
IPv6 was standardized in RFC 2460 (1998), updated by RFC 8200 (2017). It uses 128-bit addresses written in eight groups of four hexadecimal digits separated by colons. Consecutive groups of zeros can be compressed with ::, so 2606:4700:0000:0000:0000:0000:0000:1111 compresses to 2606:4700::1111.
The 128-bit space provides 2128 ≈ 3.4 × 1038 unique addresses — roughly 340 undecillion. For perspective: that is about 50 octillion addresses per person on Earth, or 340 trillion addresses per square millimeter of the Earth's surface. Address scarcity is not a concern for IPv6.
Header Comparison
Key Technical Differences
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Address notation | Dotted decimal (192.0.2.1) | Hex colon (2001:db8::1) |
| Header size | 20–60 bytes (variable) | 40 bytes (fixed) |
| Header checksum | Yes (recomputed each hop) | No (TCP/UDP handle integrity) |
| Fragmentation | Routers and hosts | Hosts only (via fragment extension header) |
| Broadcast | Yes | No (replaced by multicast) |
| Address config | DHCP or manual | SLAAC, DHCPv6, or manual |
| NAT requirement | Common (address scarcity) | Not needed (vast address space) |
| IPsec | Optional extension | Defined in protocol, optional in practice |
| Loopback | 127.0.0.1 | ::1 |
IPv6 Address Types
IPv6 defines several special address categories:
- Global unicast — Publicly routable, equivalent to public IPv4 addresses. Currently allocated from
2000::/3. Example: 2606:4700::1111 (Cloudflare DNS). - Link-local — Automatically configured on every IPv6 interface from the
fe80::/10range. Not routable beyond the local link. Used for neighbor discovery and router advertisements. - Unique local —
fc00::/7— analogous to RFC 1918 private addresses in IPv4. Used within organizations, not routable on the public internet. - Loopback —
::1— equivalent to IPv4's 127.0.0.1. - Multicast —
ff00::/8— replaces IPv4 broadcast.ff02::1is all nodes on the local link;ff02::2is all routers. - IPv4-mapped —
::ffff:0:0/96— used by dual-stack implementations to represent IPv4 addresses as IPv6.
Stateless Address Autoconfiguration (SLAAC)
One of IPv6's most practical features is SLAAC (RFC 4862). A device can configure its own global IPv6 address without a DHCP server:
- The device generates a link-local address from its interface identifier (derived from its MAC address or a privacy-preserving random value)
- It performs Duplicate Address Detection (DAD) using Neighbor Discovery Protocol (NDP) to ensure the address is unique on the link
- It listens for Router Advertisement (RA) messages from the local router, which include the network prefix and default gateway
- It combines the router's prefix with its interface identifier to form a full global address
Privacy extensions (RFC 8981) generate random, time-limited interface identifiers instead of MAC-derived ones, preventing tracking across networks.
IPv6 in BGP
BGP carries both IPv4 and IPv6 routing information using the MP-BGP extensions defined in RFC 4760. IPv6 prefixes are carried in the MP_REACH_NLRI and MP_UNREACH_NLRI attributes. The global IPv6 routing table has grown rapidly and as of 2025 contains over 200,000 prefixes.
IPv6 prefix sizes follow different conventions from IPv4. The standard allocation hierarchy is:
/32— Allocated to large ISPs and transit providers by RIRs/48— Typical allocation to an end-site (organization or home)/64— Standard subnet size within an allocation; required for SLAAC/128— Single host (equivalent to IPv4 /32)
Transition Technologies
Because IPv4 and IPv6 are not directly compatible, several transition mechanisms allow them to coexist:
- Dual-stack — Devices and networks run both IPv4 and IPv6 simultaneously. Applications prefer IPv6 when available via Happy Eyeballs (RFC 8305).
- NAT64/DNS64 — IPv6-only clients can reach IPv4 servers through a NAT64 gateway that translates IPv6 packets to IPv4. DNS64 synthesizes AAAA records for IPv4-only hosts. Common in mobile networks.
- 6to4 / Teredo / ISATAP — Older tunneling mechanisms, largely deprecated.
- 464XLAT — Used in mobile networks to allow IPv4 applications to function on IPv6-only access networks via local NAT46 in the device and NAT64 in the network.
See IPv6 transition technologies for a detailed treatment.
IPv6 Adoption
As of 2025, roughly 40–45% of global internet traffic uses IPv6, with wide variation by country. India, France, Germany, and the United States exceed 50% IPv6 adoption. Mobile networks — especially in India and the US — are often IPv6-only with NAT64 for IPv4 compatibility, driving overall numbers up.
The primary barrier to full adoption is dual-stack infrastructure: existing IPv4 systems must continue working during the transition, which creates an extended period of operating both stacks simultaneously.
Explore IPv4 and IPv6 Routes
- 8.8.8.8 — Google DNS (IPv4)
- 2001:4860:4860::8888 — Google DNS (IPv6)
- 2606:4700::1111 — Cloudflare DNS (IPv6)
- AS15169 — Google: see both IPv4 and IPv6 prefix counts