Dealing with DHCPv6 requirements vs. IPv4 DHCP requirements can be a challenge. One of the interesting challenges with getting up to speed in IPv6 is understanding the functional differences that DCHP provides in IPv4 compared to IPv6. The operational role for both DHCP and DHCPv6 is the same: To provide IP addresses to hosts (reserved or dynamic from a pool). However, how each does this is slightly different.
DHCP utilizes a helper address (typically on the default gateway device) to forward local network requests for an IPv4 address. It is possible to build a reservation in the DHCP address pool for a specific host and to match that IPv4 reservation based on the MAC address of the host (physical or a virtual machine).
Some common examples would be in a voice over IP deployment where handsets are being deployed. Often the MAC address is obtained from an inventory spreadsheet that could have been gathered by scanning the physical boxes the handsets are shipped in or gathered from a call management system. Another example is virtual environments where system administrators know the MAC address of a host prior to even building out the virtual machine. A pool of MAC addresses that are reserved for new virtual hosts is how a reservation is made. Knowing this information in advance, a corresponding IPv4 address can be set aside in a DHCP lease for the VoIP handset or VM guest host in the two examples.
DHCPv6 (RFC 3315 – http://tools.ietf.org/html/rfc3315) however provides a different method for this process. For non-link-scoped multicast, the IPv6 process assumes you will have to route off the local subnet for a DHCPv6 request and therefore utilizes a proxy method allowing a router (relay) to send a request directly to a DHCPv6 server(s) on the host’s behalf and to request multiple prefixes if required. Additionally, it uses a different standard when a layer 2 solution is required for bridging networks called Lightweight DHCPv6 Relay Agent (RFC 6221 – http://tools.ietf.org/html/rfc6221).
Besides these two differences, the most noticeable operational difference is that DHCPv6 requires different parameter information to build out a reservation. IPv6 does not make use of MAC addresses to match a reservation to a host. Instead, it use a DHCP Unique Identifier (DUID) and an Identity Association Identifier (IAID – seems like a redundant acronym doesn’t it?) to match the host to an IPv6 reservation you have built out.
The challenge with this situation is that the DUID is typically generated at first boot (runtime) of an OS. After creation they are relatively permanent (although a new one can be generated if needed). This can be problematic for virtual environments using gold image releases of an OS to build a host. In Windows for instance you need to make sure you run sysprep prior to turning up a guest OS or you will get a conflict in the DUID value and likely your DHCPv6 reservation will not work correctly for that host.
The second challenge becomes determining the IAID for a host. Again, this is a function of the runtime environment of the host, which means it has to have been booted at least once and the interface has to have been enabled. It does not require that it have an IP address assigned but the host OS will build an Identity for each interface that is enabled.
So, what impact does this have on your ability to make DHCPv6 reservations in any automated manner? First, it requires that you boot the physical or virtual host with its OS at least once to get it to build out a DUID or IAID. Alternatively, you need a method to prep the OS and set those values at creation time of the OS itself. Second, you need a method of extracting those DUID and IAID values from the OS if you did not set them specifically. Alternatively, you can go through a two-step process and boot the OS (which will set the DUID and IAID) and have it request an IPv6 address from a DHCPv6 IPv6 address pool you have enabled. You can then look up the reservation in the DHCPv6 server and extract the DUID and IAID information from the DHCPv6 server. With this information you can set the DHCPv6 reservation as you now know the parameter information required to build a proper reservation. You can then either reboot the host or have the host release and request a new IPv6 address. The next request should provide the host with the IPv6 address you have made the reservation for.
As you can see, while both DHCPv6 and DHCP functionally operate in a similar manner, you may find you have to do more work to build out DHCPv6 IPv6 address reservation. Also, automation may require more steps and more logic to complete the same operational function. While it is more work it is still possible to do all the same things with both protocols, you just need to plan and test to ensure you are deploying in the method you want for your environment.