systemd-resolved.service, systemd-resolved
Network Name Resolution manager
- Provided by: systemd (Version: 229-4ubuntu21.31)
- Report a bug
Network Name Resolution manager
systemd-resolved.service
/lib/systemd/systemd-resolved
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 resolver and responder. In addition it maintains the /run/systemd/resolve/resolv.conf file for compatibility with traditional Linux programs. This file may be symlinked from /etc/resolv.conf.
The glibc NSS module nss-resolve(8) is required to permit glibc's NSS resolver functions to resolve host names via systemd-resolved.
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, and the per-link dynamic settings received over DHCP. See resolved.conf(5) and systemd.network(5) for details. 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/resolv.conf (see above).
systemd-resolved synthesizes DNS RRs for the following cases:
Lookup requests are routed to the available DNS servers and LLMNR interfaces according to the following rules:
If lookups are routed to multiple interfaces, the first successful response is returned (thus effectively merging the lookup zones on all matching interfaces). If the lookup failed on all interfaces, the last failing response is returned.
Routing of lookups may be influenced by configuring per-interface domain names. See systemd.network(5) for details. Lookups for a hostname ending in one of the per-interface domains are exclusively routed to the matching interfaces.
Note that /run/systemd/resolve/resolv.conf should not be used directly by applications, but only through a symlink from /etc/resolv.conf.
See the resolved D-Bus API Documentation[1] for information about the APIs systemd-resolved provides.
systemd(1), resolved.conf(5), dnssec-trust-anchors.d(5), nss-resolve(8), systemd-resolve(1), resolv.conf(5), hosts(5), systemd.network(5), systemd-networkd.service(8)