InfraNestInfraNest
Servers & Cloud

IPv4 vs IPv6 explained: differences, dual-stack, and why it matters

A practical comparison of IPv4 and IPv6 addressing, headers, and NAT — plus what dual-stack means for the servers you run today.

IInfraNest· September 7, 2026· 6 min read· Updated September 13, 2026
IPv4 vs IPv6 explained: differences, dual-stack, and why it matters

IPv4 uses 32-bit addresses (about 4.29 billion total), while IPv6 uses 128-bit addresses (roughly 3.4×10^38) — the fix for IPv4 exhaustion and the reason most modern infrastructure now runs both protocols side by side ("dual-stack"). The two aren't just different address lengths; they differ in header design, address assignment, and whether NAT is even necessary. Here's what actually changes when you move from one to the other.

What's the core difference between IPv4 and IPv6?

IPv4 was defined in RFC 791 back in 1981, with 32-bit addresses written in dotted-decimal notation like 203.0.113.42. That gives roughly 4.29 billion unique addresses — a huge number in 1981, but not enough for a world with billions of connected devices.

IPv6, defined in RFC 8200, uses 128-bit addresses written in hexadecimal groups, like 2001:db8:85a3::8a2e:370:7334. The address space is so large (2^128) that exhaustion isn't a realistic concern in any planning horizon.

IPv4 IPv6
Address length 32-bit 128-bit
Example 203.0.113.42 2001:db8::1
Total addresses ~4.29 billion ~3.4×10^38
Header size 20–60 bytes (variable) 40 bytes (fixed)
Fragmentation Routers can fragment in transit Only the source host fragments
NAT Common, often required Generally unnecessary
Config DHCP or static SLAAC or DHCPv6
Broadcast Yes No — multicast only

Why did we need IPv6 at all?

IANA's central IPv4 pool ran out on 3 February 2011, and the five regional registries (ARIN, RIPE NCC, APNIC, LACNIC, AFRINIC) exhausted their own allocations on their own timelines afterward. Since then, the industry has leaned on private addressing (RFC 1918 ranges like 10.0.0.0/8 and 192.168.0.0/16) plus network address translation (NAT, RFC 3022) to let many devices share one public IPv4 address.

NAT works, but it adds complexity: connection tracking, port mapping, and headaches for peer-to-peer protocols. IPv6's address space is large enough that every device — every server, every phone, every IoT sensor — can get its own globally routable address without translation. That's a structural fix, not a patch.

NoteSome cloud providers now charge for public IPv4 addresses specifically because the address space is scarce and costly to acquire — one more reason IPv6 adoption keeps climbing on the server side.

How does address assignment differ?

IPv4 hosts get an address via DHCP (RFC 2131) or static configuration, and they discover neighbours on the local network using ARP.

IPv6 replaces both with newer mechanisms:

  • SLAAC (Stateless Address Autoconfiguration, RFC 4862) — a host can generate its own address from the network prefix without a DHCP server at all.
  • DHCPv6 (RFC 8415) — for networks that want centralised, stateful control instead.
  • NDP (Neighbor Discovery Protocol, RFC 4861) — replaces ARP, using ICMPv6 (RFC 4443) instead of broadcast ARP requests.
  • No broadcast — IPv6 drops broadcast entirely in favour of multicast, which is more efficient on modern switched networks.

IPv6 subnets are also handled differently. Where IPv4 subnetting is flexible and calculated with CIDR (RFC 4632) down to whatever mask fits, IPv6 networks almost universally use a /64 per subnet, because SLAAC depends on that boundary to work correctly. If you're mapping out address ranges for either protocol, run the numbers through our free subnet calculator rather than doing the binary math by hand.

Comparison table showing IPv4 methods (DHCP, ARP, broadcast, CIDR) versus IPv6 equivalents (SLAAC, DHCPv6, NDP, /64).

What does the packet header actually look like?

The IPv4 header is variable — a minimum of 20 bytes, up to 60 bytes when options are present — and it carries a header checksum that every router has to recompute at each hop.

IPv6 simplifies this: a fixed 40-byte header, no checksum (that job is left to upper layers and link-layer checks), and any optional features moved into extension headers instead of inline options. This makes packet processing faster and more predictable at scale, which matters for high-throughput routers and, increasingly, for cloud load balancers.

Fragmentation changed too. IPv4 routers can fragment an oversized packet mid-path. IPv6 removes that entirely — only the originating host fragments, and it relies on Path MTU Discovery (RFC 8201) to figure out the right packet size upfront. That's a meaningful reliability difference if you've ever chased down a mysterious MTU-related connection stall.

What is dual-stack and why does it matter?

Dual-stack, specified in RFC 4213, means a device or server runs IPv4 and IPv6 simultaneously, with independent addresses for each. This is the practical reality for almost every production server today: your host gets both an A record and an AAAA record in DNS, and clients connect over whichever protocol their network prefers — typically IPv6 first, falling back to IPv4 if that path isn't available.

Dual-stack matters because IPv6 adoption isn't universal yet. Some networks, especially mobile carriers, are IPv6-only internally and rely on translation (NAT64/DNS64, RFC 6146/6147) to reach IPv4-only destinations. Others are IPv4-only and can't reach IPv6 endpoints at all. Running dual-stack means your infrastructure is reachable either way, without betting on one protocol winning out in the short term.

Dual-stack DNS example with A and AAAA records for app.example.com, covering IPv6-first, NAT64, IPv4-only clients, and firewa

If you're publishing DNS records for a dual-stack host, you need both record types pointing at the right addresses — our complete DNS record guide covers exactly how A and AAAA records fit together.

Do you need to enable IPv6 on your servers?

For most workloads, yes — or at least you should plan for it. A few practical reasons:

  • Public IPv4 addresses cost money and are getting scarcer. Several major cloud providers now bill separately for public IPv4 addresses on running instances, a direct consequence of address scarcity.
  • Mobile and ISP networks increasingly prefer IPv6. A dual-stack server gets a shorter, often faster path for IPv6-native clients.
  • NAT adds latency and complexity you don't need if you don't have to. IPv6-native connections skip translation entirely.

When you provision servers, check whether your provider assigns IPv6 by default or as an add-on — this varies a lot between platforms. Managing that consistently across multiple providers is exactly what our cloud servers feature is built for: one dashboard to see and configure IPv4 and IPv6 addressing across every host you run, instead of checking five different provider consoles.

Is IPv6 less secure than IPv4?

No — the security posture is essentially equivalent today. Early IPv6 specifications suggested IPsec support would be mandatory, but current guidance (RFC 6434, aligned with the RFC 8200 baseline) treats IPsec as recommended rather than required for both protocols. In practice, security depends far more on firewall rules, patching, and configuration than on which IP version you're running. If you're auditing your setup, our DNS security checklist and infrastructure security checklist are good starting points regardless of which protocol your servers speak.

One practical gotcha: forgetting to firewall your IPv6 interface because your existing rules only cover IPv4. If you enable dual-stack, your IPv6 address needs the same scrutiny as your IPv4 one — it's just as reachable from the public internet.

Check your current server addressing and subnet plan with our free subnet calculator, or manage IPv4/IPv6 across every provider from one place with cloud servers.

Frequently asked questions

#Can IPv4 and IPv6 devices talk to each other directly?

No — IPv4 and IPv6 are not natively interoperable, since they use different addressing and header formats. Communication between them requires a translation mechanism such as NAT64/DNS64, or both endpoints running dual-stack so they share a common protocol.

#Does my domain need both an A and an AAAA record?

Only if the server behind it has both an IPv4 and IPv6 address. Add an A record for IPv4 and an AAAA record for IPv6 — if you only add one, clients on the other protocol simply won't use that path to reach you.

#Will IPv4 eventually be phased out?

Not soon. IPv4 remains deeply embedded in existing infrastructure, so the realistic path is years of continued dual-stack coexistence rather than a hard cutover, even as IPv6 adoption keeps growing.

#Is IPv6 faster than IPv4?

Not inherently, but it can be in practice — IPv6's simpler, fixed-size header and lack of in-network fragmentation reduce router processing overhead, and skipping NAT removes a layer of translation latency.

Related articles

Put this into practice

InfraNest manages the domains, DNS, certificates and monitoring behind articles like this one, from a single dashboard.

Free plan · No credit card required · Set up in minutes