Jump to content
ArchWiki

Talk:Systemd-resolved

From ArchWiki
Latest comment: 26 April by Lahwaacz in topic Disable systemd-resolved

Help people to make the switch

Maybe it would be a good idea to mention what you need to do when switching over from other configurations, like switching from netctl + dhcpd to systemd-networkd + systemd-resolved. Like for example disabling the dhcpd.service, symlinking /etc/resolv.conf, etc. If people agree, I could add something like this.

—This unsigned comment is by Hendrikto (talk) 21:52, 2 April 2019‎. Please sign your posts with ~~~~!

Latest comment: 11 April 2020 1 comment1 person in discussion

Systemd-resolved#Manually implies that setting Domains=~. in the [Resolve] section will make systemd-resolved prefer custom DNS servers over per-link ones. However, at least on my laptop, after following these instructions and making a query with resolvectl query both custom and per-link servers are queried, with the results from the per-link server being preferred (observed via tcpdump). Is this a problem with the wiki page or is it possibly a bug in resolved (or is this problem unique to me)?

Ltskv (talk) 14:42, 11 April 2020 (UTC) Reply

DNS server order?

Latest comment: 8 October 2022 3 comments3 people in discussion

I don't see systemd-resolved to preserve order on multiple DNS servers. It is constantly switching in between but i don't want that. The 2nd server is only for backup of the 1st. Normal resolv.conf is waiting 5 seconds till it takes the next server in order.

—This unsigned comment is by DocMAX (talk) 23:43, 15 March 2021‎ (UTC). Please sign your posts with ~~~~!Reply

And how do you expect the switching to your 2nd server to work? -- Lahwaacz (talk) 07:58, 16 March 2021 (UTC) Reply
Did DocMax used DNS, and FallbackDNS in /etc/systemd/resolved.conf? Will they give the desired behavior? Regid (talk) 13:04, 8 October 2022 (UTC) Reply

Globally enabled, but per network disabled by default?

Latest comment: 7 December 2022 1 comment1 person in discussion

The section Systemd-resolved#mDNS contains something like this:

systemd-resolved's mDNS support can be enabled by ...

Enabling per-connection mDNS support depends on the network manager: ...

This didn’t show the fact that mDNS needs to be individually enabled per-connection, even if it is globally enabled. From manual:

Note that systemd-networkd.service(8) also maintains per-link Multicast DNS settings. Multicast DNS will be enabled on a link only if the per-link and the global setting is on.

And the network-level MulticastDNS is disabled by default: manual. This unintuitive behavior may worth being mentioned in this section? --Franklin Yu (talk) 15:37, 7 December 2022 (UTC) Reply

Stopping NetworkManager overwrite /etc/resolv.conf

Latest comment: 1 June 2023 2 comments2 people in discussion

After replace /etc/resolv.conf with a symbolic link by:

# ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Whenever NetworkManager restarted, it overwrites the /etc/resolv.conf symbolic link. To avoid that need to add

nohook resolv.conf

to file /etc/dhcpcd.conf if dhcpcd used as the dhcp client. If other dhcp clients used, may need different procedures. I spent lots of time to achieve this by adjust the configuration file of NetworkManager, but nothing worked. Shall we mentioned this here to help others?

Leeli (talk) 17:23, 1 June 2023 (UTC) Reply

Since you use NetworkManager, this should be documented in NetworkManager#/etc/resolv.conf. — Lahwaacz (talk) 20:49, 1 June 2023 (UTC) Reply
Latest comment: 7 July 2023 1 comment1 person in discussion

When systemd-resolved is enabled, and /etc/resolv.conf doesn't exist, tmpfiles.d creates the stub-resolv.conf symlink. This might be better, because it works inside chroot.
rm /etc/resolv.conf

—This unsigned comment is by Therealmate (talk) 13:26, 7 July 2023 (UTC). Please sign your posts with ~~~~!Reply

Disable systemd-resolved

Latest comment: 26 April 4 comments3 people in discussion

We need information here on how to fully deactivate systemd-resolved on Arch. sudo systemctl disable systemd-resolved && sudo systemctl stop systemd-resolved && rm /etc/resolve.conf && sudo systemctl restart NetworkManager isn't enough. Kallisti5 (talk) 15:02, 3 April 2026 (UTC) Reply

This seems like the solution...
/etc/systemd/resolved.conf
[Resolve]
DNSStubListener=no Kallisti5 (talk) 15:08, 3 April 2026 (UTC) Reply
That makes no sense. If systemd-resolved service is disabled, editing its config doesn't do anything.
Hanabishi (talk) 22:23, 3 April 2026 (UTC) Reply
Since you use NetworkManager, did you configure NetworkManager#DNS_management? — Lahwaacz (talk) 10:29, 26 April 2026 (UTC) Reply

AltStyle によって変換されたページ (->オリジナル) /