Lably
Skip to content

DHCPv6

Protocol for statefully assigning IPv6 addresses on an IPv6 network

  • 3 min read
  • 2 chapters

Related on Lably

Through IP address

IPv6 hosts may automatically generate IP addresses internally using stateless address autoconfiguration (SLAAC), or they may be assigned configuration data with DHCPv6, or both.

IPv6 hosts that use stateless autoconfiguration may need information other than what SLAAC provides on a given network. DHCPv6 can provide this information whether it is being used to assign IP addresses or not. DHCPv6 can provide host with the addresses of Domain Name System (DNS) servers, but they can also be provided through Neighbor Discovery Protocol, which is the mechanism for stateless autoconfiguration.

Many IPv6 routers, such as routers for residential networks, must be configured automatically with no operator intervention. Such routers require not only an IPv6 address for use in communicating with upstream routers, but also an IPv6 prefix for use in configuring devices on the downstream side of the router. DHCPv6 prefix delegation provides a mechanism for configuring such routers.

Operation

Port numbers

Clients listen for DHCP messages on UDP port 546. Servers and relay agents listen for DHCP messages on UDP port 547.

Identifiers

DHCP unique identifier

The DHCP unique identifier (DUID) is used by a client to get an IP address from a DHCPv6 server. It has a 2-byte DUID type field, and a variable-length identifier field up to 128 bytes. Its actual length depends on its type. The server compares the DUID with its database and delivers configuration data (address, lease times, DNS servers, etc.) to the client.

Four DUID types are identified:

  • Link-layer address plus time (DUID-LLT)
  • Vendor-assigned unique ID based on enterprise number (DUID-EN)
  • Link-layer address (DUID-LL)
  • UUID-based DUID (DUID-UUID)

Due to the fact that it is difficult to manage multiple identifiers in a dual-stack environment, and the fact that DUIDs are simply not optimal for some situations, RFC 6939 was released, giving a way to identify a host based on its MAC address. It defines a way for a DHCPv6 relay to pass that information to a DHCPv6 server.

Example

In this example, without rapid-commit present, the server's link-local address is fe80::0011:22ff:fe33:5566 and the client's link-local address is fe80::aabb:ccff:fedd:eeff.

  • Client sends a solicit from [fe80::aabb:ccff:fedd:eeff]:546 to multicast address [ff02::1:2]:547.
  • Server replies with an advertise from [fe80::0011:22ff:fe33:5566]:547 to [fe80::aabb:ccff:fedd:eeff]:546.
  • Client replies with a request from [fe80::aabb:ccff:fedd:eeff]:546 to [ff02::1:2]:547.
  • Server finishes with a reply from [fe80::0011:22ff:fe33:5566]:547 to [fe80::aabb:ccff:fedd:eeff]:546.

DHCPv6 Message types

This table lists the DHCPv6 message types.

Sign in to keep reading

One more chapter is free with a Lably account.

More in Computing and communication