Re: How do people use npf with dhcpcd?

Lloyd Parkes <[email protected]>
Newsgroups gmane.os.netbsd.current
Message-ID <[email protected]>
On 28/12/2025 05:16, David Brownlee wrote:
> On Fri, 26 Dec 2025 at 23:44, RVP <[email protected]> wrote:
>> Pass the `-w' (wait) flag to dhcpcd?:
> That allows the system to work if a dhcp server responds quickly
> enough, but leaves a nasty failure mode with broken npf if it does -
> like in a power failure where anything in set of "dhcp server and all
> links between" comes up slower than the NetBSD box.... :/
>
I use a belt and braces approach on my home network where some hosts get 
statically configured with their dynamic configuration.

My ISP has assigned me a static IPv4 address, a static IPv6 /128 address 
and a static IPv6 /56 network. My internal DHCP server is running on a 
separate host from my router.

I wrote an Ansible role that I run on hosts that need to boot without a 
network that copies their currently running configuration into their 
static configuration files. I did write a bit of Python code to convert 
IPv4 netmasks into a prefix bit count.

This seems to work well enough for me, although it isn't super well 
tested because I don't like testing power cuts.

Ngā-mihi,
Lloyd
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.