IPv4 vs IPv6: What's Actually Different
IPv4's 32-bit address space is exhausted; IPv6 fixes that with 128-bit addresses plus routing and header changes. Here's what differs in practice.
IPv4 and IPv6 are the two versions of the Internet Protocol used to address and route traffic on the internet. The difference that matters most is address space: IPv4 uses 32 bits, giving about 4.3 billion possible addresses, which ran out years ago; IPv6 uses 128 bits, giving enough addresses that exhaustion isn’t a practical concern. But the two protocols also differ in header design, routing behavior, and how they handle address translation.
Address space: 4 billion vs undecillions
An IPv4 address looks like 192.0.2.1 — four 8-bit numbers, 32 bits total, for roughly 4.3 billion unique addresses. That sounded enormous in the 1980s and is nowhere near enough for a world of phones, servers, containers, and IoT devices all needing addresses.
An IPv6 address looks like 2001:0db8:85a3:0000:0000:8a2e:0370:7334 — eight groups of 16 bits, 128 bits total. The address space is so large (roughly 3.4×10^38 addresses) that assigning a /64 block — 18 quintillion addresses — to every home network is standard practice, with no meaningful risk of exhaustion.
Header format and performance changes
IPv6 isn’t just IPv4 with bigger addresses; the packet header was redesigned. It has a fixed 40-byte size (versus IPv4’s variable header), drops fields that routers rarely used, and moves optional data into extension headers that only get processed when needed. Routers can move packets with less per-packet work. IPv6 also removes header checksums, relying on the fact that lower layers (like Ethernet) and upper layers (like TCP) already check integrity, which was redundant work in IPv4.
NAT: the crutch that kept IPv4 alive
Because IPv4 addresses were scarce, the industry leaned hard on Network Address Translation: a NAT gateway lets an entire private network share one public IPv4 address, rewriting source addresses on the way out and remembering the mapping on the way back. It works, but it breaks the original end-to-end model of the internet — two hosts behind separate NATs can’t reach each other directly without extra tricks like hole punching or a relay.
IPv6’s abundant address space removes the need for NAT: every device can get its own globally routable address. In practice, private IPv6 deployments still use firewalls to restrict inbound connections, but the address translation layer itself becomes optional rather than mandatory.
IPv4 vs IPv6
| IPv4 | IPv6 | |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Address example | 192.0.2.1 | 2001:db8::1 |
| Total addresses | ~4.3 billion | ~3.4×10^38 |
| Header | Variable, includes checksum | Fixed 40 bytes, no checksum |
| NAT | Common, often required | Generally unnecessary |
| Configuration | DHCP or static | DHCPv6 or stateless autoconfig |
| Broadcast | Supported | Removed (multicast instead) |
Dual-stack and the slow migration
Because IPv4 and IPv6 aren’t wire-compatible, a host can’t speak IPv6 to a peer that only understands IPv4. The transition strategy most networks use is dual-stack: a device gets both an IPv4 and an IPv6 address and uses whichever the destination supports, usually preferring IPv6 when both are available. This lets the two protocols coexist indefinitely rather than requiring a hard cutover, which is why IPv4 is still very much alive decades after IPv6 was standardized.
Cloud providers now generally support IPv6 across their networking primitives — a VPC can be configured with IPv6 CIDR blocks alongside IPv4 ones, and DNS resolves to both A (IPv4) and AAAA (IPv6) records for a dual-stack host.
Does IPv6 matter for your app?
For most application developers, the protocol version is abstracted away by DNS and the OS network stack — you connect to a hostname, not an address family. Where it does matter:
- Client-facing services should support IPv6 if you want to reach mobile carriers and networks that are IPv6-only or IPv6-preferred at the edge, even if they still tunnel back to IPv4 origins.
- Access control lists and firewall rules need to cover both address families explicitly — a rule written only for IPv4 CIDR ranges won’t block or allow IPv6 traffic.
- Logging and rate limiting keyed on client IP need to handle the longer IPv6 format and understand that a single client might present different addresses from within the same /64 block.
The takeaway
IPv4 and IPv6 solve the same problem — routing packets across the internet — but IPv6’s 128-bit addresses remove the scarcity that made NAT and careful address management mandatory under IPv4. Most infrastructure today runs dual-stack rather than pure IPv6, so the practical task isn’t choosing one over the other — it’s making sure your firewall rules, VPN configurations, and DNS records account for both.
Tagged
Keep reading
Chisato · · 4 min read CIDR Notation and Subnetting, Explained
CIDR notation like 10.0.0.0/24 packs an IP range and its mask into one string. How prefix length maps to host count, and how subnetting splits a network.
Chisato · · 4 min read What Is Network Segmentation?
Network segmentation splits a network into isolated zones so a breach in one part can't freely reach the rest. How it works and where it fits alongside zero trust.
Chisato · · 4 min read What Is a Bastion Host?
A bastion host is a hardened server that acts as the single controlled entry point into a private network, shrinking the attack surface for admins.