You are not logged in.

#1 2022-09-20 19:19:11

parbleu
Member
Registered: 2021-11-28
Posts: 19

Configure DNS per connection

Hi there,

I’d like to switch from Network Manager to iwd. However, there’s one feature of Network Manager for which I didn’t find a solution with iwd yet.

Network Manager allows the configuration of DNS servers per connection. I .e. I can configure using server x in WiFi network y, but the advertised server in another network. For iwd I only found the option to configure dNS servers globally via systemd-networkd/systemd-resolvd.

I know that the combination of iwd and Network Manager will do that, but I want to skip the latter. So my question is, is it possible to configure DNS servers with iwd but without Network Manager per connection?

Offline

#2 2022-09-20 20:08:00

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: Configure DNS per connection

Do you use https://wiki.archlinux.org/title/Iwd#En … figuration ?
Because otherwise you're swapping NM for systemd-networkd/resolved and https://wiki.archlinux.org/title/Systemd-networkd allows you to specify static DNS IPs.
iwd is merely the carrier and irrelevant to the matter (and for it's dhcp config functions I assume it to be rather rudimentary - and it'll certainly not deal w/ wired connection setups)

Offline

#3 2022-09-21 19:07:02

parbleu
Member
Registered: 2021-11-28
Posts: 19

Re: Configure DNS per connection

Thanks for pointing out the configuration of static IPs with systemd-networkd. I looked into the wiki page before, but not up to this section.

I think it makes sense to use systemd-networkd/systemd-resolved as a replacement for NetworkManager, even though iwd can handle that as well. The only advantage I see with NetworkManager is that it provides a GUI. But it does not handle DoT and DNSSEC. Or are there other reasons to prefer the NetworkManager?

Offline

#4 2022-09-21 19:24:26

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: Configure DNS per connection

But it does not handle DoT and DNSSEC.

That would make only sense in the context of resolved or dnsmasq, both can be used along NM as caching DNS proxies?
https://wiki.archlinux.org/title/NetworkManager#DNSSEC
dnsmasq doesn't support DoT, but eg. next to resolved, stubby does: https://wiki.archlinux.org/title/Domain … NS_servers

You're conflating various elements of the network stack here.

Offline

#5 2022-09-22 14:50:40

parbleu
Member
Registered: 2021-11-28
Posts: 19

Re: Configure DNS per connection

Maybe I mix up a little bit. But my rationale is to replace the NetworkManager with the combination of iwd and systemd-networkd.

One reason for using NetworkManager was that you can manage wireless networks individually. Since that’s obviously also possible with systemd-networkd, I was wondering if there was anything else to be said for NetworkManager – other than that it has a GUI. DoT and DNSSEC can only be used with NetworkManager using extra stuff, but systemd-networkd can do it directly.

I also think of NetworkManager being the traditional, trusted way and systemd-networkd to be the more modern approach. but maybe this is a misconception. hmm

Offline

#6 2022-09-22 15:19:34

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: Configure DNS per connection

but systemd-networkd can do it directly.

No?
That's the thing where you mix up stuff - a network managing daemon of any kind does not deal w/ stuff like DNSSEC or DoT *at all*, it manages your network configuration. That's it.
NetworkManager and systemd-networkd rely on "extra stuff" to provide wifi carriers (wpa_supplicant or iwd) and on "extra stuff" to provide local DNS caching (which isn't a necessity to begin with) like systemd-resolved or dsmasq or stubby or whatnot (though I'm not sure whether systemd-networkd will play nicely with anything but resolved)

think of NetworkManager being the traditional, trusted way and systemd-networkd to be the more modern approach […] is a misconception

They're different implementations of the same stuff and both are mostly driven by NIH
(and just for the records: I use neither and under no circumstances whatsoever would ever even remotely consider using systemd-resolved; reading a file through a socket might by some be considered "modern" but is mostly dumb)

Offline

#7 2022-09-22 19:33:58

parbleu
Member
Registered: 2021-11-28
Posts: 19

Re: Configure DNS per connection

seth wrote:

but systemd-networkd can do it directly.

No?

You’re right. I forgot mentioning systemd-resolvd for this purpose. wink

What’s meant with NIH? I know this acronym in a scientific context, which is obviously not meant here. smile

Offline

#8 2022-09-22 20:40:22

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: Configure DNS per connection

What’s meant with NIH?

"Not Invented Here"

I forgot mentioning systemd-resolvd for this purpose.

What defies the statement: https://wiki.archlinux.org/title/Networ … d-resolved
You've to understand that systemd-networkd and systemd-resolved are not the same thing, they're just developed under the systemd-umbrella.

Offline

Board footer

Powered by FluxBB