Course contents

Chapter 3: IPv6 ConfigurationLesson 5 of 6

SLAAC: stateless address autoconfiguration

How a host builds its IPv6 address from a router advertisement, EUI-64 and random IDs, and the M and O flags.

Intermediate · 10 min read

Technical definition

SLAAC is Stateless Address Autoconfiguration: a host builds its own IPv6 address from a /64 prefix in a router advertisement and a 64-bit interface ID, with no server tracking the assignment.

How a host builds its address

SLAAC: the host builds its own address
SLAAC: the host builds its own addressThe router advertisement carries the /64 prefix. The host adds a 64-bit interface identifier, made by EUI-64 from its MAC address or randomly, checks the address is unique with duplicate address detection, and sets the router as its default gateway.Prefix from the RA2001:db8:1:1::/64+Interface ID, 64 bitsEUI-64 from MAC, or random2001:db8:1:1:020c:29ff:fe3a:7b11/64Then: duplicate address detection (NS to its own address), default gateway = the router's link-local address.EUI-64: split the MAC, insert fffe in the middle, flip the 7th bit of the first byte (00 → 02).
No DHCP server is needed for the address. Flags in the RA decide whether the host also asks DHCPv6 for options such as DNS (the O flag) or for the address itself (the M flag).
  1. The host creates a link-local address (fe80::/64 plus an interface ID) and checks it with duplicate address detection.
  2. It sends a Router Solicitation, or waits for a periodic Router Advertisement.
  3. The RA carries the /64 prefix with the A (autonomous) flag set, plus the router as default gateway.
  4. The host joins the prefix with its own interface ID and runs duplicate address detection again.

Where the interface ID comes from

EUI-64 derives it from the MAC address: split the 48-bit MAC in half, insert ff:fe in the middle, then flip the 7th bit of the first byte (the universal/local bit). For MAC 00:0c:29:3a:7b:11 the first byte 00 becomes 02, giving 020c:29ff:fe3a:7b11. A router can build interface IDs this way with ipv6 address 2001:db8:1:1::/64 eui-64.

Most hosts today use random or stable-private IDs instead, because EUI-64 exposes the MAC address.

The M and O flags

What the router advertisement flags ask the host to do
What the router advertisement flags ask the host to doM flag; O flag; Result; IOS interface command. 0: 0 SLAAC only: no DHCPv6 (default) 0: 1 SLAAC for the address, stateless DHCPv6 for options such as DNS ipv6 nd other-config-flag 1: any Stateful DHCPv6 for the address; SLAAC is not used unless the prefix also sets the A flag ipv6 nd managed-config-flagM flagO flagResultIOS interface command00SLAAC only: no DHCPv6(default)01SLAAC for the address,stateless DHCPv6 foroptions such as DNSipv6 nd other-config-flag1anyStateful DHCPv6 for theaddress; SLAAC is notused unless the prefixalso sets the A flagipv6 ndmanaged-config-flag

On small screens, swipe sideways or focus the diagram and use the arrow keys.

M is Managed address configuration. O is Other configuration. The RA only suggests: the host decides based on its operating system.

Configuring it on Cisco IOS

Example commands and output on this page were written from Cisco IOS documentation and generally described behaviour. They were not captured from a live device, so prompts and details can differ on your platform and version.

ipv6 unicast-routing interface GigabitEthernet0/0 ipv6 address 2001:db8:1:1::1/64 ipv6 nd other-config-flag no shutdown

The router sends RAs for 2001:db8:1:1::/64 once it has ipv6 unicast-routing and a global address. Hosts build their own address and ask a DHCPv6 server for DNS.

A router interface can also learn its own address through SLAAC with ipv6 address autoconfig, for example on a link to a provider.

Checking the result

Example output · based on Cisco documentation; exact format varies by platform and software version
R1#show ipv6 interface GigabitEthernet0/0
GigabitEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::1
  Global unicast address(es):
    2001:DB8:1:1::1, subnet is 2001:DB8:1:1::/64
  Joined group address(es):
    FF02::1
    FF02::2
  Hosts use stateless autoconfig for addresses.
Example output. The last line confirms the router sends RAs that let hosts use SLAAC. On the host, use ipconfig or ip -6 addr to see the address it built.

Test yourself

Predict · scenario 1

A router advertises 2001:db8:1:1::/64 with the A flag set and M=0, O=0. What does a host do?

Predict · scenario 2

What is the EUI-64 interface ID for MAC 00:1a:2b:3c:4d:5e?

Predict · scenario 3

Which flag tells the host to also ask a DHCPv6 server for DNS information but still use SLAAC for the address?

FAQ

Is SLAAC the same as DHCPv6?
No. SLAAC builds the address on the host from a router advertisement. DHCPv6 is a server that hands out addresses (stateful) or only options such as DNS (stateless). They can be combined.
Does SLAAC give the host a DNS server?
Not on its own. The router can include a DNS option in the RA (RDNSS), or the host can use stateless DHCPv6 with the O flag set.
What is a privacy extension?
A random interface ID that changes over time, so the host's address does not reveal its MAC address or let websites track it across networks. Most current operating systems use random or stable-private IDs by default.