The IPv4 Exhaustion Crisis

IPv4 was created in 1981 with 4.3 billion addresses (2^32). At the time, this seemed like plenty. But with smartphones, IoT devices, and global internet expansion, we've run out!

IPv4 Exhaustion Timeline

DateEvent
Feb 2011IANA pool exhausted
Apr 2011APNIC (Asia-Pacific) exhausted
Sep 2012RIPE (Europe) exhausted
Jun 2014LACNIC (Latin America) exhausted
Sep 2015ARIN (North America) exhausted
Apr 2017AFRINIC (Africa) began rationing

The Numbers Problem

IPv4: 4,294,967,296 addresses
IPv6: 340,282,366,920,938,463,463,374,607,431,768,211,456

That's 340 undecillion addresses - enough to give every atom on Earth its own IP!

IPv6 Benefits Beyond Address Space

Simplified Header

IPv6 header is fixed at 40 bytes with fewer fields, making routing faster and more efficient.

Built-in Security

IPsec was mandatory in the original spec. End-to-end encryption is native to IPv6.

No More NAT

Every device gets a global address. True end-to-end connectivity restored!

Auto-Configuration

SLAAC lets devices configure themselves without DHCP servers.

Better Multicast

No broadcast in IPv6 - more efficient multicast replaces it.

Mobile Support

Mobile IPv6 is more efficient than Mobile IPv4 for roaming devices.

IPv4 vs IPv6 Comparison

Feature
IPv4
IPv6
Address Size
32 bits (4 bytes)
128 bits (16 bytes)
Address Format
Dotted decimal (192.168.1.1)
Hexadecimal colons (2001:db8::1)
Total Addresses
~4.3 billion
~340 undecillion
Header Size
20-60 bytes (variable)
40 bytes (fixed)
Broadcast
Yes
No (multicast instead)
IPsec
Optional
Built-in
Fragmentation
Routers and hosts
Source host only
Checksum
In header
Removed (handled by other layers)

IPv6 Address Structure

IPv6 addresses are 128 bits long, written as 8 groups of 4 hexadecimal digits, separated by colons.

Full IPv6 Address Example

2001:0db8:85a3:0000:0000:8a2e:0370:7334
Group 1 Group 2 Group 3 Group 4 Group 5 Group 6 Group 7 Group 8
Key Facts:
  • Each group = 16 bits = 4 hex digits
  • 8 groups × 16 bits = 128 bits total
  • Hexadecimal: 0-9 and a-f (case insensitive)
  • Leading zeros can be omitted in each group

Address Compression Rules

IPv6 addresses can be shortened using two simple rules:

Rule 1: Remove Leading Zeros

You can remove leading zeros from any group:

Before: 2001:0db8:00a3:0000:0000:8a2e:0370:7334
After: 2001:db8:a3:0:0:8a2e:370:7334
Important: You must keep at least one digit per group! 0000 becomes 0, not empty.

Rule 2: The Double Colon (::)

Replace ONE sequence of consecutive all-zero groups with ::

Before: 2001:db8:a3:0:0:8a2e:370:7334
After: 2001:db8:a3::8a2e:370:7334
Rule: You can only use :: ONCE in an address! Using it twice would make the address ambiguous.

Interactive Compression Practice

Try It Yourself!

Enter a full IPv6 address to see it compressed:

Common Examples

Full AddressCompressedDescription
2001:0db8:0000:0000:0000:0000:0000:0001 2001:db8::1 Documentation prefix
0000:0000:0000:0000:0000:0000:0000:0001 ::1 Loopback address
0000:0000:0000:0000:0000:0000:0000:0000 :: Unspecified address
fe80:0000:0000:0000:0211:22ff:fe33:4455 fe80::211:22ff:fe33:4455 Link-local address

IPv6 Address Prefix Notation

Like IPv4's CIDR notation, IPv6 uses /prefix-length to indicate the network portion:

2001:db8:acad:1::1/64

Network Prefix (First 64 bits)

2001:db8:acad:1

This identifies the network segment. Routers use this for forwarding decisions.

Interface ID (Last 64 bits)

::1

This identifies the specific host on the network. Often derived from MAC address (EUI-64).
Standard Practice: Most IPv6 networks use a /64 prefix, giving each subnet 2^64 possible host addresses (18 quintillion hosts per subnet!)

IPv6 Address Types

IPv6 has three main types of addresses: Unicast, Multicast, and Anycast. No more broadcast!

Unicast Addresses

Identifies a single interface. A packet sent to a unicast address goes to one specific device.

Global Unicast Address (GUA)

2000::/3

The IPv6 equivalent of public IPv4 addresses. Routable on the internet.

Example:
2001:db8:acad:1::100

Currently assigned: 2000:: to 3fff::

Link-Local Address (LLA)

fe80::/10

Automatically assigned to every IPv6 interface. Only valid on the local link (not routable).

Example:
fe80::1

Required for neighbor discovery and routing protocols.

Unique Local Address (ULA)

fc00::/7

Similar to IPv4 private addresses (10.x, 192.168.x). Not routable on internet.

Example:
fd00:1234:5678::1

Practical range: fd00::/8 (locally assigned)

Loopback Address

::1/128

Same as IPv4's 127.0.0.1 - used to test local TCP/IP stack.

Ping yourself:
ping ::1

Multicast Addresses

Identifies a group of interfaces. A packet sent to a multicast address is delivered to all members of the group.

All Multicast Addresses

ff00::/8
AddressScopeDescription
ff02::1 Link-local All nodes on the local link (replaces IPv4 broadcast)
ff02::2 Link-local All routers on the local link
ff02::5 Link-local All OSPF routers
ff02::6 Link-local All OSPF DR routers
ff02::9 Link-local All RIP routers
ff02::a Link-local All EIGRP routers
ff02::1:ffxx:xxxx Link-local Solicited-node multicast (for neighbor discovery)
Multicast Scopes (second hex digit):
  • ff01:: - Interface-local (loopback)
  • ff02:: - Link-local (same subnet)
  • ff05:: - Site-local (organization)
  • ff0e:: - Global (internet-wide)

Anycast Addresses

Assigned to multiple interfaces (usually on different nodes). A packet sent to an anycast address is delivered to the nearest interface with that address.

How Anycast Works

Client
Sends to 2001:db8::1
Server A (Nearest)
2001:db8::1 ✓
Server B
2001:db8::1
Server C
2001:db8::1

Anycast Use Cases

  • DNS Root Servers - Same IP, multiple locations worldwide
  • CDN Edge Servers - Route users to nearest cache
  • DDoS Mitigation - Distribute attack traffic
  • Load Balancing - Geographic distribution
Technical Note: Anycast addresses look exactly like unicast addresses. The difference is in how they're configured on multiple devices.

Quick Reference: Address Type Identification

First Hex DigitsAddress TypeNotes
2xxx or 3xxxGlobal UnicastInternet routable
fe80Link-LocalAuto-configured, not routable
fc00 or fd00Unique LocalPrivate addresses
ff00MulticastOne-to-many
::1LoopbackLocal host only
::UnspecifiedNo address assigned

IPv6 Address Configuration Methods

IPv6 offers multiple ways to configure addresses, from fully automatic to fully manual.

SLAAC - Stateless Address Autoconfiguration

Devices automatically configure their own addresses without a DHCP server!

How SLAAC Works

1⃣ Client
Sends Router Solicitation (RS)
to ff02::2 (all routers)
2⃣ Router
Sends Router Advertisement (RA)
Prefix: 2001:db8:acad:1::/64
3⃣ Client Creates Address
Prefix + Interface ID (from MAC)
2001:db8:acad:1:aabb:ccff:fedd:eeff
EUI-64 Process:
  1. Take MAC address: aa:bb:cc:dd:ee:ff
  2. Split in half: aa:bb:cc | dd:ee:ff
  3. Insert ff:fe: aa:bb:cc:ff:fe:dd:ee:ff
  4. Flip 7th bit: a8:bb:cc:ff:fe:dd:ee:ff
  5. Result: a8bb:ccff:fedd:eeff
Privacy Concern: EUI-64 embeds your MAC address in your IPv6 address, making you trackable across networks!

Solution: RFC 4941 "Privacy Extensions" generate random interface IDs that change periodically.
# Cisco Router - Enable SLAAC
Router(config)# ipv6 unicast-routing
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ipv6 address 2001:db8:acad:1::1/64
Router(config-if)# no shutdown
# Router automatically sends RAs with this prefix

DHCPv6 - Stateful Configuration

Like DHCP for IPv4, but with IPv6-specific options.

Stateful DHCPv6

DHCP server assigns the full address AND other settings.

  • Full IPv6 address
  • DNS servers
  • Domain name
  • Other options
# RA Flag: M=1 (Managed)
ipv6 nd managed-config-flag

Stateless DHCPv6

SLAAC for address, DHCPv6 for other settings only.

  • Address (uses SLAAC)
  • DNS servers
  • Domain name
  • Other options
# RA Flag: O=1 (Other)
ipv6 nd other-config-flag
RA Flags Summary:
M FlagO FlagClient Behavior
00SLAAC only (no DHCPv6)
01SLAAC + Stateless DHCPv6 for DNS, etc.
10Stateful DHCPv6 for everything
11Stateful DHCPv6 for everything

Static Configuration

Manually assign IPv6 addresses - best for servers, routers, and infrastructure devices.

# Cisco IOS - Static IPv6

Router(config)# interface GigabitEthernet0/0
Router(config-if)# ipv6 address 2001:db8:acad:1::1/64
Router(config-if)# ipv6 address fe80::1 link-local
Router(config-if)# no shutdown

# Verify
Router# show ipv6 interface brief
# Linux - Static IPv6

$ sudo ip -6 addr add 2001:db8:acad:1::100/64 dev eth0
$ sudo ip -6 route add default via 2001:db8:acad:1::1

# Verify
$ ip -6 addr show
$ ip -6 route show
# Windows - Static IPv6 (PowerShell)

New-NetIPAddress -InterfaceAlias "Ethernet" `
-IPAddress "2001:db8:acad:1::100" `
-PrefixLength 64 `
-DefaultGateway "2001:db8:acad:1::1"

# Set DNS
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" `
-ServerAddresses "2001:4860:4860::8888"

Verification Commands

# Cisco IOS

show ipv6 interface brief
GigabitEthernet0/0 [up/up]
FE80::1
2001:DB8:ACAD:1::1

show ipv6 route
show ipv6 neighbors
ping ipv6 2001:db8::1
# Linux / Windows

# Linux
ip -6 addr show
ip -6 route show
ip -6 neigh show
ping6 2001:db8::1

# Windows
ipconfig /all
netsh interface ipv6 show addresses
ping -6 2001:db8::1