Describe the format of an IPv6 address.
Show the answer
Say this first
128 bits written as eight groups of 16 bits (hextets), each as up to four hex digits, separated by
colons. The prefix length follows a slash, like 2001:db8:acad:10::1/64. On a LAN the first 64 bits
are the network prefix (global routing prefix plus subnet ID) and the last 64 bits are the interface ID.
Go deeper
The pieces
2001:0db8:acad:0010:0000:0000:0000:0001/64
|-- global routing prefix --|subnet|----- interface ID -----|
48 bits 16 bits 64 bits- Each hex digit is 4 bits (a nibble), so prefix lengths on multiples of 4 line up with digits. That is why address plans use /48, /52, /56, /60, /64.
- Letters are case-insensitive. Write them lowercase (RFC 5952). Cisco shows them uppercase anyway.
- There is no subnet mask. You always write the prefix length.
Where the notation bites
- URLs: wrap the address in brackets so the colons do not look like a port:
http://[2001:db8::10]:8080/. - Link-local: the same
fe80::address can exist on every interface, so hosts need a zone ID:ping fe80::1%eth0on Linux,ping fe80::1%12on Windows. - IPv4 inside IPv6: the last 32 bits may be written dotted, as in
::ffff:192.0.2.1or64:ff9b::192.0.2.33.
Quick numbers
| Block | Contains |
|---|---|
| /32 | 65,536 /48s |
| /48 | 65,536 /64s |
| /56 | 256 /64s |
| /64 | 2^64 addresses, about 1.8 x 10^19 |
They will ask next
How many /64 subnets does a site with a /48 have?
2^(64-48) = 2^16 = 65,536.
Why is the interface ID 64 bits?
SLAAC and EUI-64 were designed around a 64-bit interface ID (RFC 4291 requires it for most unicast space). Using a different LAN prefix length breaks SLAAC and surprises a lot of software.
Traps
- Calling the groups octets. They are 16 bits each.
- Writing an address in a URL without brackets.
How did you do?Book 4.2 IP Version 6