// Lesson 13 of 49 · IPv6
IPv6 address format
IPv4 has about 4.3 billion addresses — far too few for every phone, laptop and sensor. IPv6 uses 128-bit addresses: enough that every subnet can have 2^64 addresses and NAT is no longer needed for address shortage.
Notation
An IPv6 address is written as eight groups of four hexadecimal digits (each group = 16 bits = a "hextet"):
2001:0db8:0000:0000:0a1b:0000:0000:0042
Hex digits are 0–9 and a–f; case does not matter (lowercase is the convention).
The two shortening rules
- Leading zeros in any group can be removed:
0db8→db8,0042→42,0000→0. - One run of consecutive all-zero groups can be replaced by
::— only once per address, otherwise the length would be ambiguous.
2001:0db8:0000:0000:0a1b:0000:0000:0042
2001:db8:0:0:a1b:0:0:42 (rule 1)
2001:db8::a1b:0:0:42 (rule 2 on the first run)
When there are two equal runs, the convention (RFC 5952) is to compress the first, longest run.
Expanding is the reverse: count the groups you have, and :: stands for as many zero groups as are needed to reach eight.
Prefixes
IPv6 uses prefix lengths only — no dotted masks.
- A typical LAN subnet is /64: the first 64 bits identify the network, the last 64 bits (the interface ID) identify the host.
- Organisations commonly receive a /48 (65,536 /64 subnets) or a /56 from their provider.
There is no subnet arithmetic on normal LANs: you change the 4th hextet to create a new /64. For example, from 2001:db8:acad::/48:
| Subnet | Use |
|---|---|
| 2001:db8:acad:10::/64 | VLAN 10 |
| 2001:db8:acad:20::/64 | VLAN 20 |
| 2001:db8:acad:ff00::/64 | Point-to-point links (or /127) |
Things IPv6 does differently
- No broadcasts. Multicast does that job (for example neighbour discovery).
- ARP is replaced by NDP (Neighbour Discovery Protocol, part of ICMPv6).
- Hosts usually have several addresses at once (link-local plus one or more global).
- The IPv6 header is simpler and fixed at 40 bytes; routers do not fragment packets.
Key points
- 128 bits, 8 hextets, hexadecimal.
- Drop leading zeros; use
::once for the longest run of zero groups. - LANs are /64; subnets are made by changing the subnet ID, not by maths.
- No broadcast, no ARP — multicast and NDP instead.
Sign in to save your lesson progress across devices. You can read every published lesson without an account.