IPv4 vs IPv6: What's the Difference?

The internet runs on two versions of the Internet Protocol: IPv4, which has been in use since 1981, and IPv6, its successor designed to solve the address exhaustion crisis. Both coexist today, and understanding their differences is essential for anyone building or operating networked systems.

IPv4: The Foundation

IPv4 was defined in RFC 791 (1981) and uses 32-bit addresses written in dotted-decimal notation: four octets separated by dots, each ranging from 0 to 255. 8.8.8.8, 1.1.1.1, and 192.168.1.1 are all IPv4 addresses. The 32-bit address space provides 232 = approximately 4.3 billion unique addresses.

The global IPv4 address pool was officially exhausted in February 2011, when IANA allocated the last five /8 blocks (one each to the five Regional Internet Registries). APNIC (Asia-Pacific) reached its own exhaustion in 2011, RIPE NCC (Europe/Middle East) in 2019, ARIN (North America) in 2015, LACNIC (Latin America) in 2014, and AFRINIC (Africa) in 2021. New addresses are now obtained only through transfers from existing holders, at market prices of $30–60 per address in 2025.

IPv6: The Successor

IPv6 was standardized in RFC 2460 (1998), updated by RFC 8200 (2017). It uses 128-bit addresses written in eight groups of four hexadecimal digits separated by colons. Consecutive groups of zeros can be compressed with ::, so 2606:4700:0000:0000:0000:0000:0000:1111 compresses to 2606:4700::1111.

The 128-bit space provides 2128 ≈ 3.4 × 1038 unique addresses — roughly 340 undecillion. For perspective: that is about 50 octillion addresses per person on Earth, or 340 trillion addresses per square millimeter of the Earth's surface. Address scarcity is not a concern for IPv6.

Header Comparison

IPv4 vs IPv6 Header Structure IPv4 Header (variable length) IPv6 Header (fixed 40 bytes) Version/IHL DSCP/ECN Total Length Identification Flags/Offset (fragment) TTL Protocol Header Checksum Source Address (32 bits) Destination Address (32 bits) Options (variable, 0–40 bytes) — makes header variable-length Version / Traffic Class / Flow Label Payload Length Next Header Hop Limit Source Address (128 bits) 4× larger than IPv4 Destination Address (128 bits) 4× larger than IPv4 Min 20 bytes, up to 60 bytes with options Routers compute checksum every hop Always exactly 40 bytes — no options in fixed header No checksum — left to transport layer (TCP/UDP)

Key Technical Differences

FeatureIPv4IPv6
Address length32 bits128 bits
Address notationDotted decimal (192.0.2.1)Hex colon (2001:db8::1)
Header size20–60 bytes (variable)40 bytes (fixed)
Header checksumYes (recomputed each hop)No (TCP/UDP handle integrity)
FragmentationRouters and hostsHosts only (via fragment extension header)
BroadcastYesNo (replaced by multicast)
Address configDHCP or manualSLAAC, DHCPv6, or manual
NAT requirementCommon (address scarcity)Not needed (vast address space)
IPsecOptional extensionDefined in protocol, optional in practice
Loopback127.0.0.1::1

IPv6 Address Types

IPv6 defines several special address categories:

Stateless Address Autoconfiguration (SLAAC)

One of IPv6's most practical features is SLAAC (RFC 4862). A device can configure its own global IPv6 address without a DHCP server:

  1. The device generates a link-local address from its interface identifier (derived from its MAC address or a privacy-preserving random value)
  2. It performs Duplicate Address Detection (DAD) using Neighbor Discovery Protocol (NDP) to ensure the address is unique on the link
  3. It listens for Router Advertisement (RA) messages from the local router, which include the network prefix and default gateway
  4. It combines the router's prefix with its interface identifier to form a full global address

Privacy extensions (RFC 8981) generate random, time-limited interface identifiers instead of MAC-derived ones, preventing tracking across networks.

IPv6 in BGP

BGP carries both IPv4 and IPv6 routing information using the MP-BGP extensions defined in RFC 4760. IPv6 prefixes are carried in the MP_REACH_NLRI and MP_UNREACH_NLRI attributes. The global IPv6 routing table has grown rapidly and as of 2025 contains over 200,000 prefixes.

IPv6 prefix sizes follow different conventions from IPv4. The standard allocation hierarchy is:

Transition Technologies

Because IPv4 and IPv6 are not directly compatible, several transition mechanisms allow them to coexist:

See IPv6 transition technologies for a detailed treatment.

IPv6 Adoption

As of 2025, roughly 40–45% of global internet traffic uses IPv6, with wide variation by country. India, France, Germany, and the United States exceed 50% IPv6 adoption. Mobile networks — especially in India and the US — are often IPv6-only with NAT64 for IPv4 compatibility, driving overall numbers up.

The primary barrier to full adoption is dual-stack infrastructure: existing IPv4 systems must continue working during the transition, which creates an extended period of operating both stacks simultaneously.

Explore IPv4 and IPv6 Routes

See BGP routing data in real time

Open Looking Glass
← Previous What is an IP Address?
More Articles
What is DNS? The Internet's Phone Book
What is an IP Address?
What is a Network Prefix (CIDR)?
How Does Traceroute Work?
What is a CDN? Content Delivery Networks Explained
What is DNS over HTTPS (DoH)?