IPv4 and IPv6 are two versions of the Internet Protocol. IPv4: 32-bit addresses, ~4.3 billion addresses, NAT almost universal, DHCP for config. IPv6: 128-bit addresses, ~3.4×10^38 addresses, no NAT needed, SLAAC and DHCPv6 for config, IPSec built in. The team that runs dual-stack gets both; the team that runs IPv4-only is on borrowed time as the IPv4 address pool is exhausted at the ISP level.
Table of contents
- Difference 1: address length
- Difference 2: NAT (Network Address Translation)
- Difference 3: header
- Difference 4: autoconfiguration
- Difference 5: fragmentation
- Difference 6: broadcast vs multicast
- Difference 7: IPSec
- Difference 8: address types and scopes
- How this fits the rest of the stack
- FAQ
Difference 1: address length
IPv4: 32 bits. 4,294,967,296 addresses total. Written as four octets in decimal: 192.168.1.1.
IPv6: 128 bits. 3.4×10^38 addresses. Written as eight groups of four hex digits: 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Leading zeros can be dropped; consecutive groups of zeros can be replaced with ::.
The practical effect: IPv6 has enough addresses to give every device on earth multiple public IPs and still have addresses left over. IPv4 ran out of unallocated addresses at IANA in 2011; RIRs ran out in the 2010s-2020s.
Difference 2: NAT (Network Address Translation)
IPv4: NAT is everywhere. Carrier-grade NAT at the ISP, double NAT on home routers, port-restricted NAT on phones. The team that runs IPv4-only is the team that uses NAT.
IPv6: NAT is not needed. Every device can have a globally routable address. The team that uses IPv6 in production has a 1:1 mapping between host and public address.
The trade-off: NAT was a security feature (incidentally). IPv6 needs a real firewall, not NAT-as-firewall. The team that disables the host firewall because “we have NAT” is at risk when IPv6 is enabled.
Difference 3: header
IPv4 header: 20-60 bytes, variable length, with options.
IPv6 header: fixed 40 bytes. Simpler to parse, easier to hardware-accelerate. Some IPv4 fields (header checksum, fragment offset, options) are removed or moved to extension headers.
The team that builds packet-processing code finds IPv6 headers easier to work with - one fixed-size header to parse, with extension headers only for the unusual cases.
Difference 4: autoconfiguration
IPv4: DHCP. The host sends a DISCOVER, the server offers an address, the host requests, the server acknowledges. Four packets, requires a server.
IPv6: SLAAC (Stateless Address Autoconfiguration). The host listens for Router Advertisements, derives its own address from the prefix + its MAC address (or a random suffix), and configures itself. Zero packets to a server in the simple case.
The team that uses IPv6 on a network without a DHCPv6 server has the hosts configure themselves. The team that uses IPv4 has to set up DHCP.
Difference 5: fragmentation
IPv4: routers can fragment packets. The sender sends a packet, a router along the path can split it into smaller pieces if the next link has a smaller MTU.
IPv6: routers do not fragment. The sender is expected to do Path MTU Discovery and send packets that fit. If the path MTU changes, the sender reduces the packet size.
The practical effect: IPv6 is simpler to route (routers do less work), but the host is responsible for getting MTU right. The team that uses jumbo frames (9000 MTU) on a private network has the IPv6 stack handle the path discovery.
Difference 6: broadcast vs multicast
IPv4: broadcast (255.255.255.255) sends a packet to every host on the local network. Used by DHCP, ARP, etc.
IPv6: no broadcast. Multicast replaces it. The IPv6 equivalent of broadcast is ff02::1 (all-nodes multicast on the local segment), and ARP is replaced by NDP (Neighbor Discovery Protocol) using multicast.
The team that uses IPv6 has less broadcast noise on the local network - multicast is more targeted.
Difference 7: IPSec
IPv4: IPSec is optional, added later (RFC 4301, 2005).
IPv6: IPSec is built in from the start (RFC 4301, originally mandated but later relaxed). The team that uses IPv6 has IPSec available without a separate setup step.
In practice, the team that uses IPv6 still has to configure IPSec - the built-in is just the protocol, not the policy. The team that runs site-to-site VPNs uses WireGuard or OpenVPN regardless of the IP version.
Difference 8: address types and scopes
IPv4: unicast, broadcast, multicast. Address classes (A, B, C) are mostly historical.
IPv6: unicast (global, link-local fe80::/10, unique local fc00::/7), multicast (ff00::/8), anycast. No broadcast.
The team that uses IPv6 has more address types but the model is more uniform: global addresses for the public, link-local for the local segment, multicast for group communication.
FAQ
Will IPv6 replace IPv4?
Yes, eventually. The transition has been in progress since the late 1990s. The team that runs new services should run dual-stack; the team that runs only IPv4 will eventually hit an upstream that is IPv6-only and need to add the missing piece.
Is IPv6 faster than IPv4?
Not inherently. The protocols have similar overhead. IPv6 has theoretical advantages (no NAT, simpler header, no fragmentation in routers) that can translate to lower latency in some paths. Real-world speed depends on the path, the ISP, and the application’s behavior.
Why does my ISP only give me IPv4?
Most ISPs still do, especially for residential service. Business and cloud providers increasingly offer IPv6. The team that asks their ISP for IPv6 sometimes gets it for free; sometimes the ISP does not have it.
Do I need to learn IPv6 to be a sysadmin?
Yes. IPv6 is the default on modern Linux and cloud. The team that has been avoiding it because they are “comfortable with IPv4” is on borrowed time.
How do I enable IPv6 on Linux?
It is on by default on most modern distros. ip -6 addr shows the link-local address automatically. To get a global address, you need either SLAAC (Router Advertisements on the local network) or DHCPv6.
How this fits the rest of the stack
For a sense of what the full project costs before it commits, the RunxBuild hosting calculator shows the line items together. The API, the database, the storage, the worker, the bandwidth - each one is a separate number, and the team’s mental model for the platform is the sum of those numbers.
Useful related references: