AiTechWorlds
AiTechWorlds
University learning companion
Computer Networks · IPv6: Why We Needed It and How It Works
Use this course-level map to place “IPv6: Why We Needed It and How It Works” in the larger system. It complements—not replaces—a topic-specific worked diagram.
In 1983, when engineers assigned IPv4 its 32-bit address space, 4.3 billion addresses sounded like science fiction more than every person on Earth could ever need. The internet was a network of a few hundred research computers. Nobody owned a smartphone. Nobody had a smart thermostat, a connected refrigerator, or a fitness tracker phoning home every 30 seconds.
Fast forward to 2011. The Internet Assigned Numbers Authority (IANA) allocated the last available IPv4 blocks to regional registries. By 2015, ARIN the registry for North America issued its final IPv4 addresses. The address pool was bone dry. The internet had not collapsed only because of stopgap measures: Network Address Translation (NAT) allowed thousands of private devices to share a single public IP, buying years of extra time. But NAT was a workaround, not a solution. IPv6 is the solution.
IPv4 uses 32-bit addresses, which allows for 2³² = 4,294,967,296 unique addresses. That sounds like a lot until you account for:
"We didn't just run out of IPv4 addresses we ran out because the internet succeeded beyond anyone's imagination." Vint Cerf, co creator of TCP/IP
IPv6 uses 128-bit addresses, providing 2¹²⁸ addresses a number so large it has a name: 340 undecillion (340,282,366,920,938,463,463,374,607,431,768,211,456).
To put that in perspective: if every grain of sand on Earth had its own internet connection, IPv6 would still have addresses left over for every grain of sand on a trillion more Earths.
An IPv6 address is written as 8 groups of 4 hexadecimal digits, separated by colons:
2001:0db8:85a3:0000:0000:8a2e:0370:7334Each group represents 16 bits. Total: 8 × 16 = 128 bits.
Writing full IPv6 addresses is tedious. Two compression rules help:
Rule 1 Leading zeros in a group can be omitted:
2001:0db8:0001:0000 → 2001:db8:1:0Rule 2 One consecutive sequence of all zero groups can be replaced with :::
2001:0db8:0000:0000:0000:0000:0000:0001
↓
2001:db8::1The :: shorthand can only appear once in an address otherwise the full address would be ambiguous.
IPv6 eliminates broadcast and introduces three main address types:
| Type | Description | Example |
|---|---|---|
| Unicast | One to one delivery, single interface | 2001:db8::1 |
| Multicast | One to many, group of receivers | ff02::1 (all nodes) |
| Anycast | One to nearest, same address on multiple nodes | Used in CDNs and DNS |
Important: IPv6 has no broadcast. Instead, multicast handles tasks that broadcast handled in IPv4. This reduces unnecessary traffic on local networks.
Special addresses:
::1 loopback (equivalent to IPv4's 127.0.0.1)fe80::/10 link local addresses (auto configured, not routable)2001:db8::/32 documentation/example range (RFC 3849)IPv6 devices can generate their own globally routable address without a DHCP server. The device combines the network prefix (from the router) with its own interface identifier (derived from the MAC address using EUI-64, or randomly generated for privacy). This simplifies network administration significantly.
The IPv4 header has 12 fields and optional extensions of variable length a nightmare for routers to process quickly. IPv6 has a fixed 40-byte header with only 8 fields:
IPv4 Header (20–60 bytes, variable):
+--------+--------+--------+--------+
|Version | IHL | DSCP | ECN | Total Length ...
+--------+--------+--------+--------+
[12 required fields + options]
IPv6 Header (fixed 40 bytes):
+--------+--------+--------+--------+
|Version | Traffic Class | Flow Label|
+--------+--------+--------+--------+
|Payload Length |Next Header|Hop Limit|
+--------+--------+--------+--------+
| Source Address (128-bit) |
+------------------------------------+
| Destination Address (128-bit) |
+------------------------------------+No more checksum field (handled by transport layer). No more fragmentation in routers (only at source).
IPv4 added IPSec as an optional bolt on. IPv6 was designed with IPSec support from the ground up, enabling end to end encryption at the network layer.
The 20-bit Flow Label field allows routers to identify and handle packets belonging to the same flow (e.g., a video call) without examining the full packet enabling better QoS.
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address length | 32-bit | 128-bit |
| Address format | Dotted decimal (192.168.1.1) | Colon hex (2001:db8::1) |
| Address space | ~4.3 billion | ~340 undecillion |
| Header size | 20–60 bytes (variable) | 40 bytes (fixed) |
| Broadcast | Yes | No (replaced by multicast) |
| Address config | Manual or DHCP | SLAAC or DHCPv6 |
| IPSec | Optional | Built in support |
| NAT required? | Usually yes | No (enough addresses for all) |
| Fragmentation | By routers | Only by source host |
| Checksum in header | Yes | No |
Despite IPv6 being finalised in 1998 (RFC 2460), the internet cannot flip a switch. Billions of devices, routers, and applications still speak only IPv4. The dual stack approach is the current solution:
Your Device
│
├── IPv4 stack: 192.168.1.10 ──── reaches IPv4-only sites
│
└── IPv6 stack: 2001:db8::cafe ── reaches IPv6-enabled sitesIn dual stack mode, a device has both an IPv4 and an IPv6 address. When connecting to a server that supports both, modern operating systems prefer IPv6 (via a mechanism called "Happy Eyeballs" RFC 6555 which races both connections and uses whichever responds first).
Other transition mechanisms include:
According to Google's IPv6 statistics, as of 2024, approximately 40–45% of all traffic reaching Google's servers arrives over IPv6. Major ISPs in the US, India, and Germany have been pushing IPv6 to consumers rapidly.
Your home router almost certainly already has an IPv6 address. You can check right now:
# Linux/Mac
ip -6 addr show
ping6 ipv6.google.com
# Windows
ipconfig
ping -6 ipv6.google.comIPv4's 4.3 billion addresses were not enough for a world of 15+ billion connected devices. IPv6 solves this permanently with 128-bit addresses, simplified headers, built in IPSec support, and stateless autoconfiguration. The internet is in a dual stack transition period that will last for years but IPv6 is increasingly the default. Understanding it is not optional for any modern network professional.
University learning companion
Computer Networks · IPv6: Why We Needed It and How It Works
Complete the steps without looking at the answer first; record evidence rather than only a final result.
These are primary or established learning references for this subject. Check the relevant chapter or specification for the exact topic and version.
Get this course's notes on Telegram!
Free cheat sheets, summaries & practice exercises