# IPv6: DHCPv6 client, and accept_rtadv vs. rtsold



## jem (Oct 22, 2020)

Hi.

I've had a fully IPv6-enabled network at home for a couple of years now, using both a global /56 prefix assigned by my ISP and /48 ULA prefix that I configured to give me stable, routable (between my own subnets) addresses in case the ISP changes the prefix they delegate to me (it hasn't happened yet, but it's possible).

Until now, I've used SLAAC for address assignment, but I'm switching over to DHCPv6 for the ULA assignment so that I can have dynamic DNS updates.  To that end, I configured a second instance of isc-dhcpd to hand out addresses from my ULA prefix and changed the router advertisement flags to 'MO'.  My Windows, Linux and ESXi clients all automatically started soliciting for DHCPv6, but not so for my FreeBSD hosts.  Whereas FreeBSD can be configured to obtain IPv4 addresses by DHCP just by adding "DHCP" to the ifconfig__iface_ line in /etc/rc.conf, there's no equivalent for IPv6, and FreeBSD seems to take no different action based purely on the presence of the 'MO' flags in the RA.  It looks like I need to install a DHCPv6 client package/port and_ manually _configure it to solicit either for a stateful address or just for stateless information.  Have I understood this correctly, or is there some other more automatic mechanism that I'm not aware of?

As a separate question, when an interface is configured with the IPv6 'accept_rtadv' flag, the kernel automatically processes router advertisements and adds IPv6 routes to the routing table.  Why then, is there also the userspace `rtsold` program which appears to do the same thing?

Thanks.

JM


----------



## SirDice (Oct 22, 2020)

jem said:


> Whereas FreeBSD can be configured to obtain IPv4 addresses by DHCP just by adding "DHCP" to the ifconfig__iface_ line in /etc/rc.conf, there's no equivalent for IPv6, and FreeBSD seems to take no different action based purely on the presence of the 'MO' flags in the RA. It looks like I need to install a DHCPv6 client package/port and_ manually _configure it to solicit either for a stateful address or just for stateless information. Have I understood this correctly, or is there some other more automatic mechanism that I'm not aware of?


FreeBSD's dhclient(8) only does IPv4. So if you want to do DHCPv6 you're going to need to install net/isc-dhcp44-client for example, net/dual-dhclient is also quite useful.


----------



## ta0kira2 (Dec 29, 2020)

SirDice said:


> FreeBSD's dhclient(8) only does IPv4. So if you want to do DHCPv6 you're going to need to install net/isc-dhcp44-client for example, net/dual-dhclient is also quite useful.


FYI, net/dual-dhclient doesn't properly kill the DHCPv6 client with `service netif stop`, but net/dual-dhclient-daemon (by the same person) behaves as expected.


----------

