IPv4 vs IPv6: What's the Difference?
The Need for a New Protocol
IPv4 (Internet Protocol version 4) was designed in the early 1980s with approximately 4.3 billion addresses. At the time, this seemed more than sufficient. However, the explosive growth of the internet, smartphones, IoT devices, and cloud services has exhausted the IPv4 address pool.
The Internet Assigned Numbers Authority (IANA) allocated the last IPv4 blocks to Regional Internet Registries in February 2011. This shortage is the primary reason IPv6 was developed - to provide a virtually unlimited address space for the future of networking.
IPv4 Format and Structure
IPv4 addresses are 32 bits long, written as four decimal octets separated by dots. Each octet ranges from 0 to 255:
192.168.1.1 → in binary: 11000000.10101000.00000001.00000001
- Total possible addresses: 232 = 4,294,967,296
- Header size: 20–60 bytes (variable)
- Fragmentation handled by both sender and routers
- Broadcast support: Yes
- Security: IPSec is optional
IPv6 Format and Structure
IPv6 addresses are 128 bits long, written as eight groups of four hexadecimal digits separated by colons:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6 allows abbreviation: leading zeros in a group can be dropped, and consecutive all-zero groups can be replaced with :: (once per address):
2001:db8:85a3::8a2e:370:7334
- Total possible addresses: 2128 = approximately 3.4 × 1038
- Header size: Fixed 40 bytes (simpler, faster processing)
- Fragmentation handled only by the sender
- No broadcast - uses multicast and anycast instead
- Security: IPSec is mandatory in the specification
Side-by-Side Comparison
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address Length | 32 bits | 128 bits |
| Address Format | Dotted decimal | Hexadecimal colon |
| Address Space | ~4.3 billion | ~340 undecillion |
| Header Size | 20–60 bytes (variable) | 40 bytes (fixed) |
| IPSec | Optional | Built-in |
| NAT Required? | Yes (due to scarcity) | No (every device gets a public IP) |
| Broadcast | Yes | No (uses multicast) |
| Auto-Configuration | DHCP | SLAAC + DHCPv6 |
| Checksum in Header | Yes | No (handled by other layers) |
| Fragmentation | Routers and sender | Sender only |
IPv6 Adoption and Dual-Stack
Global IPv6 adoption has been steadily increasing. As of 2025, approximately 40-45% of Google's traffic comes over IPv6. Leading countries in adoption include India, the United States, Germany, and France.
During the transition period, most networks run dual-stack, which means devices have both an IPv4 and an IPv6 address simultaneously. This allows communication with both IPv4-only and IPv6-only services.
- Dual-Stack: Device runs both IPv4 and IPv6 - the most common transition method.
- Tunneling (6to4, Teredo): Encapsulates IPv6 packets inside IPv4 for transport across IPv4-only networks.
- NAT64/DNS64: Allows IPv6-only clients to reach IPv4-only servers through translation.