Date: Tue, 7 Jan 2025 19:59:23 +0100 From: Jon Clausen <freebsd-questions@ymmv.dk> To: questions@freebsd.org, Souji Thenria <mail@souji-thenria.net> Subject: Re: running dhclient on a statically configured interface? Message-ID: <Z315ixQ_b7r4Z4Db@c02qx0.local> In-Reply-To: <D6VAUGQWCPQS.3HF5NEUUMFBG@souji-thenria.net> References: <Z3wZbbtWuJyv7nEm@c02qx0.local> <D6VAUGQWCPQS.3HF5NEUUMFBG@souji-thenria.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Souji On 2025-01-06 22:14:17 (+0100), Souji Thenria wrote: > Hi Jon, > > On Mon Jan 6, 2025 at 6:57 PM CET, Jon Clausen wrote: > > Is it feasible to run dhclient(8) on the uplink interface, but still > > have > > the interface itself be statically configured? > > You might be able to configure this in the dhclient.conf(5) file; > Something like this: > > interface "ep0" { > request domain-name-servers; > } Interesting. I'll definitely have to read the man page closer, though I suspect there's not a direct way to do what I'm fishing for. > This should only request the DNS server and not anything else. However, > I never tested this configuration... I think you're right. > > And secondly, is there some method to propagate the options that dhclient > > receives from the server for other non-standard purposes? > > > > I'm not sure what you mean by that. Some sort of "script hook" or something, dhclient could be configured to hand over the information from the dhcp server over to, so that I could create my own tooling to handle whatever the server provides. For the resolver info, for example: I would need to get that from the jail running the uplink, to the jail that handles dns. > But DHCP supports custom options, > and I'm sure you can configure it somehow in the dhclient.conf(5) file > as well. Having thought a little more about it, I think a better way of describing what I'd like might be: Sort of a "dry-run" option, that'll let the client listen on the network and report the offer from the server somewhere else - maybe just log it - but not actually let it reconfigure the network interface. Essentially, I'd just like to get notified if the servers offer changes, and make my decisions manually. Of course the real issue here is that I'm not happy about letting my ISP make changes to my devices unilaterally. I've seen enough fatfingering over the years to not really trust anyone... br /jon -- YMMV
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Z315ixQ_b7r4Z4Db>