All posts

Network Fundamentals: IPv6 — Notation, Address Types and SLAAC

How to write and shorten an IPv6 address, which address types exist, and what replaces ARP and broadcast.

Marijan Kopčić••2 min read
Network Fundamentals: IPv6 — Notation, Address Types and SLAAC

IPv6 looks intimidating mostly because of how the addresses are written. Once the notation and a few address types are clear, most questions answer themselves.

Size and notation

An IPv6 address has 128 bits, written as eight groups of four hexadecimal digits separated by colons:

2001:0db8:0000:0000:0000:ff00:0042:8329

Shortening an address

Two rules:

  1. Drop the leading zeros in each group — 0db8 becomes db8, 0042 becomes 42.
  2. Replace one run of consecutive all-zero groups with ::. Only once per address, otherwise it would be ambiguous how many groups each :: stands for.
2001:0db8:0000:0000:0000:ff00:0042:8329
2001:db8::ff00:42:8329

Address types

Type Prefix What it is
Global unicast 2000::/3 Public, routable addresses
Link-local fe80::/10 Valid only on the local link; every interface has one
Unique local fc00::/7 The IPv6 equivalent of private IPv4 ranges
Multicast ff00::/8 One-to-many delivery
Loopback ::1 The host itself

IPv6 has no broadcast. Everything that used broadcast in IPv4 uses multicast instead.

What replaces ARP

NDP — Neighbor Discovery Protocol — which runs over ICMPv6. Hosts use it to find each other's MAC addresses, to find routers and to detect duplicate addresses. This is also why blocking all of ICMPv6 on a firewall breaks IPv6.

How a host gets an address

  • SLAAC — the router advertises a prefix and the host builds its own address from it.
  • DHCPv6 — a server hands out addresses, as in IPv4.

The standard subnet size is /64, and SLAAC depends on it.

Dual stack

A device has both an IPv4 and an IPv6 address and uses both protocols at the same time. It is the most common way networks run IPv6 today.

Keep reading