IPv6: Autoconfiguration Process

IPv6 The Autoconfiguration Process

IPv4 provides us with DHCP, the equivalent in IPv6 is simply called ‘autoconfiguration’ and we have 2 different flavours: ‘stateful‘ and ‘stateless

Stateful autoconfiguration is used when the host obtains an IPv6 address and other information from a server. Much like normal IPv4 DHCP, only this is called DHCPv6.

With Stateless autoconfiguration, there’s no such dependency, and the entire process starts with the IPv6 host configuring its own link-local address.

An IPv6 address is 128 bits, and here’s where they come from in this instance:

  • The first 64 bits of this self-generated address will be 1111 1110 10 (FE80) followed by 54 zeroes. = 64
  • The last 64 bits are the interface identifier. (We already know about this from a previous post)

The address is tentative at this point. It’s been successfully calculated, but now we must make sure that no other host is using the same address. That’s a remote possibility, but still a possibility, and that’s where DAD comes in – the Duplicate Address Detection feature.

DAD Process

  1. The host will send a Neighbor Solicitation (NS) message to see if any other host on the link is using that same link-local address.
  2. If another host on the link is using that address, that host will respond with a Neighbor Advertisement (NA). When the host that sent the NS receives the NA, it will disable its link-local address.
  3. If no response to the NS is received, the local host is satisfied that it has a unique link-local address.

To complete the addressing process..

The host will send a Router Solicitation (RS) onto the segment. The destination for the RS will be FF02::2, the “all-routers” multicast address.

The host requires more information, therefore a RS is sent, however routers generally send these Router Advertisements (RA) periodically without an express request from a host, but even though the host would only have to wait 10 seconds or so, polling the router now with an RS does speed up the overall process.

Router Advertisement

  • Flags indicating whether the host should use DHCP for addressing information.
  • If DHCP is in use, the RA tells the host where the DHCP server is.
  • If not, the RA contains the prefix and prefix lifetime information.

If DHCP is not in use, the router attaches the network prefix to the host’s link-local address, which results in the host’s full IPv6 address complete with network prefix.