Re: IPv6 routing, Verizon FiOS, dhcpcd
- In reply to: Chris Ross : "Re: IPv6 routing, Verizon FiOS, dhcpcd"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 02 Dec 2025 14:27:15 UTC
On Tue, Nov 4, 2025 at 1:49 PM Chris Ross <cross+freebsd@distal.com> wrote:
>
> Apologies for top-post, but the earlier retained below is little more than
> trimmed history. I wanted to come back to this for advice. What I have done
> to solve (aka work around) this problem for myself is two changes in
> /usr/local/etc/rc.d/dhcpcd:
>
> ——8<——8<——8<——8<——8<——
> --- dhcpcd.orig 2024-10-13 12:22:44.181922000 -0400
> +++ dhcpcd 2025-10-06 13:41:14.523012000 -0400
> @@ -1,6 +1,7 @@
> #!/bin/sh
> # PROVIDE: dhclient dhcpcd
> +# REQUIRE: netif
> # KEYWORD: nojailvnet
What you're seeing here is a bit of a quirk and I don't think
documented in the port, but you can use rcorder to discover out what
is really going on. You're likely running this with
"dhcpcd_enable=YES" in rc.conf, as with most services. But the rc file
has no requirements, and does not have the "nostart" keyword, so
rcorder puts it nearly at the top of the startup list, before netif
and interface renaming, so none of the interfaces have been brought up
at that point. The way the script is written, it isn't really intended
to run as a separate daemon, but by replacing the base dhclient, e.g.
with dhclient_program="usr/local/bin/dhcpcd" and keeping the
interfaces as ifconfig_xxx="DHCP". This will run dhcpcd in "single
interface" mode instead of "management mode", so one instance per
interface.
I would recommend trying first using the dhclient_program method. You
can pass flags to wait for an address, e.g., dhclient_flags="--waitip
6"
Version 11 of dhcpcd will not support the single interface mode, so
this may need to be modified in the futre albeit in a manner that
doesn't work as nicely with the BSD rc system if you use dhcpcd for
multiple interfaces.
> + # When running at boot, it'll take a while to initially set up the
> + # interfaces such that the addresses et al can be bound, I don't
> + # know why, but in the normal case if I don't wait here, local_unbound
> + # cannot bind port 53 on one or more of the addresses.
> + if [ `expr $now - $boottime` -lt 90 ]; then
> + stdbuf -o 0 echo "${name} waiting for addresses to stabilize ... "
> + sleep 2
> + echo "done"
> + fi
If you really, really, really need to do this, take a look at the
"netwait" rc script, and have it ping google or something.