1.6 IPv6 Addressing
The 128-bit future of networking. Master the hexadecimal format, abbreviation rules, and the new methods for address assignment and neighbor discovery.
Formatting & Abbreviation
The 128-bit Structure
IPv6 addresses are 128 bits long, written in hexadecimal. They are divided into eight 16-bit segments called hextets (or quartets), separated by colons.
Rule 1: Omit Leading Zeros
In any 16-bit section (hextet), you can drop the leading zeros. You CANNOT drop trailing zeros.
Rule 2: Zero Compression (The Double Colon)
You can replace a single, contiguous string of one or more all-zero hextets with a double colon (::).
The Golden Rule of ::
You can ONLY use the double colon (::) ONCE in an entire IPv6 address. If you use it twice, the router cannot mathematically determine how many zeros are supposed to be in each gap.
IPv6 Address Types
| Type | Prefix / Identifier | IPv4 Equivalent | Characteristics |
|---|---|---|---|
| Global Unicast (GUA) | 2000::/3 | Public IPs | Routable on the public internet. If you see an address starting with a 2 or a 3, it is a Global Unicast address. |
| Unique Local (ULA) | FC00::/7 (or FD) | Private IPs (RFC 1918) | Used internally within a site or enterprise. They are not routable on the public internet. Typically starts with 'FD'. |
| Link-Local | FE80::/10 | APIPA (169.254.x.x) | Valid ONLY on the local physical link. Routers will NOT forward packets with a Link-Local destination. However, unlike APIPA, these are strictly required; IPv6 routing protocols like OSPFv3 use Link-Local addresses to form neighbor adjacencies. |
| Multicast | FF00::/8 | Multicast / Broadcast | IPv6 completely eliminates traditional Broadcasts. Everything that used to be a broadcast is now handled via highly specific Multicast groups. Starts with 'FF'. |
In IPv4, you usually ignore APIPA addresses because they mean DHCP failed. In IPv6, Link-Local (FE80::) is mandatory. Even if you assign a static Global Unicast address to a router interface, it will automatically generate a Link-Local address as well. Routing protocols like OSPFv3 use these Link-Local addresses as the "Next Hop" in the routing table, rather than the global addresses.
Core IPv6 Mechanisms
SLAAC (Stateless Address Autoconfiguration)
IPv6 clients don't strictly need a DHCP server to get an IP. Using ICMPv6 Router Solicitations (RS) and Router Advertisements (RA), a PC can learn the network prefix from the router and generate its own host ID.
EUI-64 Calculation
A method used by SLAAC to generate a unique host ID. It takes the device's 48-bit MAC address, splits it in half, inserts 'FFFE' in the middle to make it 64 bits, and flips the 7th bit of the first byte.
NDP (Neighbor Discovery Protocol)
Because IPv6 doesn't use broadcasts, it cannot use ARP to map IPs to MAC addresses. NDP replaces ARP, using ICMPv6 Multicast messages to discover neighbors on the local link.