Dhcpv6 pd example? error "network mask too short"

Im trying to configure dhcpv6 server with prefix-delegation.
I am getting error network mask too short. What am I missing?

show service dhcpv6-server | commands 
set shared-network-name IPV6 subnet 2001:db8:1::/48 name-server '2001:4860:4860::8888'
set shared-network-name IPV6 subnet 2001:db8:1::/48 prefix-delegation start 2001:db8:0001:0000:0000:0000:0000:0000 prefix-length '60'
set shared-network-name IPV6 subnet 2001:db8:1::/48 prefix-delegation start 2001:db8:0001:0000:0000:0000:0000:0000 stop '2001:db8:0001:ffff:ffff:ffff:ffff:ffff'


Jun 30 15:52:14 vyos dhcpd[16081]: /run/dhcp-server/dhcpdv6.conf line 13: network mask too short
Jun 30 15:52:14 vyos dhcpd[16081]:         prefix6 2001:db8:1::0 2001:db8:0001:ffff:ffff:ffff:ffff:ffff /60;



$run restart dhcpv6 server 
Job for isc-dhcp-server6.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server6.service" and "journalctl -xe" for details.


$run show dhcpv6 server leases 
WARNING: DHCPv6 server is configured but not started. Data may be stale.
IPv6 address    State    Last communication    Lease expiration    Remaining    Type    Pool    IAID_DUID

And the generated config file looks like this:

$ cat /run/dhcp-server/dhcpdv6.conf 
### Autogenerated by dhcpv6_server.py ###

# For options please consult the following website:
# https://www.isc.org/wp-content/uploads/2017/08/dhcp43options.html

log-facility local7;


# Shared network configration(s)
shared-network IPV6 {
    subnet6 2001:db8:1::/48 {
        option dhcp6.name-servers 2001:4860:4860::8888;
        prefix6 2001:db8:0001:0000:0000:0000:0000:0000 2001:db8:0001:ffff:ffff:ffff:ffff:ffff /64;
    }
    on commit {
        set shared-networkname = "IPV6";
    }
}

Hello @olofl

I provide you with my working configuration:

set interfaces ethernet eth0 dhcpv6-options pd 0 interface eth1 sla-id '1'
set interfaces ethernet eth0 dhcpv6-options pd 0 length '64'
set service dhcpv6-server shared-network-name LAN6 subnet 2001:xxxx:5848:1::/64 address-range start 2001:xxxx:5848:1:1:1111:1111:100 stop '2001:xxxx:5848:1:1:1111:1111:200'
set service dhcpv6-server shared-network-name LAN6 subnet 2001:xxxx:5848:1::/64 name-server '2001:4860:4860::8888'

You must specify a start and end address in the DHCPv6 settings. 0000 starting address is invalid.

Why do I need a range within the subnet? I want to provide my DHCP-clients with a prefixes only.

This works for me:

configure
set interfaces ethernet eth0 address 2001:db8::1/64
set service dhcpv6-server shared-network-name LAN subnet 2001:db8::/64 prefix-delegation start 2001:db8:1:: stop 2001:db8:1:fff0::
set service dhcpv6-server shared-network-name LAN subnet 2001:db8::/64 prefix-delegation start 2001:db8:1:: prefix-length 60
commit
exit

Note that the stop address is inclusive.

Note: Need to add some validation to VyOS CLI ⚓ T3493 DHCPv6 does not have prefix range validation

As I see it, there are two problems here…

  1. VyOS is far less helpful than it should be about what is wrong.

  2. You are wanting to delegate prefixes, but you are configuring your prefix start/stop range as if you are delegating addresses. Your “stop” should be the base address of the last prefix you wish to delegate, so for example, if I have 2001:db8:feed::/48 and I wish to delegate the first half of it as /60s to PD Clients, I would need the following configuration:

set shared-network-name example-ipv6 subnet 2001:db8:feed::/48
set shared-network-name example-ipv6 subnet 2001:db8:feed::/48 start '2001:db8:feed::' prefix-length '60'
set shared-network-name example-ipv6 subnet 2001:db8:feed::/48 start '2001:db8:feed::' stop '2001:db8:feed:7ff0::'

@owen that config you shared is not valid (in 1.3.0-rc5)

Basically what I want to replicate is this simple setup between two mikrotik routers.

On the DHCP-server:
This results Mikrotik giving out /60 prefix from the /48 pool that I have defined.

/ipv6 dhcp-server
add address-pool=prefix_pool interface=ether2 name=myserver
/ipv6 pool
add name=prefix_pool prefix=2001:db8:7501::/48 prefix-length=60

And on the DHCP-client:
This results in me getting a dynamic ipv6 pool, a default route, and two ipv6 addresses prefix::1/64 ony my LAN interfaces.

/ipv6 dhcp-client
add interface=WAN pool-name=dhcp-pool request=prefix add-default-route=yes
/ipv6 address
add address=::1/64 from-pool=dhcp-pool interface=LAN1
add eui-64=yes from-pool=dhcp-pool interface=LAN2

Why not?

vyos@r4-1.3:~$ show conf com | match dhcp
set service dhcpv6-server shared-network-name example-ipv6 subnet 2001:db8:feed::/48 prefix-delegation start 2001:db8:feed:: prefix-length '60'
set service dhcpv6-server shared-network-name example-ipv6 subnet 2001:db8:feed::/48 prefix-delegation start 2001:db8:feed:: stop '2001:db8:feed:7ff0::'
vyos@r4-1.3:~$ 
vyos@r4-1.3:~$ show version 

Version:          VyOS 1.3.0-rc5