Re: NM bug 684242 and other stuff



Hi all,

* Dan Williams

> On Wed, 2012-09-26 at 14:56 -0400, Gene Czarcinski wrote:
>> What I am looking for (without diving into the Networkmanager code any 
>> more than I have too) is a keyfile configuration which will cause RA to 
>> be used for the default route and dhcpv6 for the client's IPv6 address 
>> and,m if dhclient is used with my mods, a ddns update.
> 
> I believe (and either Pavel or Tore correct me if I'm wrong) that would
> should be:
> 
> 1) Using Router Advertisements and possibly setting the prefix too

Assuming this is a standard broadcast Ethernet segment, you would
probably want to set the Prefix Information Option with Autonomous=0 and
OnLink=1, yes. If you omit the PIO (or set OnLink=0), all internal
LAN-LAN traffic will have to go via the default router. It'll probably
work just fine, but it's not optimal.

> 2) Setting the "Managed" flag for RA (AdvManagedFlag for radvd)
> 3) Setting NM to "method=auto"

Yup.

> This should cause the kernel to recognize your router and add a route
> for it, but should not cause the kernel to use the prefix in the RA.
> The Managed flag will cause NM to perform DHCPv6 for address assignment
> and DNS options.  In IPv6 with SLAAC (including DHCP) the default router
> is *always* determined from Router Advertisements;

I think that to say «SLAAC (including DHCP)» is a bit misleading. DHCP
and SLAAC are completely orthogonal to each other. DHCPv6 (the stateful
kind that gives you an address) is as you correctly point out invoked by
setting the Managed flag in the RA; SLAAC is invoked by setting the
Autonomous flag in one or more Prefix Information Option in the RA. (The
PIO(s) in question _MUST_ use a 64-bit prefix length - see below.) You
can have either DHCPv6 or SLAAC active in a network, or both at the same
time.

The default router is not learned from neither SLAAC nor DHCPv6, but
from IPv6 Neighbor Discovery (ND), specifically on receipt of an ICMPv6
RA with a lifetime greater than 0. It is quite possible to use ND to
learn a default route on a network that does not use SLAAC or DHCPv6
(although I am not certain if NM supports this in a useful manner). In
order to get useful connectivity in such a network you would need to
acquire an IPv6 address in some other way. One hypothetical use case
would be a server with a static address manually assigned, but where the
default route is dynamically learned from ND, perhaps in order to
provide high availability (imagine two or more routers simultaneously
sending out RAs with short timers). But I digress...

> In IPv6, the default router determination
> can be *completely* separate from address assignment.

Not "can". It *always is*. Well, at least in all network types NM
support....

> Note that if you use DHCPv6 for address assignment, you'll only ever be
> able to use /64, because that's all DHCPv6 supports.  The IPv6 standards
> really, really, really want you to use RA as much as possible.

Sorry, wrong. DHCPv6 does not support or use prefix lengths at all (when
it comes to address assignment). You can however use DHCPv6 in
combination with ND (PIO w/OnLink=1) to get a direct interface route to
any prefix length.

SLAAC, on the other hand, only supports /64. This isn't (as far as I
know) a limitation of SLAAC itself, but a consequence of the fact that
the only existing algorithm that is used to generate an Interface ID,
EUI-64, is only defined for 64 bits Interface IDs. So if you send a PIO
with a non-/64 prefix length, and Autonomous=1, I believe most
implementations will act on it as if Autonomous was set to 0.

Best regards,
-- 
Tore Anderson
Redpill Linpro AS - http://www.redpill-linpro.com/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]