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";
}
}
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
VyOS is far less helpful than it should be about what is wrong.
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::'
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