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
| Date | Event |
|---|---|
| Feb 2011 | IANA pool exhausted |
| Apr 2011 | APNIC (Asia-Pacific) exhausted |
| Sep 2012 | RIPE (Europe) exhausted |
| Jun 2014 | LACNIC (Latin America) exhausted |
| Sep 2015 | ARIN (North America) exhausted |
| Apr 2017 | AFRINIC (Africa) began rationing |
The Numbers Problem
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
IPv6 Address Structure
IPv6 addresses are 128 bits long, written as 8 groups of 4 hexadecimal digits, separated by colons.
Full IPv6 Address Example
- 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:
After: 2001:db8:a3:0:0:8a2e:370:7334
0000 becomes 0, not empty.
Rule 2: The Double Colon (::)
Replace ONE sequence of consecutive all-zero groups with ::
After: 2001:db8:a3::8a2e:370:7334
:: 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 Address | Compressed | Description |
|---|---|---|
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:
Network Prefix (First 64 bits)
2001:db8:acad:1This identifies the network segment. Routers use this for forwarding decisions.
Interface ID (Last 64 bits)
::1This identifies the specific host on the network. Often derived from MAC address (EUI-64).
/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)
The IPv6 equivalent of public IPv4 addresses. Routable on the internet.
2001:db8:acad:1::100
Currently assigned: 2000:: to 3fff::
Link-Local Address (LLA)
Automatically assigned to every IPv6 interface. Only valid on the local link (not routable).
fe80::1
Required for neighbor discovery and routing protocols.
Unique Local Address (ULA)
Similar to IPv4 private addresses (10.x, 192.168.x). Not routable on internet.
fd00:1234:5678::1
Practical range: fd00::/8 (locally assigned)
Loopback Address
Same as IPv4's 127.0.0.1 - used to test local TCP/IP stack.
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
| Address | Scope | Description |
|---|---|---|
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) |
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
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
Quick Reference: Address Type Identification
| First Hex Digits | Address Type | Notes |
|---|---|---|
2xxx or 3xxx | Global Unicast | Internet routable |
fe80 | Link-Local | Auto-configured, not routable |
fc00 or fd00 | Unique Local | Private addresses |
ff00 | Multicast | One-to-many |
::1 | Loopback | Local host only |
:: | Unspecified | No 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
- Take MAC address:
aa:bb:cc:dd:ee:ff - Split in half:
aa:bb:cc|dd:ee:ff - Insert
ff:fe:aa:bb:cc:ff:fe:dd:ee:ff - Flip 7th bit:
a8:bb:cc:ff:fe:dd:ee:ff - Result:
a8bb:ccff:fedd:eeff
Solution: RFC 4941 "Privacy Extensions" generate random interface IDs that change periodically.
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
ipv6 nd managed-config-flag
Stateless DHCPv6
SLAAC for address, DHCPv6 for other settings only.
Address (uses SLAAC)
DNS servers
Domain name
Other options
ipv6 nd other-config-flag
| M Flag | O Flag | Client Behavior |
|---|---|---|
| 0 | 0 | SLAAC only (no DHCPv6) |
| 0 | 1 | SLAAC + Stateless DHCPv6 for DNS, etc. |
| 1 | 0 | Stateful DHCPv6 for everything |
| 1 | 1 | Stateful DHCPv6 for everything |
Static Configuration
Manually assign IPv6 addresses - best for servers, routers, and infrastructure devices.
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
$ 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
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
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
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
IPv6 Practice Quiz
Test your knowledge of IPv6 addressing! Select the best answer for each question.
Question 1: How many bits are in an IPv6 address?
Question 2: What is the compressed form of 2001:0db8:0000:0000:0000:0000:0000:0001?
Question 3: Which prefix identifies a link-local address?
Question 4: What is the IPv6 loopback address?
Question 5: What does SLAAC stand for?
Question 6: Which multicast address represents "all routers" on the local link?
Question 7: What is the standard prefix length for most IPv6 subnets?
Question 8: Which IPv6 address type is similar to IPv4 private addresses (RFC 1918)?
Question 9: In EUI-64, what bytes are inserted into the middle of a MAC address?
Question 10: How many times can you use "::" in a single IPv6 address?
Quiz Results
Answer all questions to see your score!