News for hackers. Stuff that matters.
Re:Systemd through the eyes of a musl distribution maintainer by akritid on Saturday January 06, 2024 @10:16AM (#38892080)
It’s called split DNS. Can be implemented using dnsmasq
Re:Systemd through the eyes of a musl distribution maintainer by nijave on Saturday January 06, 2024 @10:18AM (#38892101)
It can be implemented with dnsmasq but dnsmasq doesn't integrate with DHCP (edit, client) out of the box and requires a restart to apply configuration updates which invalidates query cache.

Edit-

I think split dns more commonly refers to serving different internal/private and external/public zones.

In this case, the DNS servers may return the same results but if I'm connecting to a VPN running some distance away, I don't want to route all DNS requests to that server--only the ones for domains on that network. The Domains directive allows configuring this https://man.archlinux.org/man/systemd.network.5#%5BNETWORK%5...

You can add a dhclient hook to reconfigure dnsmasq with `server=` directives to achieve the same thing, but, as mentioned, that still requires restarting the dnsmasq daemon. That usually manifests as: the VPN connection times out, the hook runs, dnsmasq is restarted, but a random web page or request will fail while the daemon is restarting. Sure, you could do SO_REUSEADDR or something to prevent the disruption, but, once again, this all just works out of the box with systemd-*

Re:Systemd through the eyes of a musl distribution maintainer by denton-scratch on Saturday January 06, 2024 @10:48AM (#38892373)
> dnsmasq doesn't integrate with DHCP

DNSMasq is a combined DNS and DHCP server! Of course it's integrated!

Re:Systemd through the eyes of a musl distribution maintainer by nijave on Saturday January 06, 2024 @11:05AM (#38892528)
I'm talking about a local caching resolver, not a server running somewhere else on the network. dnsmasq doesn't ship with a DHCP client
Re:Systemd through the eyes of a musl distribution maintainer by denton-scratch on Saturday January 06, 2024 @11:54AM (#38892959)
I don't get your point. DNSMasq doesn't ship with a client, because it's a server. It's a cacheing resolver and a DHCP server that is usually run locally. I don't know of any system that doesn't come with its own built-in (or standard) DHCP client.

Can you clarify your objection to DNSMasq?

Re:Systemd through the eyes of a musl distribution maintainer by cbzbc on Saturday January 06, 2024 @12:58PM (#38893530)
His objection is that it doesn't replace the use case that resolvd is supposed to solve. Which is to provide a local service that can redirect DNS queries dynamically as local interfaces go up and down, which is where the integration with a DHCP client comes in.
Re:Systemd through the eyes of a musl distribution maintainer by denton-scratch on Sunday January 07, 2024 @06:17AM (#38900283)
Oh, OK. Thanks.

Makes sense; a lot of the systemd ecosphere seems to be about hotdesking, plugging things in and unplugging them, moving from one wifi AP to another, hibernating and so on. I don't encounter these use-cases, on the whole, which is probably a large part of why I find systemd so annoying.

Re:Systemd through the eyes of a musl distribution maintainer by cbzbc on Sunday January 07, 2024 @08:32AM (#38901050)
Yeah, and I have some sympathies with what systemd is trying to do here, but the implementation is often backwards and/or half-arsed.
Re:Systemd through the eyes of a musl distribution maintainer by nijave on Monday January 08, 2024 @11:31PM (#38922342)
Still no DHCPRELEASE.
Re:Systemd through the eyes of a musl distribution maintainer by egberts1 on Saturday January 06, 2024 @03:06PM (#38894887)
Dnsmasq and resolvd is a beast to tame in homelab, and split network.