IPv6 — How DHCPv6 works?

Geeky much!
Networks & Security
2 min readJul 16, 2021

--

Dynamic Host Configuration Protocol version 6 is similar to DHCP in IPv4 and its function is to configure IPv6 clients with the information required by an IPv6 device to operate on an IPv6 local network.

In IPv6 a device can get addressing information in 3 ways:

  • Stateless address autoconfiguration (SLAAC)
  • Stateful address autoconfiguration
  • Manual (Too complicated and uncommon in usage)

SLAAC

SLAAC refers to the ability of the host’s ability to get addressing information by itself.

  • A host can also get other information like DNS address through NDP, or by DHCPv6
  • Stateless means that a server doesn’t maintain information like IP address, lease time, etc.
  • IPv6 hosts use SLAAC by default.

Stateful AAC

Refers to centrally managed IPv6 address assignment and other services. And client and server states are also maintained in this method. Stateful AAC works with the help of the DHCPv6 server.

DHCPv6 is used when —

  • No router is found.
  • If the router advertisement message enables the use of DHCPv6.

A client wants IPv6 addressing info. It sends a Neighbor Solicitation to a router. But the router replies “You need to contact DHCPv6 server”. The client then sends a solicit message to the DHCPv6 server. Note that the destination address in the solicit message is a multicast address (FF02).

The DHCPv6 server replies with the advertise message offering necessary addressing info. Then the client sends the request and the server responds with a reply. Note the destination address uses the link-local addresses of each other in advertise, request, and reply packets.

DHCPv6 uses UDP 546 for the client and 547 for the server.

--

--