Solved DHCP6c How won't autostart

Hello. I just don't know how to force dhcp6c to start while booting.

According to
Code:
% cat /usr/local/etc/rc.d/dhcp6c

# dhcp6c_enable (bool):                 Set to NO by default.
#               Set it to YES to enable dhcp6c.
# dhcp6c_interfaces (NIC list):         Not defined by default.
#               Set it to the network interface(s) where dhcp6c should work on.
Code:
% sed -n "/IPv6/,/END IPv6/p" /etc/rc.conf
# IPv6
ipv6_gateway_enable="YES"

dhcp6c_enable="YES"
dhcp6c_interfaces="tun0"

#ifconfig_re0_ipv6="inet6 accept_rtadv"
#rtadvd_enable="YES"
#rtadvd_interfaces="re0"

#ifconfig_re0_ipv6="inet6 accept_rtadv"
#rtsold_enable="YES"

# END IPv6
My re0 takes IPv6 only after % sudo service dhcp6c start. And no errors from dmesg.

P.S. I use DHCPv6 in case of Prefix Delegation problems from my provider, which gives me internet through PPPoE.

Thanks as always.
 
Since you are only using it on a tunnel interface and not a physical one, I'm inclined to say that the tunnel doesn't exist yet when the system boots. I use DHCP6C as well and from the boot time rcorder shown by service -r I can see it runs very early in the boot process before my VPN runs. For me, I only use it on the physical interface.

If that is the case, the best option would probably be to set the following.
Code:
cloned_interfaces="tun0"

Alternately, you can probably modify the startup script for your VPN to start beforehand however that is probably a fragile solution that will get replaced whenever the package gets upgraded.
 
Back
Top