Why 128 bits instead of 32
IPv4's 32 bits cap out at about 4.3 billion possible addresses, and between phones, laptops, IoT (Internet of Things) devices, and servers, that ran out long ago (NAT, or Network Address Translation, the topic later in this module, is largely the industry's workaround for that shortage). IPv6 uses 128 bits: roughly 340 undecillion addresses, enough that every device anyone will ever build can have its own globally unique address with room to spare.
How an IPv6 address is written
An address is written as eight groups of four hex digits separated by colons, like 2001:0db8:0000:0000:0000:ff00:0042:8329. Two shorthand rules make that readable:
- Leading zeros in each group can be dropped:
0db8becomesdb8. - One consecutive run of all-zero groups can be compressed to
::, but only once per address (otherwise it would be ambiguous how many groups it stands for).
Compressed, that same address becomes 2001:db8::ff00:42:8329.
No more broadcast: Multicast does that job now
IPv6 has no broadcast address at all. Anything that used to rely on a broadcast in IPv4 (including ARP, or Address Resolution Protocol) is handled by multicast instead, sent to a specific group of interested listeners rather than flooded to everyone. Address resolution, the IPv6 equivalent of ARP, is a multicast-based protocol called NDP (Neighbor Discovery Protocol).
| IPv4 | IPv6 | |
|---|---|---|
| Address length | 32 bits | 128 bits |
| Notation | Dotted decimal (192.168.1.1) | Hex, colon-separated, compressible (2001:db8::1) |
| Broadcast | Yes | None, replaced by multicast |
| Address resolution | ARP (broadcast) | NDP (multicast) |
| Header | Variable length, header checksum, supports fragmentation fields | Fixed 40 bytes, no checksum, simpler and faster to process per hop |
Every IPv6-enabled interface automatically gets a link-local address starting with fe80::, whether or not it has any other address configured. It's only valid for communicating with devices on the same physical link, but protocols like NDP depend on it existing. You'll see it even on a device with no internet connectivity at all.