Re: DHCPv6 without SLAAC
Roy Marples
Tue Dec 30 18:58:21 2014
Hi Joachim
On 2014-12-30 18:04, Joachim Achtzehnter wrote:
You wrote:
DHCPv6 requires a IPv6RA to work - nothing else will set the IPv6
default route other than say a native IPv6 connection over PPP.
And certainly nothing else will set any prefix (subnet like route).
Right, understood. This is why the accept_ra kernel parameter would
normally need to be turned on (on GNU/Linux systems) for this to work.
Not so - dhcpcd infact process the RA internally.
Infact, other than a recent NetBSD kernel, Linux allows userland to
handle RA just fine.
As such, when dhcpcd is in control (slaac private or ipv6ra_own in
dhcpcd.conf) then dhcpcd will turn the accept_ra kernel parameter off.
You do need a recent (3.17 I think) kernel though to avoid duplicate
link-local IPv6 addresses with slaac private on Linux.
The RA itself contains two mutually exclusive flags, Other and
Managed.
If Other is set, DHCPv6 is used just to get extra information like
IPv6
DNS.
If Managed is set, DHCPv6 is used to get IPv6 addresses as well.
Agree.
If neither of these flags are set, DHCPv6 is not started.
Right.
Now, the RA message *can* also contain a prefix, like 2002:1:2::/64.
The prefix can also contain some flags (not mutually exclusive)
OnLink - the prefix is directly associated with the interface and a
subnet like route will be created
Auto - generate a SLAAC address for the prefix.
The kicker is the all the above is *optional*.
So to now answer your question, simply ensure that all advertised
prefixes don't have the Auto flag set and that the RA message itself
has
the Managed flag set and you're golden!
This is an answer only if one wanted to disable autonomous
auto-configuration globally as a policy for the subnet, but this
wasn't my question. Sorry, I should have made this clear.
The question is about client-side configuration. On a subnet where the
router allows both autonomous and managed address configuration we
want to configure a host such that it only configures the address
assigned by DHCP, but not generate addresses autonomously based on the
hardware address or randomized (privacy extension).
I see.
With dhcpcd you can disable RS solicitation and RA processing per
interface (noipv6rs as you found).
However, this is an all or nothing flag. We would add a new option to
dhcpcd to ignore the Auto flag in RA messages.
We can't use the kernels autoconf option because we may have a RA
without the Managed flag set and as such still need to configure an
address autonomously.
Before we even add this option, what is your expected outcome if this
new option is set and dhcpcd receives a RA from two or more different
routers, one with Auto and Managed, one with only Auto and one with only
Managed?
I ask because any outcome will conflict with the configuration and
expected functionality when connecting to the network.
Although I haven't confirmed this, I'm guessing that ISC's dhclient
does this when the autoconf kernel setting is off, but accept_ra
turned on. Unfortunately, dhcpcd currently seems to treat this as an
error and won't start the DHCP negotiation.
ISC's dhclient doesn't even look at the RA - it's up-to another userland
agent to process this and then start dhclient when needed.
Thanks
Roy
Archive administrator: postmaster@marples.name