IPv6 DHCP (DHCPv6) Server & Client Explained


Volker D. Pallas


IPv6 DHCP Explained
IPv6 Act Now
Course Index
Part 1 – Introduction: What is IPv6
Part 2 – IPv6 Addressing & Subnetting
Part 3 – IPv6 Headers & Header Extensions
Part 4 – ICMPv6 & IPv6 Neighborships
Part 5 – IPv6 Configuration, EUI-64, SLAAC & Dual Stack
Part 6 – IPv6 DHCP (DHCPv6)
Part 7 – IPv6 on Windows
Part 8 – IPv6 on Linux
Part 9 – IPv6 on Mac
Part 10 – IPv6 DNS, Monitoring & Address Management
Part 11 – IPv6 Routing
Part 12 – IPv6 Security & Tunneling
Part 13 – IPv6 Internet Connection & Address Planning

What Is DHCPv6?

DHCPv6, or Dynamic Host Configuration Protocol for IPv6, is a network protocol that assigns unique IP addresses to devices connected to an IPv6 network. It automates the configuration process and simplifies network management. DHCPv6 ensures efficient and seamless communication between devices by providing them with essential network parameters.

All about DHCPv6 and Dynamic Address Assignment

The Dynamic Host Configuration Protocol (DHCP) in Version 6 was created to support automatic IPv6 addressing using DHCP, like it was common with IPv4. Back in the day in the IPv4 World, we did not have automatic configuration of addresses like we do with SLAAC now.

You have learned before, that there also was no possibility to tell a client the router’s IP address (default gateway) nor the address of the DNS servers.

All this can be done using our built-in ICMPv6 toolkit, which I find absolutely great. For some implementations and some networks it might make sense to implement another solution: DHCPv6

DHCPv6 is the stateful alternative to SLAAC. Remember, the S in SLAAC comes from stateless. Stateless means, the state is not recorded, so the address generated by a client is not essentially known to the infrastructure and is not essentially the same every time. In large deployments, engineers might want to do stateful address assignment and keep record which client received which IPv6 address at which time. This can also help fulfill strict security requirements in larger companies.

To the rescue comes DHCPv6!

DHCPv6 has been defined in many RFCs, the most recent one being RFC8415. It can provide SLAAC hosts with additional information which is not commonly provided by SLAAC, such as DNS servers.

Yes, I told you before, DNS can be supplied inside a Router Advertisement message (RA). There is RFC6106 for announcing DNS servers with RA, but this was mostly not implemented by the networking vendors and thus could not be used in production very well. RFC6106 was since obsoleted by a new RFC8106.

DHCPv6 also supports IPv6 Prefix Delegation which is common with DSL routers and some Internet service providers, to receive not only the public IP address (upstream prefix), but also a globally routed prefix for use in the local network (downstream prefix) from the provider.

Watch my video where I explain DHCPv6:

How DHCPv6 works

On a high-level overview, DHCPv6 uses UDP Port 546 for the client and UDP Port 547 for the server and follows these simple steps:

  • the DHCP Unique Identifier (DUID) is sent by the client to request an address
  • the DHCPv6 server checks the DUID with the DHCPv6 database for reservation or pool
  • the IPv6 address is announced by DHCP server to the client

The detailed technical steps are:

  1. the DHCP client sends a solicit from its Link-Local address to multicast group ff02::1:2 (all DHCP servers)
  2. the DHCP server replies with an advertise message from its Link-Local address to the Link-Local address of the client (remember, both have to be link-local as the client has no other address yet!)
  3. the DHCP client replies with a request message from its Link-Local address to multicast group ff02::1:2 (all DHCP servers)
  4. the DHCP server ends the communication with the assignment of an address and replying from its Link-Local address to the Link-Local address of the client

DHCPv6 Example #1: How to configure a Cisco DHCPv6 Server & Client

Let’s do a lab together as an example how DHCPv6 works.

You can copy and paste the sample configuration to real hardware or virtual machines. Or, if you prefer, you can just read and not try out for yourself.

How to Configure a Cisco DHCPv6 Server

! Cisco DHCPv6 Server
hostname R1
ipv6 unicast-routing
ipv6 cef
ipv6 dhcp pool test
  address prefix 2010:AA01:10::/64 lifetime infinite infinite
  dns-server AAAA:BBBB:10FE:100::15
  dns-server 2010:AA01::15
  domain-name example.com
interface G0/0/1
  no ip address
  duplex auto
  speed auto
  ipv6 address 2010:AA01:10::2/64
  ipv6 dhcp server test rapid-commit

How to Configure a Cisco DHCPv6 Client

! Cisco DHCPv6 Client
hostname R2
ipv6 unicast-routing
ipv6 cef
interface FastEthernet0/1
  no ip address
  duplex auto
  speed auto
  ipv6 address dhcp rapid-commit
  ipv6 enable

How to troubleshoot a Cisco DHCPv6 Server

Here are some example troubleshooting commands you can use on Cisco gear in regards to the DHCPv6 service:

Show Cisco DHCPv6 Address Pools
R1# show ipv6 dhcp pool
DHCPv6 pool: test
  Address allocation prefix: 2010:AA01:10::/64 valid 4294967295 preferred 4294967295 (1 in use, 0 conflicts)
  DNS server: AAAA:BBBB:10FE:100::15
  DNS server: 2010:AA01::15
  Domain name: example.com
  Active clients: 1
Show Cisco DHCPv6 Server Bindings (Allocations)
R2# show ipv6 dhcp binding
Client: FE80::C801:88FF:FEAC:1C
  DUID: 00030001CA0188AC0000
  Username : unassigned
  IA NA: IA ID 0x00040001, T1 43200, T2 69120
    Address: 2010:AA01:10:0:
     preferred lifetime INFINITY, , valid lifetime INFINITY,
Show Cisco DHCPv6 Client Status (Interfaces)
R2# show ipv6 dhcp interface
  FastEthernet1/0 is in client mode
  Prefix State is IDLE
  Address State is OPEN
  Renew for address will be sent in 11:17:16
  List of known servers:
  Reachable via address: FE80::C800:88FF:FEAC:1C
  DUID: 00030001CA0088AC0000
  Preference: 0
  Configuration parameters:
  IA NA: IA ID 0x00040001, T1 43200, T2 69120
  Address: 2010:AA01:10:0:D16D:EC61:
  preferred lifetime INFINITY, valid lifetime INFINITY
  DNS server: AAAA:BBBB:10FE:100::15
  DNS server: 2010:AA01::15
  Domain name: example.com
  Information refresh time: 0
  Prefix Rapid-Commit: disabled
  Address Rapid-Commit: enabled

DHCPv6 Example #2: How to configure a Linux DHCPv6 Server using ISC dhcpd

One of the most common DHCPv6 implementations is still the ISC dhcpd server that runs on UNIX and Linux and supports IPv6 since version 4. You can try these example configurations on a virtual machine our your own host.

How to Configure a UNIX/Linux DHCPv6 Server

Server ISC dhcpd6:

First edit the configuration file in /etc/dhcp/dhcpd6.conf:

default-lease-time 600;
max-lease-time 7200; 
log-facility local7; 
subnet6 2001:db8:0:1::/64 {
        # Range for clients
        range6 2001:db8:0:1::129 2001:db8:0:1::254;

        # Range for clients requesting a temporary address
        range6 2001:db8:0:1::/64 temporary;

        # Additional options
        option dhcp6.name-servers fec0:0:0:1::1;
        option dhcp6.domain-search “domain.example”;

        # Prefix range for delegation to sub-routers
        prefix6 2001:db8:0:100:: 2001:db8:0:f00:: /56;

        # Example for a fixed host address

        host specialclient {
host-identifier option dhcp6.client-id 00:01:00:01:4a:

        fixed-address6 2001:db8:0:1::127;

And then restart the dhcpd6 daemon using the init system of your Linux distribution.

How to Configure a Debian GNU/Linux DHCPv6 Client

Your configuration is in the file /etc/network/interfaces:

auto eth0
iface eth0 inet6 dhcp

Now restart your networking stack and check out your brand new IPv6 connectivity!

How to Configure IPv6 SLAAC on UNIX/Linux

For Stateless Address Autoconfiguration (SLAAC) you just need to put this one line into your networking configuration at /etc/network/interfaces:

iface eth0 inet6 auto

Same here – please restart your networking stack now and enjoy your brand new IPv6!

Apart from the links throughout this course I recommend the following resources for additional information:

  1. The Internet Society (ISOC) IPv6 Portal
  2. Test your IPv6 connectivity on test-ipv6.com
  3. The official IANA list of assigned IPv6 address space is very interesting
  4. The Google IPv6 deployment statistics
  5. The RIPE NCC IPv6 working group and mailing list

Book recommendations on IPv6

I can recommend the following 3 books which I enjoyed reading:

IPv6 Address Planning
IPv6 Fundamentals
DNS & Bind on IPv6

This concludes IPv6 Foundation Part 6: IPv6 DHCP (DHCPv6) of the original IPv6 Foundation Master Class.

Previous Part: IPv6 Foundation Part 5: IPv6 Configuration, EUI-64, SLAAC & Dual Stack

Next Part: IPv6 Foundation Part 7: IPv6 on Windows