I had the same question.
resolvectl now is used instead of systemd-resolve.
resolvectl is the client for systemd-resolved daemon.
resolvectl gives the same output as systemd-resolve.
Okay as for "Current Scopes:" . It can have three words "DNS", "mDNS" "LLMNR".
"Current Scopes:" reside inside per-interface section.
"Current Scopes:" does not exist in Global section.
If we have "Current Scopes: mDNS" in section "Link 2 (enp3s0)" it means that systemd-resolved will accept mDNS traffic on interface enp0s3 and respond. To be specific the traffic is
IP 224.0.0.251 UDP 5353
Also it means systemd-resolved will make mDNS queries via interface enp0s3 to the network.
If we have "Current Scopes: DNS" it means we specified per-interface dns server(s) in this section. For instance
Link 3 (wlp2s0) Current Scopes: DNS DNS Servers: 8.8.8.8 8.8.4.4 192.168.211.142
What does it actually mean on practice? Its kind of tricky. To make explanation more simple and clear suppose we have only one interface on pc.
systemd-resolved always has General section and a section per every interface.
The word "DNS" in the line "Current Scopes:" has quite different meaning that the word "mDNS". First of all it doesnt mean that systemd-resolved will answer for DNS requests incoming to the interface enp0s3. The second one - systemd-resolved will make DNS queries via enp0s3 regardless if we have "DNS" in the line or not.
Okay. we can specify DNS server in General section (via /etc/systemd/resolved.conf or via /etc/systemd/resolved.conf.d/*.conf) for instance like this
$ cat /etc/systemd/resolved.conf/global.conf [Resolve] DNS=1.1.1.1 FallbackDNS=8.8.8.8
It will give
Global Current DNS Server: 1.1.1.1 DNS Servers: 1.1.1.1 Fallback DNS Servers: 8.8.8.8
Also we can specify dns server in per-interface section
via resolvectl utility (unfortunately its not possible to set per-interface dns IP via systemd-resolved config files, you can do that via systemd-networkd conf files but thats another story)
# resolvectl dns enp0s3 12.12.12.12
it will give the output
Link 2 (enp0s3) Current Scopes: DNS DNS Servers: 12.12.12.12
when we set per-interface dns we switch on "DNS" in the line "Current Scopes:"
So overall we have output ( i give truncated output to make less confusion)
Global ... Current DNS Server: 8.8.8.8 Link 2 (enp0s3) ... Current Scopes: DNS DNS Servers: 12.12.12.12
what happens if we make dns query
# resolvectl query -y gmail.com
Will it use 12.12.12.12 or 8.8.8.8 or may be both. Actualy it depends on three parameters:
- What is "DNS Domain" line in Global section?
- What is "DNS Domain" line in per-interface section?
- What is "DefaultRoute" word in per-interface section?
In this particular case
Global ... Current DNS Server: 8.8.8.8 DNS Domain ~. <====== Link 2 (enp0s3) ... Current Scopes: DNS Protocols: +DefaultRoute <====== Current DNS Server: 12.12.12.12 DNS Domain: co.uk <========
If the query is "bbc.co.uk" it will be resolved via 12.12.12.12
If the query is "bbc" it will be transformed to "bbc.co.uk" and resolved via 12.12.12.12
If the query is gogle.com it will be resolved via 8.8.8.8
If you change DNS Domain: to
DNS Domain:"~."
or
DNS Domain:""
in one of sections or change DefaultRoute to
-DefaultRoute
the used dns server or servers will be quite different. I suggest
to change and check via
# tcpdump udp -n -i enp0s3
Overall rule - the request will be sent to dns servers of every section (including Global section) where we have match "DNS Domain:" with request domain, if we dont have such match - the request will be send via dns server in Global section and to dns server in section with +DefaultRoute flag. "DNS Domain: ~." means "every domain"
I think systemd-resolved has clumsy, confusing logic of working and big but bad documentation.
As for the meaning "LLMNR" in Scopes. I havent done any investigation.