IPv4 vs IPv6: notation, special ranges, and the state of migration
IPv4 address exhaustion has been on the agenda since the 2010s, but the migration to IPv6 is still incomplete. This article walks through the notation differences, the special-use ranges in each protocol, and what “IPv4 only / IPv6 only / dual stack” looks like today.
Address length: 32 bits vs 128 bits
| Property | IPv4 | IPv6 |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Total addresses | ~4.3 × 10^9 | ~3.4 × 10^38 |
| Notation | Dotted decimal | Colon-separated hexadecimal |
| Example | 192.168.1.1 | 2001:db8::1 |
128 bits is effectively unbounded for any practical purpose — large enough to give every network-connected device its own globally unique address.
IPv6 notation rules
IPv6 splits 128 bits into eight 16-bit blocks, separated by colons:
2001:0db8:0000:0000:0000:ff00:0042:8329 Two shortenings are allowed:
1. Drop leading zeros within each block
2001:0db8:0000:0000:0000:ff00:0042:8329
→ 2001:db8:0:0:0:ff00:42:8329 2. Replace one run of all-zero blocks with ::
2001:db8:0:0:0:ff00:42:8329
→ 2001:db8::ff00:42:8329 :: may appear at most once per address. Multiple :: would be ambiguous about how many zero blocks to expand:
2001:0:0:1:0:0:0:1 ← two zero runs
2001::1:0:0:0:1 ← OK (longest run replaced)
2001:0:0:1::1 ← OK (other run replaced)
2001::1::1 ← INVALID (two ::) CIDR: same idea in both protocols
CIDR (prefix-length) notation is conceptually identical:
IPv4: 192.168.1.0/24
IPv6: 2001:db8::/32 But IPv6 allocations are much larger by convention:
/64— one subnet (2^64 hosts)/56— typical end-user allocation/48— typical organization allocation/32— typical ISP allocation
In IPv4 mindset, /64 sounds tiny. In IPv6 it’s the standard subnet size.
Special-use ranges
IPv4
| Range | Purpose |
|---|---|
10.0.0.0/8 | Private (Class A) |
172.16.0.0/12 | Private (Class B) |
192.168.0.0/16 | Private (Class C) |
127.0.0.0/8 | Loopback (127.0.0.1 is the canonical address) |
169.254.0.0/16 | Link-local (used when DHCP fails) |
224.0.0.0/4 | Multicast |
255.255.255.255 | Broadcast |
IPv6
| Range | Purpose |
|---|---|
::1/128 | Loopback (counterpart to 127.0.0.1) |
fe80::/10 | Link-local |
fc00::/7 | Unique local (counterpart to IPv4 private ranges) |
2001:db8::/32 | Documentation (reserved for examples; never live) |
ff00::/8 | Multicast |
::/128 | Unspecified |
IPv6 has no broadcast address. Multicast covers what broadcast did in IPv4.
Why NAT is mostly unnecessary in IPv6
IPv4’s exhaustion drove NAT (Network Address Translation) into ubiquity:
- Home LAN uses
192.168.1.0/24. - The router holds one global IP and translates outbound traffic.
- Devices behind the router are not directly reachable from the internet.
IPv6 has so much address space that every device can have a globally routable address. NAT is fundamentally unnecessary. Firewalls handle access control instead.
That said, NAT had a side-effect of acting as an implicit firewall, and giving every device a globally reachable IPv6 address raises security concerns. Most home routers therefore default to NAT-equivalent stateful filtering on IPv6.
Dual stack: how things actually run today
Pure IPv6-only migration is uncommon, so the standard is dual stack: speak both:
- Hosts hold both an IPv4 and an IPv6 address.
- DNS publishes both A (IPv4) and AAAA (IPv6) records.
- Applications can use either.
Dual stack brings its own friction:
1. Address selection (RFC 6724)
When both IPv4 and IPv6 paths exist, the client picks one. IPv6 is generally preferred, but if its routing is poor, perceived performance suffers.
2. Happy Eyeballs (RFC 8305)
Race the IPv6 connection against IPv4 instead of waiting for IPv6 to time out. Modern browsers implement Happy Eyeballs v2, so users barely notice when IPv6 is slow.
3. Logging IP addresses
Server logs end up mixing 192.168.1.1 and 2001:db8::1 formats. Database VARCHAR sizes and any IP-based aggregation must handle both.
IPv4-mapped IPv6 addresses
IPv4 addresses can be expressed in IPv6 form:
::ffff:192.168.1.1 Default dual-stack sockets on Linux/macOS use this representation internally, so logged IPv6 addresses can really be IPv4 connections in disguise.
State of migration as of 2026
- IPv6 adoption: ~50% per Google’s stats (varies by region — US, India, Germany are higher; Japan is mid-tier).
- Mobile carriers: Mostly IPv6.
- Cloud providers: AWS, GCP, Azure all support IPv6 (sometimes at extra cost).
- Enterprise LANs: Still mostly IPv4 + NAT.
Implementation considerations:
- Validation: regex for IPv4 only fails on IPv6 input.
- Logging: design for both formats.
- Configuration:
bind 0.0.0.0doesn’t listen on IPv6; usebind ::or both. - Firewalls: iptables (IPv4) and ip6tables (IPv6) are separate rule sets.
Summary
- IPv4 is 32 bit; IPv6 is 128 bit.
- IPv6 collapses zero runs with
::, but only once per address. - Special-use ranges have conceptual counterparts across both protocols.
- Dual stack is the realistic operating model today.
- New implementations should plan for both protocols from the start in code, logs, and config.
To inspect IP address formats and play with CIDR ranges across both protocols, the IP address tool on this site validates and parses both IPv4 and IPv6.