Dec 162011
DHCPv6 - DHCP for IPv6

Spend 30 minutes with IPv6 every Friday!While DHCPv6 still is named “DHCP” it is quite different compared with DHCP for IPv4. This article tries to highlight a few changes and discuss the new features. In a previous article about address auto-configuration, we described the two ways a host can get an address: stateless address configuration with the help of router advertisements and stateful configuration with DHCPv6.
Spend 30 minutes to learn more about DHCPv6!

The new DHCP – Dynamic Host Configuration Protocol version 6

DHCPv6 - DHCP for IPv6DHCP was created as the successor to an old protocol named BOOTP. In BOOTP you listed MAC addresses and gave each one an IP address. This is still possible in DHCP but a new dynamic address assignment was added, where a host can lease an address for a limited amount of time. In addition to IP address management, DHCP distributes information about network services, like DNS and SIP servers, and pointers for applications that need help finding configurations. The function of DHCP is to configure a network host so that it can communicate fully on the IP network. It’s not about configuring the operating system.

IPv6 originally wanted to get rid of the dependency on DHCP. Hosts should be able to configure not one, but multiple addresses, by itself. By bootstrapping communication with a link-local address the host should be able to communicate with a router and get the information needed to configure a global address.

The missing part was of course DNS and the rest of the network and application information. DHCPv6 was highlighted again as a necessary service in most networks. But it took a long time until it was implemented – in the Mac world OS/X Lion, released in 2011, was the first version to support DHCPv6.

DHCPv6 operates in many modes

DHCPv6 can operate in many modes compared with DHCP for IPv4

  • Stateless mode: In combination with stateless IP configuration with router advertisments DHCPv6 delivers DNS servers and other information, like options for SIP phones and other services.
  • Stateful mode: A host can also configure it’s IP address (like with DHCP for IPv4) with DHCPv6
  • DHCPv6-PD: A home router may get a network prefix with DHCPv6 from a service provider
When a device connects to the IP network, it sends out a Router Solicitation. In the response, a Router Advertisment, it gets a couple of flags. The O flag indicates that there’s “other” information to be found in DHCPv6 servers. The M flag indicates managed mode where the client should ask DHCPv6 for an IP address and not configure one statelessly.
If you have managed IP address allocations with DHCP for IPv4, DHCP for IPv6 is almost, but not fully, the same. The difference lies in how the device identifies itself to the DHCP server.

Host identifiers in IPv6 – meet the DUID

DHCP in IPv4 is based on the MAC address. The assumption was that one host in most cases only had one network interface. The world has changed since then and a host frequently has many IP capable interfaces. A Mac laptop can run IP over Bluetooth, WLAN, Firewire and Ethernet at the same time – plus an USB attached 3g dongle…
DHCPv6 has a host identifier, named DUID – Device UID – and a set of interface identifiers. The RFC defines a DUID this way:
 DUID                      A DHCP Unique IDentifier for a DHCP
                                participant; each DHCP client and server
                                has exactly one DUID.

Each interface has an ID, called IAID – Interface Association Identifier – that is a binding between the interface and one or several IP addresses. Each allocation in the DHCPv6 server is identified by a DUID and a IAID. The question is how these are created. It’s not the same as the mac address, but can be based on it.

RFC 4361 describes a migration solution by adding DUID device identifiers to DHCP for IPv4. Microsoft already supports this.

Finding the DUID

RFC 3315 defines three types of DUIDs. RFC 6355 adds one based on UUID. The DUID is supposed to be stored in permanent storage, not to be changed during a products lifetime. The three original types are:

      1        Link-layer address plus time
      2        Vendor-assigned unique ID based on Enterprise Number
      3        Link-layer address

The reason for having multiple types is explained:

   The motivation for having more than one type of DUID is that the DUID
   must be globally unique, and must also be easy to generate.  The sort
   of globally-unique identifier that is easy to generate for any given
   device can differ quite widely.  Also, some devices may not contain
   any persistent storage.  Retaining a generated DUID in such a device
   is not possible, so the DUID scheme must accommodate such devices.
The problem is of course that it will be very hard to determine the DUID for a device beforehand. In DHCPv4 it was common to scan the barcode of the MAC address on almost any device and enter it in a DHCP table. Hopefully vendors will assign DUIDs to equipment (type 2) and print them in barcode alongside the old MAC address.

UUIDs for SIP devices

The fourth type fits perfectly in the SIP world. New standards in SIP are based on each device having a globally unique UUID which is used at registration to detect multiple registrations from the same device (over different flows or different address families). Using the same identifier simplifies management.

Current implementations of DUID generation

A web page with DHCPv6 configuration examples from Michigan Tech explains how a few operating systems generate DUIDs. Windows 7 has a registry entry that is changeable, the Dibbler client can generate both type 1 and type 2 DUIDs. If you run “ipconfig” in Windows 7 you will see both IAID and DUID
   DHCPv6 IAID . . . . . . . . . . . : 234901590
   DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-14-77-21-A2-00-50-56-AA-5E-EE

Executive summary:

DHCP in IPv6 works in combination with IPv6 Router discovery. With the proper RA flags DHCPv6 works very much like DHCP for IPv4. The big difference is the way the device identifies itself if you want to assign addresses yourself instead of selecting addresses dynamically from a pool. DHCP relaying in routers, DHCP options for network services and the DHCP protocol in itself is almost the same.
DHCPv6 has a new function for ISPs when assigning networks to customers, where the customer router can ask for a network prefix from the carrier’s DHCPv6 server.
Continue reading on the documents linked below. Spend at least 30 minutes on DHCPv6 today!



  • RFC 3315 :: Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
  • RFC 4361: Using DUIDs in DHCP for IPv4
  • RFC 6355 :: Definition of the UUID-Based DHCPv6 Unique Identifier (DUID-UUID)
Blogs, articles
Vendor pages