Automatically configured prefix length? #126
-
Hi, I have set up an Ubuntu DHCPv6 server manually with the ISC DHCPv6 server app along with radvd which sends out router advertisements with prefix length 64 for the same IPv6 subnet. I was hoping that dhcpcd on another Ubuntu server would catch on to the router advertisements and configure the received IP address from the DHCP server as a /64 address, but I still get 128. Do I manually have to add this behavior in some sort of hook, or can dhcpcd be configured to set the correct prefix length on the IP address? I may be missing some fundamental aspect of how DHCPv6 is supposed to work. In the log below you can see that dhcpcd gets the router advertisement with the prefix /64, but that is not used it seems. dhcpd.conf (DHCPv6 server) subnet6 fd00::/64 { radvd.conf dhcpcd output ifconfig output (fd00::e is the received IP address from the DHCPv6 server) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
RA gives you routes based on a prefix. You could optionally derive an automated address from the prefix. When we add an address, the kernel will automatically add a route if the prefix length is not at the maximal value. You've only said what your problem is, not your use case. If you really want a /64 prefix from DHCPv6 then you want to configure for DHCPv6 Prefix Delegation which requires some setup at both server and client. It doesn't work out of the box. |
Beta Was this translation helpful? Give feedback.
RA gives you routes based on a prefix. You could optionally derive an automated address from the prefix.
DHCPv6 gives you an address - there is no prefix.
When we add an address, the kernel will automatically add a route if the prefix length is not at the maximal value.
This may conflict with routes the RA wants to add.
Likewise if a route associated with the address expires, the address would be removed when a different route could be used.
As such all DHCPv6 addresses will always have a /128 prefix length.
You've only said what your problem is, not your use case. If you really want a /64 prefix from DHCPv6 then you want to configure for DHCPv6 Prefix Delegation which requires some setup…