Sub topic 9
IPv6 Addressing Basics
This chapter assumes you already know IPv4 addressing, the subnet mask, and the default gateway from the earlier chapters. It covers how IPv6 addresses are written, the main address types, and the mistakes that most often appear on the exam.
Why IPv6 Exists
IPv4 uses 32-bit addresses, which gives about 4.3 billion addresses. That pool has run out. IPv6 uses 128-bit addresses, which gives about 3.4 × 10^38 addresses. NAT (network address translation, covered in the SOHO router chapter) stretched IPv4's life, but IPv6 gives every device its own address.
Reading an IPv6 Address
An IPv6 address is written as eight groups of four hexadecimal digits, separated by colons. Each group is 16 bits.
2001:0db8:0000:0000:0000:ff00:0042:8329You can shorten an address with two rules:
- Drop leading zeros in each group.
0042becomes42. - Replace one run of consecutive all-zero groups with
::. You may use::only once per address, because using it twice would make the address ambiguous.
2001:db8::ff00:42:8329Hex digits are 0-9 and a-f. They are not case sensitive.
Main Address Types
| Type | Prefix | Purpose |
|---|---|---|
| Global unicast | 2000::/3 (starts with 2 or 3) | Routable on the internet, like a public IPv4 address |
| Link-local | fe80::/10 | Works only on the local link. Never routed |
| Unique local | fc00::/7 (usually fd) | Private use inside an organization, like 10.x.x.x |
| Multicast | ff00::/8 | One sender, many receivers |
| Loopback | ::1 | The device itself, like 127.0.0.1 |
IPv6 has no broadcast. Multicast and anycast replace it. Anycast gives one address to several devices, and traffic goes to the nearest one.
Every IPv6 interface has a link-local address, even when no router or DHCP server exists. It plays a role similar to APIPA, but it is a normal part of IPv6 and does not signal a failure.
How a Device Gets an Address
The first 64 bits are the network prefix. The last 64 bits are the interface ID. A device can get its address in two ways:
- SLAAC (stateless address autoconfiguration): The router advertises the prefix, and the device builds its own interface ID.
- DHCPv6: A server assigns the address, much like DHCP for IPv4.
Checking IPv6 on Windows
ipconfig shows IPv6 addresses alongside IPv4. Link-local addresses end in a zone suffix such as %12, which names the interface.
ipconfig
ping ::1
ping -6 example.comThe first ping tests the local IPv6 stack. The second forces IPv6 name resolution and reachability.
Common Errors
- Using
::twice in one address. - Mistaking
fe80::for a sign of a broken DHCP server. It is always present. - Looking for a subnet mask. IPv6 uses prefix length, such as
/64, instead.
Exercise
Shorten 2001:0db8:0000:0000:0000:0000:0000:0001 and name its address type.
Show answer
2001:db8::1. It is a global unicast address, because it starts with 2.
Exercise
A Windows PC has no router or DHCP server on its network. Which IPv6 address will it still have, and what prefix does it use?
Show answer
A link-local address, which uses the prefix fe80::/10.