tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rtsol



On 21/10/2014 13:02, Robert Swindells wrote:
> Roy Marples wrote:
>> On 20/10/2014 22:06, Robert Swindells wrote:
>>> What is the recommended way to replace rtsol(8) ?
>>>
>>> I have read the man page.
>>>
>>> My /etc/rc.conf contains the following:
>>>
>>> dhcpcd=YES
>>> dhcpcd_flags="-B6 --nodhcp6 rtk0"
>>>
>>> At boot, dhcpcd prints that it has received the RA but then blocks,
>>> prints an error that it has timed out and overwrites the
>>> /etc/resolv.conf file with an empty one.
>>>
>>> It doesn't set the IPv6 address of the interface.
>>
>> Remove the B flag, that stops it forking to the background.
>> You may need the ipv6ra_fork option if your RA doesn't provide the RDNSS
>> option and you're not doing an IPv4 setup to avoid the timeout error.
> 
> The RA comes from rtadvd(8) on another NetBSD system, I needed the
> ipv6ra_fork option.
> 
> It doesn't block or generate an error now.
> 
> It still doesn't set the IPv6 address though, which was the whole
> point of running rtsol previously.

rtadvd(8) supports setting RDNSS servers to populate resolv.conf with.
So if you set that, you don't need the ipv6ra_fork.
I think we could possibly set this by default if *only* running IPv6RS,
ie disable IPv4 entirely and DHCPv6 as you have done.

I don't know why it doesn't set an address though.
Can you post the output of dhcpcd -dT6 --nodhcp rtk0 please?

>> As you're setting one interface via the flags and not dhcpcd.conf I
>> would recommend adding the M flag as well in-case you want to use any
>> dhcpcd tools further down the road.
> 
> I just followed the suggestion in the new rtsol man page.
> 
> I think users are going to get bitten by this when upgrading to
> NetBSD-7.

The example in the man page is just for testing purposes, it even states
that. For example, the --nodhcp6 flag is only intended for testing as
the RA message will say if DHCPv6 should be started or not.

>> The resolv.conf part is tricky - because dhcpcd supports DNSSL and RDNSS
>> options that need to expire it needs to be able to manage resolv.conf
>> somehow. The solution is to either disable dhcpcd from writing to it at
>> all (--nohook resolv.conf), setup your static config using
>> resolvconf.conf or make the file immutable. Is this something we should
>> document in resolv.conf(5)?
> 
> I would expect the default behaviour to be to not overwrite
> resolv.conf on an error.

This behaves like DHCP, DHCPv6 or a vpn link - expect resolv.conf to be
modified. The entry for the interface is cleared on start, just like the
addresses are cleared on a reboot. Hence the above comment I made.

Roy


Home | Main Index | Thread Index | Old Index