SLAAC and DHCPv6: stateless, stateful, RA flags and DHCPv6 relay
Sign in to read this lesson
With SLAAC a host doesn't get its address from a server. It learns the subnet's prefix with RS/RA, creates the interface ID itself with EUI-64 or randomly, and checks it is unique with DAD. Classic SLAAC doesn't provide a DNS server; stateless DHCPv6 does. Stateless DHCPv6 keeps no state, stateful DHCPv6 tracks addresses and their leases. The router uses the A, O and M flags in the RA to tell hosts which method to use. DHCPv6 messages are Solicit, Advertise, Request and Reply. If the server is on another subnet, ipv6 dhcp relay destination is configured on the client-facing interface.
What you will learn
- SLAAC: (1) learn the prefix with RS/RA, (2) create the interface ID yourself (Cisco: EUI-64, some OSes: random), (3) do DAD. The default gateway is the router's link-local address from the RA.
- Classic SLAAC does not provide a DNS server. Stateless DHCPv6 only gives extra information such as DNS and tracks nothing; stateful DHCPv6 also hands out addresses and keeps track (state) of what was given to whom.
- RA flags: A=1 → SLAAC; O=1 → extra information from stateless DHCPv6; M=1 → stateful DHCPv6. Default: A=1, O=0, M=0. Commands:
ipv6 nd other-config-flag(O),ipv6 nd managed-config-flag(M). - DHCPv6 messages: Solicit → Advertise → Request → Reply (IPv4: Discover, Offer, Request, Ack). The client sends to FF02::1:2 (all DHCP relay agents and servers); UDP ports 546 (client) and 547 (server).
- FF02::1:2 is link-local scope and doesn't leave the subnet. If the server is on another subnet:
ipv6 dhcp relay destination <server>on the client-facing interface. The router sends the message as a Relay-Forward from its outgoing interface address to the server.
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.