DHCPv6 – The Absolute Guide

Welcome to the Absolute Guide to DHCPv6, your one-stop shop for understanding and implementing the Dynamic Host Configuration Protocol for IPv6 (DHCPv6). 

DHCPv6 is an evolution of the well-established DHCP protocol, designed to overcome the limitations of DHCP in IPv6 networks

DHCPV6 guide

This guide will walk you through the ins and outs of DHCPv6, from the basics to advanced configurations. Whether you’re managing a mid-sized enterprise or setting up a small home network, this guide will give you the basic knowledge you need to use DHCPv6 effectively.

Table of Contents.

  1. Introduction to DHCPv6.
  2. Network Elements of DHCPv6.
  3. Server and Its Configuration.
  4. Client Mechanics and Configuration.
  5. Troubleshooting DHCPv6 Issues.
  6. DHCPv6 FAQ.
  7. Final Words.

1. Introduction to DHCPv6

Dynamic Host Configuration Protocol for IPv6 (DHCPv6) is a network protocol used to automatically configure IPv6 network settings on hosts. 

It is the evolution of DHCP (or DHCPv4— see IPv6 vs IPv4). This latest protocol “DHCPv6” was developed to address the limitations of DHCP in IPv6 networks. DHCPv6 is similar to DHCPv4 in terms of configuring network settings on the host, but it adds more advanced capabilities. It is used to ‘dynamically’ configure the following on hosts:

  • IPv6 address
  • Prefix length
  • Default gateway
  • DNS server addresses
  • Domain name

DHCPv6 is typically used in medium to large networks, where it is used for host’s configuration managment. DHCPv6 can also be used in home networks, where it can be used to automatically configure the network settings of devices such as computers, printers, and routers.

a. Limitations of DHCP(v4) and what DHCPv6 does to solve them.

One of the limitations of DHCPv4 in IPv6 networks is that it does not support the use of Stateless Address AutoConfiguration (SLAAC). SLAAC is a mechanism that allows hosts to automatically configure their own IPv6 addresses, without the need for a DHCP server or manual configuration. DHCPv6 on the other hand, supports the use of SLAAC.

Another limitation of DHCP in IPv6 networks is that it doesn’t support multiple subnets. On the other hand, DHCPv6 supports multiple subnets, so hosts can get their IPv6 addresses from a DHCPv6 server on a different subnet.

Overall, DHCPv6 is a more advanced protocol than DHCP. It addresses the limitations of DHCP in IPv6 networks and provides more features and functionality.

2. Network Elements of DHCPv6. 

The components involved in DHCPv6 communication are the DHCPv6 Client, DHCPv6 Server, Router (RA Messages), and the DHCPv6 Relay Agent (Optional).

The following diagram shows how these elements work with each other. 

How DHCPV6 works?

Here’s an explanation of the elements shown in the diagram:

  • DHCPv6 Client: These are devices that initiate the DHCPv6 communication by sending messages to request IPv6 addresses or other configuration details from the server.
  • DHCPv6 Server: The server is the central device that responds to the client’s requests. It assigns IPv6 addresses and provides other network configuration parameters. It communicates with the clients using DHCPv6 messages and is identified by a DUID (DHCP Unique Identifier). More on the server (role, responsibilities, and configuration) in the next section. 
  • DHCPv6 Messages (MSG): These are the various messages sent between the DHCPv6 clients, server, and relay agent. They help lease IPv6 addresses and set up the network.
  • DUID: Clients and the server have a DUID (DHCP Unique Identifier). Components use this identifier in their communications to ensure unique and persistent identity in the DHCPv6 process.
  • Router (RA Messages): This is a router that sends out Router Advertisement (RA) messages as part of the IPv6 Neighbor Discovery Protocol (NDP). These messages can tell DHCPv6 clients about the presence of a DHCPv6 server, and whether they should use DHCPv6, Stateless Address Autoconfiguration (SLAAC), or both.
  • DHCPv6 Relay Agent: The relay agent is a network device that relays DHCPv6 messages between clients and the server, especially when they are not on the same local network. 

3. Server and Its Configuration

The DHCPv6 server has two main roles. It allocates IP addresses to DHCPv6 clients and provides them with configuration options.  messages can contain a variety of options, including IPv6 addresses, prefix lenght, DNS servers, domain name, and more. 

Additionally, the DHCPv6 server also has several responsibilities, including:

  • Managing IP address leases: The DHCPv6 server tracks the IP address leases for DHCPv6 clients.
  • Providing DHCPv6 options: The DHCPv6 server provides DHCPv6 options to DHCPv6 clients.
  • Reporting DHCPv6 activity: The DHCPv6 server reports DHCPv6 activity to the network administrator.

To start with a DHCPv6 server, you will need to install, configure, and enable the server software. In the following section, we will go through the details of how to begin with a DHCPv6 server. 

a. The DHCPv6 server software.

There are several popular DHCPv6 server software solutions available out there. Some of the most popular ones that support DHCPv6 include ISC DHCP Server, Dnsmasq, Microsoft DHCP Server, Cisco IOS DHCP Server, and Red Hat Enterprise Linux (RHEL) DHCP.

Each of these DHCPv6 servers has its own strengths, and the best choice often depends on the specific requirements of the network, such as scale, complexity, existing infrastructure, and administrative expertise.

b. Setting Up a DHCPv6 Server

As an example let’s see the DHCPv6 server configuration of Red Hat Enterprise Linux 6. The configuration file for the DHCPv6 server is located at /etc/dhcp/dhcpd6.conf.

b.1. Prerequisites.

  • Ensure that the DHCPv6 server has a configuration that matches the network segment of the correct interface (i.e. eth0). The DHCP server needs a subnet6 (IPv6 subnet address) declaration that corresponds to the network to which eth0 is connected.
  • Have the IPv6 address (subnet and range), Prefix length, Default gateway (if not given by RA), DNS server addresses, and Domain name (if necessary). Other relevant parameters that can be configured in the DHCPv6 server are max leased time, default lease time, preferred lifetime, valid lifetime, NTP servers, SIP servers, DUID (DHCP Unique Identifier), and more. 

Note: The package names shown in this DHCPv6 guide might be different or not available in the repositories currently enabled on your Red Hat Enterprise Linux system.

b.2. Installing the dhcp package.

If the DHCP package is not already installed, you will need to install it. You can do this by running the following command:

sudo dnf install dhcp-server


sudo yum install dhcp
Showing DHCPv6 Server

b.3. Edit the DHCPv6 Configuration File

  • The DHCPv6 configuration file is located at /etc/dhcp/dhcpd6.conf. You need to edit this file to define your DHCPv6 server configuration. You can use a text editor like nano or vim to edit the file. For example:
sudo nano /etc/dhcp/dhcpd6.conf
  • Insert your DHCPv6 configuration. Here’s an example of a basic DHCPv6 server (local network) configuration:
sudo nano /etc/dhcp/dhcpd6.confsubnet6 2001:db8:1:2::/64 {
 range6 2001:db8:1:2::100 2001:db8:1:2::200;
 option 2001:db8:1:2::1;
 option dhcp6.domain-search “domain.example”;
  • Here is an example of the configuration pasted on the DHCPv6 config file (dhcpd6.conf)
DHCPV6 server check

NOTE: To configure other parameters like lease time, lifetime, NTP servers, etc, you’ll need to add them here, at the dhcpd6.conf file. Customize DHCPv6 options according to your network requirements. For Red Hat Enterprise Linux 6, the options are similar to those of IPv4.  

  • Restart the DHCPv6 Service: To apply the changes, restart the DHCPv6 service with the following command:
sudo systemctl restart dhcpd6

b.4. Customizing the DHCPv6 service’s behavior. 

Now, let’s add options to the dhcpd daemon when the DHCPv6 service starts. This is done by modifying the /etc/sysconfig/dhcpd6 file on your Linux system, which is designed to hold these extra command-line arguments. Here’s a breakdown of how this works:

  • Open /etc/sysconfig/dhcpd6 in a text editor like nano or vim:
sudo nano /etc/sysconfig/dhcpd6
  • Use DHCPDARGS Variable. Whatever you specify in this variable gets passed directly to the dhcpd daemon at startup. When the DHCPv6 service starts, it reads this file and passes the specified arguments in DHCPDARGS to the dhcpd daemon. For example, if you want to run the DHCP server on a specific interface only, you might add DHCPDARGS=”eth0″ to tell the DHCP server to listen on eth0.
# Command line options here
  • Save and close the file.

b.5. Set SELinux Context and configure Firewalld

  • If SELinux is enforcing, ensure the correct context is set for the DHCP configuration file:
restorecon /etc/dhcp/dhcpd6.conf
  • Configure Firewalld: If you are using firewalld, you need to allow DHCPv6 traffic through the firewall:
sudo firewall-cmd –add-service=dhcpv6 –permanent
sudo firewall-cmd –reload
Configuring DHCPv6 Server

b.6. Enable/Disable or Check the DHCPv6 Server. 

  • Start the DHCPv6 Service: To start the DHCPv6 service, use the following command:
sudo systemctl start dhcpd6
  • Enable DHCPv6 Service on Boot: To ensure the DHCPv6 service starts automatically at boot, enable it using systemctl:
sudo systemctl enable dhcpd6
  • Check the DHCPv6 Service Status: To verify that the DHCPv6 service is running properly, check its status:
sudo systemctl status dhcpd6

4. Client Mechanics and Configuration. 

DHCPv6 clients work similarly to DHCP (v4) clients. DHCP (v4) operates in a four-step process: Discover > Offer > Request > Ack (DORA), while DHCPv6 does something similar, but with a few differences. For example, DHCPv6 clients use a stateless address acquisition process, while DHCPv4 clients use a stateful address acquisition process.

a. How do DHCPv6 clients obtain IPv6? 

The following image shows how DHCPv6 clients acquire IPv6 addressing and configuration on a network. This client is using DHCPv6 in conjunction with IPv6 router advertisement messages (stateless address autoconfiguration mechanisms or SLAAC) for a stateful configuration.

How DHCPV6 works?

Here’s a step-by-step explanation:

  • (1) Router Solicitation: DHCPv6 Client (Computer) sends a router solicitation message to discover routers on the local link. This is part of the Neighbor Discovery Protocol (NDP) for IPv6.
  • (2) Router Advertisement Message: Router responds with a router advertisement message. The message contains flags that tell the client how to obtain its IP address (either through a stateful DHCPv6 Server or through SLAAC). 
  • (3) Default Gateway: Once the DHCPv6 client receives the router advertisement (RA), it sets its default gateway to the source address of the router advertisement message. The RA prefix is used to create a temporary SLAAC address. 
  • (4) DHCPv6 SOLICIT Message: PC1 sends a DHCPv6 SOLICIT message indicating that it’s looking for a DHCPv6 server to obtain its addressing information.
  • (5) DHCPv6 ADVERTISE Message: The DHCPv6 server responds with an ADVERTISE message, indicating that it is available for DHCPv6 service.
  • (6) DHCPv6 REQUEST Message: PC1 requests addressing information from the DHCPv6 server by sending a REQUEST message.
  • (7) DHCPv6 REPLY Message: The DHCPv6 server sends a REPLY message containing the Global Unicast Address (GUA) and other configuration details to PC1.

b. Configuring and Checking Interfaces of a DHCPv6 Client.

As you may know already, DHCPv6 automatically assigns IP addresses to devices on a network. This means that you (or the network admin) don’t have to manually configure each device. But still, you might need to check the interface settings on both, the server and the client. 

For a DHCPv6 client, you’ll only need to ensure IPv6 is enabled and set the “configure IPv6” parameters to ‘automatically’ or ‘dynamically’.

Enabling DHCPv6 on a macOS. 

  • For example, for a macOS, go to the “TCP/IP” tab in the advanced settings. Here, you may enable IPv6 by choosing “Automatically,” “Manually,” or “Link-local only”.
  • Automatically uses DHCPv6, Manually does not use any dynamic method (or DHCPv6), so you’ll need to know which IPv6 to use. In addition, Link-local does not use DHCPv6. Link-local is, an IPv6 unicast address that can be automatically configured on any interface that uses the link-local prefix FE80::/10 and the interface identifier (in the EUI-64 format.)
  • (1) Next to “Configure IPv6:”, select “Automatically” from the drop-down menu. This setting will configure the macOS to use DHCPv6 to obtain its IPv6 address and network configuration.
  • (2) Optional > To renew the DHCP lease for IPv6, click the “Renew DHCP Lease” button. The system will immediately request new IPv6 configuration details from the DHCPv6 server.
DHCPV6 enable and check

Once you have configured the interfaces, you can start using DHCPv6 to automatically assign IP addresses to devices on your network.

Checking and Enabling DHCPv6 on Linux. 

You can use the ifconfig command on Linux to check your interfaces and find the IPv6 configuration.

  • As shown in the picture below, the IPv6 is disabled (there is no IPv6 information given). Check the following guide to disable IPv6, if this was your intention. 
DHCPV6 enable and check
Public Domain Image by (
  • Additionally, the IPv6 shown in the picture below for interface eth0 is a link-local address (not obtained via a DHCPv6).
DHCPV6 disable
Public Domain Image by (
  • However, (refer to the picture below) from the interface output shown below with (ifconfig eth1) 2003:db5:0:f102::1/64: This is a global unicast address, which is routable on the internet. The 2003:db8::/32 range is reserved for documentation purposes, but in a real-world scenario, this type of address could have been provided by a DHCPv6 server.
DHCPV6 enable and check
Public Domain Image by (

5. Troubleshooting DHCPv6 Issues

DHCPv6 is a tricky protocol, and there are many things that can go wrong when you’re configuring and using it. In this section we will go through the troubleshooting of DHCPv6 issues, including common configuration problems and tools and techniques you can use to track down the source of your problems.

a. Common DHCPv6 Configuration Problems

Some of the most common DHCPv6 configuration problems include:

  • Incorrect configuration of DHCPv6 servers. DHCPv6 server are the most common when it comes to trouble. Check the following.
    • If a DHCPv6 scope is not configured correctly, it can prevent DHCPv6 clients from obtaining IP addresses.
    • Always ensure DHCPv6 options on the server side are correct according to your network requirements or design. This can include errors in the configuration of DHCPv6 options, such as the client identifier option, the DNS server option, and the domain name option. 
    • Configuration File Syntax: Be careful with the syntax in the DHCPv6 configuration file. Syntax errors can prevent the DHCPv6 service from starting.
    • SELinux and Firewalls: If you face issues related to SELinux or firewalls, ensure that the necessary permissions and exceptions are properly set.
  • Clients improperly configured. Check whether clients have IPv6 enabled and their IPv6 assignment is set to ‘automatically’.
  • Incorrect configuration of DHCPv6 relay agents. DHCPv6 relay agents are used to forward DHCPv6 messages between subnets. If a relay agent is not configured correctly, it can prevent DHCPv6 clients from obtaining IP addresses and other network configuration information.

b. Tools and Techniques for Troubleshooting DHCPv6

There are a number of tools and techniques that can be used to troubleshoot DHCPv6 issues. These include:

  • DHCPv6 debug messages. DHCPv6 servers (and clients) can generate debug messages that can be helpful in troubleshooting problems. These messages can be enabled by setting the dhcpv6-debug option on the DHCPv6 server.
  • Traceroute. Traceroute can be used to trace the path of DHCPv6 messages between servers and clients. This can be helpful in identifying network problems that are preventing DHCPv6 messages from being exchanged.
  • DHCPv6 packet captures. DHCPv6 packet captures (from tools like Wireshark) can be used to capture DHCPv6 messages as they are exchanged between servers and clients. This can be helpful in identifying specific problems with DHCPv6 messages.

6. DHCPv6: FAQ

a. Stateless Address Autoconfiguration (SLAAC) vs. stateful DHCPv6?

SLAAC is for automatic IP address configuration (it doesn’t rely on the DHCP server only uses the prefix advertised by the local router), while stateful DHCPv6 is for a managed network environment where admins want to maintain control.

b. How to improve redundancy and load balancing in DHCPv6 networks? 

Use multiple DHCPv6 servers.  Fortunately, the DHCPv6 protocol can support multiple DHCPv6 servers. This allows for load balancing and redundancy.

c. How to forward DHCPv6 messages to clients in other networks? 

Use DHCPv6 relay agents. These can forward DHCPv6 messages between networks. This allows DHCPv6 to be used in networks that are separated by routers.

e. What are the methods of assigning IPv6 addresses?

IPv6 addresses can be assigned in two ways: statically or dynamically. With static assignment, a specific IPv6 address is manually assigned to a device. With dynamic assignment, IPv6 addresses are automatically assigned to devices via DHCPv6 or link-local addressing.

f. What is DUID and what role does it play in DHCPv6?

DUID (Device Unique Identifier) is a key part of the DHCPv6 protocol that helps to ensure that each client device on a network has a unique IP address. This prevents the possibility of duplicate IP assignments, which can lead to network issues such as routing loops and DNS conflicts.

7. Final Words.

We hope the “Absolute Guide to DHCPv6” gave you a deep dive into the ins and outs of DHCPv6, from client-side configurations to server-side management. We’ve shown you how the protocol can dynamically assign IPv6 addresses, distribute network configuration parameters like DNS settings, and support SLAAC for a variety of network environments. By exploring common troubleshooting tactics and frequently asked questions, we’ve prepared you to tackle the challenges of modern networking.

Got DHCPv6 Skills? Let’s Put Them to Use! 🚀

See how can Rapidseedbox help you.

24/7 Support: Always here for you.
We own the IPs, so no third parties involved.
Custom-fit Hosting: Perfect for any project.
Straightforward Pricing & Surefire Guarantee

Upgrade with Ease!

Visit Rapidseedbox today and get a special 20% off for the first month!


About Diego Asturias

Avatar for Diego Asturias

Diego Asturias is a tech journalist who translates complex tech jargon into engaging content. He has a degree in Internetworking Tech from Washington DC, US, and tech certifications from Cisco, McAfee, and Wireshark. He has hands-on experience working in Latin America, South Korea, and West Africa. He has been featured in SiliconANGLE Media, Cloudbric, Pcwdld, Hackernoon, ITT Systems, SecurityGladiators, Rapidseedbox, and more.