диспетчер разрешения сетевых имен (Network Name Resolution manager)
Описание (Description)
systemd-resolved
is a system service that provides network name
resolution to local applications. It implements a caching and
validating DNS/DNSSEC stub resolver, as well as an LLMNR and
MulticastDNS resolver and responder. Local applications may
submit network name resolution requests via three interfaces:
• The native, fully-featured API systemd-resolved
exposes on
the bus, see org.freedesktop.resolve1(5) and
org.freedesktop.LogControl1(5) for details. Usage of this API
is generally recommended to clients as it is asynchronous and
fully featured (for example, properly returns DNSSEC
validation status and interface scope for addresses as
necessary for supporting link-local networking).
• The glibc getaddrinfo(3) API as defined by RFC3493
[1] and its
related resolver functions, including gethostbyname(3). This
API is widely supported, including beyond the Linux platform.
In its current form it does not expose DNSSEC validation
status information however, and is synchronous only. This API
is backed by the glibc Name Service Switch (nss(5)). Usage of
the glibc NSS module nss-resolve(8) is required in order to
allow glibc's NSS resolver functions to resolve hostnames via
systemd-resolved
.
• Additionally, systemd-resolved
provides a local DNS stub
listener on IP address 127.0.0.53 on the local loopback
interface. Programs issuing DNS requests directly, bypassing
any local API may be directed to this stub, in order to
connect them to systemd-resolved
. Note however that it is
strongly recommended that local programs use the glibc NSS or
bus APIs instead (as described above), as various network
resolution concepts (such as link-local addressing, or LLMNR
Unicode domains) cannot be mapped to the unicast DNS
protocol.
The DNS servers contacted are determined from the global settings
in /etc/systemd/resolved.conf, the per-link static settings in
/etc/systemd/network/*.network files (in case
systemd-networkd.service(8) is used), the per-link dynamic
settings received over DHCP, information provided via
resolvectl(1), and any DNS server information made available by
other system services. See resolved.conf(5) and
systemd.network(5) for details about systemd's own configuration
files for DNS servers. To improve compatibility, /etc/resolv.conf
is read in order to discover configured system DNS servers, but
only if it is not a symlink to
/run/systemd/resolve/stub-resolv.conf,
/usr/lib/systemd/resolv.conf or /run/systemd/resolve/resolv.conf
(see below).