DHCPv6-PD (Prefix Delegation)
This method is used on larger networks, such as Internet Service Providers (ISPs). It allows a DHCPv6 router to delegate blocks of IPv6 addresses to internal subnets, allowing for efficient distribution of addresses in a network hierarchy.
At the end of the article you will find a small test that will allow you assess the knowledge acquired in this reading
How does it work
Next, let's see how DHCPv6-PD works:
1. Role of ISP (Internet Service Provider)
In a typical DHCPv6-PD environment, the ISP plays an important role. The ISP has a large block of IPv6 addresses assigned through its address provider (RIR – Regional Internet Registry). This block is known as the ISP Allocation block.
2. Assignment to the client router
The customer router (also known as CPE – Customer Premises Equipment) connects to the ISP's network and has an external interface that obtains an IPv6 address via DHCPv6 from the ISP's infrastructure.
3. Prefix request
Once the client router has obtained its IPv6 address, it sends a prefix request (PD) to the ISP's DHCPv6 server. In this request, the client router requests a portion of the ISP's allocation block for its own network.
4. Prefix assignment
The ISP's DHCPv6 server, upon receiving the prefix request, evaluates its allocation block and assigns a prefix (sub-block) of it to the client router. This prefix will be used by the client router to assign IPv6 addresses to its own interfaces and internal subnets.
5. Client router configuration
Using the prefix assigned by the ISP's DHCPv6 server, the client router divides this prefix into smaller subnets based on the needs of its own internal network. Then, it configures its internal interfaces and subnets with the corresponding IPv6 addresses.
6. Internal address distribution
Once the client router has divided the received prefix into internal subnets, it can use SLAAC or DHCPv6 to assign IPv6 addresses to devices on its internal networks.
7. Renewal and update
Prefixes assigned via DHCPv6-PD can have a certain time to live (TTL – Time to Live) after which they must be renewed or updated. The customer's router must keep an eye on renewals and updates to ensure that the IPv6 addresses on its internal network remain valid and up-to-date as assigned by the ISP.
In short, DHCPv6-PD is an extension of the DHCPv6 protocol that allows routers to obtain blocks of IPv6 addresses (prefixes) from the ISP for their own network and, from there, partition and assign addresses to their internal subnets.
This is especially useful in Internet service provider environments and in networks that require an IPv6 addressing hierarchy to subdivide a block of addresses into smaller subnets.
Example: DHCPv6 PD Server Configuration
Enable “Other Configuration” in the option IPv6→ND, if hosts should use stateful autoconfiguration to obtain additional information.
/ipv6 nd set [ find default=yes ] other-configuration=yes
Create an IPv6 address pool in which the prefix assignment will be made with said pool. When creating the pool, you must specify the length of the prefix you wish to assign.
/ipv6 pool add name=pool1 prefix=2001:db8::/32 prefix-length=40
Create the DHCP server on one of the interfaces, assign the address pool that was created and specify the assignment time.
/ipv6 dhcp-server add address-pool=pool1 interface=wlan1 name=server1
To verify the assignment of prefixes to a client, we can do it through the option: IPv6→DHCPv6 Server→Bindings
/ipv6 dhcp-server binding print
Note: The RouterOS DHCPv6 server can only delegate IPv6 prefixes, not addresses.
Example: DHCPv6 PD Client Configuration
Specify on which interface the parameters will be received, select that a prefix needs to be received, and establish the name of the pool that will be created.
/ipv6 dhcp-client
add add-default-route=yes interface=ether1 pool-name=test request=prefix
En IPv6→Pool we can verify the pool that has been assigned by the DHCPv6 PD Server.
/ipv6 pool print
Brief knowledge quiz
What do you think of this article?
Do you dare to evaluate your learned knowledge?
Recommended books for this article
(Book) Networking with MikroTik RouterOS: A Practical Approach to Understanding and Implementing RouterOS
Study material for the MTCNA Certification Course, updated to RouterOS v7
IPv6 book with MikroTik, RouterOS v7
Study material for the MTCIPv6E Certification Course updated to RouterOS v7