Loading content...
The most visible—and most frequently cited—difference between IPv4 and IPv6 is the expansion of the address space from 32 bits to 128 bits. But this quantitative change triggered a cascade of qualitative transformations that fundamentally altered how we think about IP addressing.
IPv4's 4.3 billion addresses (~2³²) seemed astronomically large in 1981. Today, with over 20 billion connected devices worldwide and projections of 75+ billion by 2025, that address space is not merely exhausted—it has become a constraining factor requiring complex workarounds like NAT, CGNAT, and address market trading.
IPv6's 340 undecillion addresses (~2¹²⁸) represent such an enormous expansion that new addressing paradigms become possible. Every device can have multiple globally unique addresses. Subnets can be profligate. Address conservation becomes unnecessary. This abundance fundamentally changes network architecture.
By the end of this page, you will:
• Quantify the address space differences and understand their practical implications • Master IPv4 and IPv6 address type classifications and scopes • Understand address allocation hierarchies and assignment mechanisms • Recognize how IPv6 enables fundamentally different network architectures • Apply addressing knowledge to network design and troubleshooting
Numbers at the scale of 2¹²⁸ are difficult to conceptualize. Let's put the IPv4 and IPv6 address spaces in perspective with concrete comparisons:
| Metric | IPv4 (32-bit) | IPv6 (128-bit) | Ratio |
|---|---|---|---|
| Total addresses | ~4.3 billion (4.29 × 10⁹) | ~340 undecillion (3.40 × 10³⁸) | 7.9 × 10²⁸ larger |
| Addresses per person (8B people) | ~0.5 addresses | ~4.25 × 10²⁸ addresses | Effectively unlimited |
| Addresses per m² of Earth | ~8.4 addresses | ~6.65 × 10²³ addresses | More than atoms in a grain of sand |
| Bits of address | 32 bits | 128 bits | 4× more bits |
| Notation complexity | Dotted decimal (12 chars max) | Hexadecimal (39 chars max) | More complex representation |
Grains of Sand Analogy: If every grain of sand on Earth (~7.5 × 10¹⁸ grains) represented one IPv4 address, you'd need about 1.7 billion grains to represent all IPv4 addresses. The same exercise for IPv6 would require more grains than could fit in our observable universe—by a factor of about 10²⁰.
Practically: You could assign a unique IPv6 address to every atom on the surface of the Earth and still have addresses left over. The exhaustion that plagues IPv4 is architecturally impossible with IPv6.
Why 128 Bits?
The choice of 128 bits for IPv6 was deliberate and carefully reasoned:
The design explicitly prioritizes simplicity and aggregation over address conservation. Unlike IPv4 where address conservation is a constant concern, IPv6 encourages liberal allocation for cleaner routing tables.
The notation systems for IPv4 and IPv6 reflect their different scales and usage patterns. Understanding both notation styles is essential for network configuration, troubleshooting, and documentation.
IPv4 Dotted Decimal Notation
IPv4 uses four decimal numbers (0-255) separated by dots:
192.168.1.1
10.0.0.1
172.16.254.100
Subnet notation uses CIDR (Classless Inter-Domain Routing):
192.168.1.0/24 (256 addresses)
10.0.0.0/8 (16M addresses)
172.16.0.0/12 (1M addresses)
Characteristics:
IPv6 Hexadecimal Notation
IPv6 uses eight groups of four hex digits separated by colons:
2001:0db8:0000:0000:0000:0000:0000:0001
fe80:0000:0000:0000:0200:f8ff:fe21:67cf
Abbreviation rules:
Leading zeros in each group can be omitted:
2001:db8:0:0:0:0:0:1
One sequence of all-zero groups can be replaced with :::
2001:db8::1
Subnet notation uses prefix length:
2001:db8::/32 (Provider allocation)
2001:db8:abcd::/48 (Site allocation)
2001:db8:abcd:1::/64 (Subnet)
The :: Rule: The double-colon abbreviation can only appear once per address. Using it twice creates ambiguity:
❌ 2001::db8::1 — Invalid (ambiguous expansion)
✓ 2001:0:0:0:db8:0:0:1 or 2001::db8:0:0:1 or 2001:0:0:0:db8::1
Parser Behavior: Always validate IPv6 addresses with tools rather than visual inspection. Human pattern-matching often fails with abbreviated addresses.
| Address | Full Form | Abbreviated Form | Purpose |
|---|---|---|---|
| Loopback | 0000:0000:0000:0000:0000:0000:0000:0001 | ::1 | Local host communication |
| Unspecified | 0000:0000:0000:0000:0000:0000:0000:0000 | :: | No address assigned |
| Documentation | 2001:0db8:0000:0000:0000:0000:0000:0001 | 2001:db8::1 | Examples (RFC 3849) |
| Link-local | fe80:0000:0000:0000:0200:f8ff:fe21:67cf | fe80::200:f8ff:fe21:67cf | Same-link communication |
| IPv4-mapped | 0000:0000:0000:0000:0000:ffff:c0a8:0101 | ::ffff:192.168.1.1 | IPv4 in IPv6 format |
Both IPv4 and IPv6 categorize addresses by their delivery semantics: how many destinations receive packets sent to that address, and how those destinations are selected. However, the specific types and their implementations differ significantly.
| Type | IPv4 | IPv6 | Delivery Semantics |
|---|---|---|---|
| Unicast | ✓ Supported | ✓ Supported | One-to-one: packet delivered to exactly one interface |
| Broadcast | ✓ Supported (255.255.255.255, directed) | ✗ Eliminated | One-to-all: packet delivered to all interfaces on segment |
| Multicast | Limited support (Class D: 224.0.0.0/4) | ✓ Enhanced support (ff00::/8) | One-to-many: packet delivered to group members |
| Anycast | Informal (same address on multiple hosts) | ✓ Formally defined | One-to-nearest: packet delivered to closest group member |
| Link-local | 169.254.0.0/16 (APIPA) | fe80::/10 (mandatory) | Single network segment; auto-configured |
| Unique local | Private (10/8, 172.16/12, 192.168/16) | fc00::/7 (ULA) | Organization-internal; not globally routable |
| Global unicast | Public addresses | 2000::/3 (currently) | Globally routable; unique worldwide |
Why Remove Broadcast?
IPv4 broadcast causes every host on the network segment to process the packet, even when only a subset needs the information. This wastes CPU cycles and creates security risks (broadcast storms, smurf attacks).
IPv6 replaces broadcast with more efficient multicast:
• All-nodes multicast (ff02::1): Reaches all IPv6 nodes on the link • All-routers multicast (ff02::2): Reaches all routers on the link • Solicited-node multicast: Targets only potential owners of an address
Anycast: From Informal to Formal
In IPv4, anycast is implemented informally by assigning the same IP address to multiple servers and relying on routing to direct packets to the nearest instance. This works but isn't explicitly supported by the protocol.
IPv6 formally recognizes anycast:
Key Constraint: A source address cannot be anycast—senders must use unicast addresses for their source address field.
IPv6 introduces a formal concept of address scope—the topological span within which an address is unique and routable. This scope hierarchy enables more nuanced and secure network architectures than IPv4's binary public/private distinction.
| Scope | Prefix/Identifier | Reachability | Use Cases |
|---|---|---|---|
| Interface-local (node-local) | Scope ID 1 | Same interface only (loopback) | Host-internal communication (::1) |
| Link-local | fe80::/10 (Scope ID 2) | Single network link only | Neighbor discovery, routing protocols, SLAAC |
| Site-local (deprecated) | fec0::/10 (Scope ID 5) | Single site/organization | Deprecated in RFC 3879; replaced by ULA |
| Unique Local (ULA) | fc00::/7 (fd00::/8 in practice) | Organization-internal | Private addressing without NAT dependency |
| Global | 2000::/3 (Scope ID 14) | Entire Internet | Public communication, global services |
Critical Distinction from IPv4: In IPv6, every interface must have a link-local address (fe80::/10). This is not optional—it's required for fundamental operations:
• Neighbor Discovery Protocol (NDP): Uses link-local for neighbor solicitation/advertisement • Router Discovery: Routers advertise from their link-local addresses • Default Gateway: Routers are often referenced by link-local address • Routing Protocols: Many IGPs (OSPFv3, EIGRP for IPv6) use link-local for adjacencies
Even if an interface has no global address, it will have a link-local address and can participate in local network operations.
Multicast Scope Field
IPv6 multicast addresses (ff00::/8) include an explicit 4-bit scope field in their structure:
ff0s::/16 where s = scope value
ff01::/16 - Interface-local (node-internal)
ff02::/16 - Link-local (same link)
ff05::/16 - Site-local (deprecated with unicast site-local)
ff08::/16 - Organization-local (defined by policy)
ff0e::/16 - Global (Internet-wide)
This structure enables routing-enforced scope boundaries. A router receiving a link-local multicast packet (ff02::) knows it must not forward that packet to other links—the scope is encoded in the address itself.
Contrast with IPv4: IPv4 multicast has no standardized scope field. TTL is sometimes used as a proxy for scope, but this is a weak and overloaded mechanism.
Both protocols reserve certain address ranges for special purposes. The following table provides a comprehensive comparison of these reserved addresses:
| Purpose | IPv4 Address | IPv6 Address | Notes |
|---|---|---|---|
| Unspecified | 0.0.0.0 | :: | Indicates absence of address; used during initialization |
| Loopback | 127.0.0.1 (127.0.0.0/8) | ::1 | IPv6 has single loopback address; IPv4 has entire /8 |
| Documentation | 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | 2001:db8::/32 | Examples in documentation and tutorials |
| Private/ULA | 10/8, 172.16/12, 192.168/16 | fc00::/7 (fd00::/8 used) | Non-globally-routable internal addresses |
| Link-local | 169.254.0.0/16 | fe80::/10 | Auto-configuration; mandatory in IPv6 |
| Multicast | 224.0.0.0/4 (Class D) | ff00::/8 | One-to-many delivery |
| All hosts/nodes | 224.0.0.1 | ff02::1 | Broadcast replacement in IPv6 |
| All routers | 224.0.0.2 | ff02::2 | Router-only group |
| Broadcast | 255.255.255.255 (limited), subnet broadcast (directed) | N/A (eliminated) | IPv6 uses multicast instead |
| 6to4 | 192.88.99.0/24 (anycast) | 2002::/16 | Transition mechanism (deprecated) |
| Teredo | N/A | 2001::/32 | NAT traversal tunneling (deprecated) |
| NAT64 well-known prefix | N/A | 64:ff9b::/96 | IPv4-embedded IPv6 addresses |
IPv4's Loopback Waste: The entire 127.0.0.0/8 range (over 16 million addresses) is reserved for loopback—a colossal waste of address space. Virtually all implementations only use 127.0.0.1.
IPv6's Efficiency: Only a single address (::1) is reserved for loopback, reflecting the protocol's more thoughtful design. This single address serves the same purpose without wasting billions of potential addresses.
How hosts obtain IP addresses differs significantly between IPv4 and IPv6. IPv6 introduces stateless autoconfiguration as a core feature, reducing dependence on centralized servers.
| Method | IPv4 | IPv6 | Key Differences |
|---|---|---|---|
| Manual/Static | ✓ Supported | ✓ Supported | Human-configured addresses; used for servers, infrastructure |
| DHCP | ✓ DHCPv4 (primary method) | ✓ DHCPv6 (optional) | IPv6 can work without any DHCP; stateful or stateless modes |
| APIPA/Link-local | 169.254.x.x (fallback) | fe80::/10 (always present) | IPv6 link-local is mandatory, not fallback |
| SLAAC | ✗ Not available | ✓ Primary method | Stateless Address Autoconfiguration; no server needed |
| Router Advertisement | ✗ Not available | ✓ Core mechanism | Routers provide prefix information; hosts derive addresses |
SLAAC: Stateless Address Autoconfiguration
SLAAC is a fundamental IPv6 capability that enables hosts to self-configure globally reachable addresses without any central server:
Result: A host can join a network and obtain a globally routable address in seconds, with zero manual configuration or server infrastructure.
SLAAC Advantages: • No server infrastructure required • Faster address acquisition • More resilient (no DHCP server as single point of failure) • Scales to massive networks effortlessly
SLAAC Limitations: • Standard SLAAC cannot provide DNS server addresses (requires RDNSS option or DHCPv6) • No centralized record of address assignments • Less administrative control over address selection
Common Deployment Models: • SLAAC only: Simple networks where DNS is discovered via other means • SLAAC + Stateless DHCPv6: SLAAC for addressing, DHCPv6 for DNS and other options • Stateful DHCPv6: Full server control over address assignment (enterprise environments)
One of the most significant conceptual shifts from IPv4 to IPv6 is the expectation of multiple addresses per interface. In IPv4, a host typically has one address per interface (with exceptions for virtual hosts and aliases). In IPv6, multiple addresses per interface is the norm, not the exception.
Practical Example: Typical Desktop Interface
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>
inet6 2001:db8:1:1::10 scope global # Static global
inet6 2001:db8:1:1:a2c3:d4e5:f6g7:h8i9 scope global dynamic # SLAAC
inet6 2001:db8:1:1:temp::1 scope global temporary # Privacy temporary
inet6 fe80::1a2b:3c4d:5e6f:7a8b scope link # Link-local
This host has four IPv6 addresses on a single interface—all simultaneously valid and usable:
With multiple addresses, which one does the host use as source?
RFC 6724 defines a sophisticated source address selection algorithm considering:
Result: The selection is automatic and generally correct, but administrators can tune the policy table for specific behaviors.
The structure of IPv6 addresses was designed with hierarchical allocation and route aggregation as primary goals. This differs markedly from IPv4's historically fragmented allocation.
| Level | Typical Prefix Length | Allocated By | Recipient |
|---|---|---|---|
| IANA to RIRs | /12 | IANA | Regional Internet Registries (ARIN, RIPE, APNIC, etc.) |
| RIR to LIR/ISP | /32 to /29 | RIR | Local Internet Registries / ISPs |
| LIR to End Site | /48 (typical) | ISP/LIR | Enterprise customers, organizations |
| Site to Subnet | /64 (mandated) | Network Admin | Individual network segments |
| Subnet to Host | 128 (full address) | Auto or DHCP | Individual interfaces |
The /64 Boundary: A Fundamental Constraint
IPv6 mandates that subnet prefixes must be /64. This is not merely convention—it's a protocol requirement that enables several features:
Practical Impact:
IPv6's hierarchical design enables massive route aggregation:
• An ISP with a /32 can aggregate all customer routes into a single BGP announcement • Core Internet routing tables grow more slowly than with IPv4 • Prefix delegation enables dynamic, hierarchical address management
Contrast with IPv4: Historically fragmented allocation, deaggregated announcements, and address scarcity have caused IPv4 global routing tables to exceed 900,000 entries. IPv6's design aims to prevent this growth pattern.
The addressing differences between IPv4 and IPv6 extend far beyond the simple increase in address length. They represent a fundamental reimagining of how network identification and communication should work at Internet scale.
What's Next:
With addressing differences understood, we'll next examine how security differs between IPv4 and IPv6—from built-in IPsec requirements to new attack surfaces introduced by IPv6's features and the security implications of running dual-stack networks.
You now have a comprehensive understanding of the addressing differences between IPv4 and IPv6. This knowledge is essential for network design, troubleshooting, and understanding the architectural implications of protocol migration.