Stateless Address Autoconfiguration (SLAAC)
Stateless Address Autoconfiguration (SLAAC) is a method that allows a device to obtain its prefix, prefix length, and default gateway address information from an IPv6 router without the use of a DHCPv6 server. Using SLAAC, devices rely on the local router’s ICMPv6 Router Advertisement (RA) messages to obtain the necessary information.
IPv6 routers periodically send out ICMPv6 Router Advertisement (RA) messages to all IPv6-enabled devices on the network. By default, Cisco routers send out RA messages every 200 seconds to the IPv6 all-nodes multicast group address. An IPv6 device on the network does not have to wait for these periodic RA messages. A device can send a Router Solicitation (RS) message to the router, using the IPv6 all-routers multicast group address. When an IPv6 router receives an RS message it will immediately respond with a router advertisement.
Even though an interface on a Cisco router can be configured with an IPv6 address, this does not make it an “IPv6 router”. An IPv6 router is a router that:
- Forwards IPv6 packets between networks
- Can be configured with static IPv6 routes or a dynamic IPv6 routing protocol
- Sends ICMPv6 RA messages
IPv6 routing is not enabled by default. To enable a router as an IPv6 router, the ipv6 unicast-routing global configuration command must be used.
Note: Cisco routers are enabled as IPv4 routers by default.
The ICMPv6 RA message contains the prefix, prefix length, and other information for the IPv6 device. The RA message also informs the IPv6 device how to obtain its addressing information. The RA message can contain one of the following three options, as shown in the figure:
- Option 1 - SLAAC Only – The device should use the prefix, prefix-length, and default gateway address information contained in the RA message. No other information is available from a DHCPv6 server.
- Option 2 – SLAAC and DHCPv6 – The device should use the prefix, prefix-length, and default gateway address information in the RA message. There is other information available from a DHCPv6 server such as the DNS server address. The device will, through the normal process of discovering and querying a DHCPv6 server, obtain this additional information. This is known as stateless DHCPv6 because the DHCPv6 server does not need to allocate or keep track of any IPv6 address assignments, but only provide additional information such as the DNS server address.
- Option 3 – DHCPv6 only – The device should not use the information in this RA message for its addressing information. Instead, the device will use the normal process of discovering and querying a DHCPv6 server to obtain all of its addressing information. This includes an IPv6 global unicast address, prefix length, a default gateway address, and the addresses of DNS servers. In this case, the DHCPv6 server is acting as a stateful DHCP server similar to DHCP for IPv4. The DHCPv6 server allocates and keeps track of IPv6 addresses so it does not assign the same IPv6 address to multiple devices.
Routers send ICMPv6 RA messages using the link-local address as the source IPv6 address. Devices using SLAAC use the router’s link-local address as their default gateway address.