systemd-resolved explanation

Explanation is from systemd author Lennart Poettering on fedoraproject.org:

  1. If /etc/resolv.conf is a regular file, resolved will consume it for DNS configuration, and never change it or modify it or replace it. If this mode is selected arbitrary other programs that do DNS will talk directly to the provided DNS servers, and resolved is out of the loop.

  2. Alternatvely, /etc/resolv.conf can be made a symlink to /run/systemd/resolve/stub-resolv.conf. That file is updated by resolved whenever DNS configuration changes. In it you’ll find as DNS server the local host configured, where resolved is listening. In this mode other programs that do DNS will talk to resolved, and resolved propagates it to other DNS servers.

  3. Alternatively /etc/resolv.conf can be made a symlink to /run/systemd/resolve/resolv.conf. That file is also updated by resolved whenever DNS configuration changes. In it you find a merged set of configured upstream DNS servers. In this mode programs that do DNS will talk directly to the upstream DNS servers, but resolved will still tell them which ones, based on all the information it has.

In mode #1 resolved neither manages /etc/resolv.conf nor inserts itself into DNS resolution in any way. In mode #2 it manages and inserts itself into DNS resolution. In mode #3 it manages DNS resolution but will not insert itself to.