dhcpcd-discuss

Re: ICMPv6 RA with router lifetime 0

Maarten de Vries

Thu Mar 06 14:04:57 2014

Hey Roy,

Thanks for the quick reply and patch.

With the patch, stateless autoconfiguration seems to work with the router
lifetime set to 0. But when I just ran the unpatched dhcpcd, stateless
autoconfiguration also seemed to work, even though the dhcpcd log says "no
IPv6 Routers available". The patched version does log "Router Advertisement
from fe80::x:x:x:x" and stateless autoconfiguration also works, so it is an
improvement. Address and prefix information from the RA seem to be
processed as they should.

With the patch, DNS options from the RA are now properly processed with a
router lifetime of 0. This didn't work in the unpatched version. Note that
these DNS options do have their own lifetime fields. I don't know if dhcpcd
uses these?

However, what still doesn't seem to work is DHCPv6 when the router lifetime
field is 0. With the lifetime set to 60 I got this:
dhcpcd[23593]: enp4s0: confirming prior DHCPv6 lease
dhcpcd[23593]: enp4s0: REPLY6 received from fe80::x:x:x:x
dhcpcd[23593]: enp4s0: adding address fd13:0:0:1::/128

With router lifetime set to 0, no messages regarding DHCPv6 are logged. I
tested with Managed and Other Configuration flag of the RA on, and with
only the Other Configuration flag on.

Kinds regards,
Maarten





On 6 March 2014 11:21, Roy Marples <roy@xxxxxxxxxxxx> wrote:

> Hi
>
>
> On 04/03/2014 22:30, Maarten de Vries wrote:
>
>> I have a set up at home with one host sending ICMPv6 router
>> advertisements to configure my internal IPv6 network (and actually
>> also doing DHCPv6, but this is irrelevant for the issue at hand I
>> believe). However, I don't have a public IPv6 address, so I just want
>> IPv6 on my internal network, while still configuring a custom prefix
>> (in the fd00::/8 range) and properly configuring DNS information.
>> Everything seems to work, but the host sending the RAs becomes the
>> default gateway for every other host on the network. That default
>> route is bogus, since the host in question doesn't have a public IPv6
>> address. I just want IPv6 on my internal network.
>>
>> So, I read some more, and it would seem that setting the router
>> lifetime field of the RA to 0 should do exactly what I want: prevent
>> the host from becoming a default route. RFC4861 says:
>>
>>  The lifetime associated with the default router in units of seconds.
>>>  The field can contain values up to 65535 and receivers should
>>> handle any value, while the sending rules in Section 6 limit the
>>> lifetime to 9000 seconds.  A Lifetime of 0 indicates that the
>>> router is not a default router and SHOULD NOT appear on the default
>>> router list. The Router Lifetime applies only to the router's
>>> usefulness as a default router; it does not apply to information
>>> contained in other message fields or options.  Options that need
>>> time limits for their information include their own lifetime fields.
>>>
>>
>> However, when I set that field to zero, dhcpcd doesn't seem to process
>> the RA at all and ignores all information, including prefix and dns
>> information. If I understand the RFC correctly, this behavior is wrong
>> and the prefix and dns (and other) information should still be
>> processed. For the moment I "worked around it" by setting the lifetime
>> to 1, meaning the route becomes invalid after one second. However, the
>> route does stay in the routing table for one second, so it's quite an
>> ugly workaround.
>>
>
> Hmmmm, I can't fault your reasoning.
> This patch should fix it. I need to do some testing on it first though.
> Let me know his it works for you.
>
> Thanks
>
> Roy

Follow-Ups:
Re: ICMPv6 RA with router lifetime 0Roy Marples
References:
ICMPv6 RA with router lifetime 0Maarten de Vries
Re: ICMPv6 RA with router lifetime 0Roy Marples
Archive administrator: postmaster@marples.name