NetBSD-Users archive

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

Re: 10.0 ipv6 "autohost" behavior



On Tue, 14 Nov 2023 at 01:19, vom513 <vom513%gmail.com@localhost> wrote:
>
> Hello all,
>
> So back a while I had tried out a 10.0 snapshot (before the recent RC1).  I noticed that IPv6 didn’t work as it had been for me on 9.3 for example.  I was going to post a message/question but never got around it.
>
> After installing 10.0 RC1 on a system yesterday, I now see a warning at boot time if you try to use ip6mode=autohost.  I.e. no more rtsol and no more kernel handling of RAs.  It’s mentioned there to use dhcpcd to handle this now.
>
> In my home network, I have a mix of DHCP and static for IPv4.  For IPv6, I do SLAAC only (no DHCPv6).  Both M and O flags set to 0 in RAs.
>
> So because of this I only want dhcpcd to do the “bare minimum” and behave like autohost used to.  I.e. send an RS, take the RA, configure an address and set the default route.
>
> In rc.conf I put:
>
> dhcpcd=YES
> dhcpcd_flags=“-6 hme0” # Not that it matters but this is a sparc machine…
>
> On a reboot, I see the prefixes picked up, but then a pause, and eventually dhcpcd exit’s 1.  The end of the boot messages tell me that a job failed.  I’m assuming it was sending DHCPv6 requests and getting nothing and bailed.
>
> So after this, I have addresses and a route, but dhcpcd is not running.  So beside the ugly boot error message, these addresses and this state won’t persist indefinitely (i.e. if my prefix changes etc.) as dhcpcd is NOT running in the background at this point.
>
> So after reading and poking around, I added “nodhcp6” to /etc/dhcpcd.conf.  This seemed to get the behavior I was after.
>
> So this message is to possibly help others in a similar/same situation - but also to ask - is there a more elegant way to do this ?  I scoured the dhcpcd(.conf) man pages and couldn’t really come up with any other way (i.e. pure command line arguments).
>
> Thanks for any info or other experiences.

Hi

To have dhcpcd to remain running in manager mode to avoid that exit
you'll want -M in dhcpcd_flags

/etc/defaults/rc.conf has

dhcpcd=NO           dhcpcd_flags="-qM"      # For ifconfig_XXX=dhcp.

and setting dhcpcd_flags in rc.conf will overwrite that, so
dhcpcd_flags="-qM -6 hme0" should work for you (you might want to drop
-q if you prefer more chatty boot output :)

Thanks

David


Home | Main Index | Thread Index | Old Index