SYSTEMD-RESOLVED.SERVICE(8) systemd-resolved.service (NAME) systemd-resolved.service, systemd-resolved - (DNS/LLMNR/mDNS) (SYNOPSIS) systemd-resolved.service /usr/lib/systemd/systemd-resolved (DESCRIPTION) systemd-resolved . (stub resolver) (caching) DNS/DNSSEC LLMNR MulticastDNS . : o (API) systemd-resolved D-Bus org.freedesktop.resolve1(5) org.freedesktop.LogControl1(5) . (asynchronous) ( DNSSEC - ). o systemd-resolved Varlink AF_UNIX /run/systemd/resolve/io.systemd.Resolve . D-Bus D-Bus . o getaddrinfo(3) glibc RFC3493[1] gethostbyname(3). . DNSSEC (synchronous) . glibc (nss(5)) . NSS nss-resolve(8) NSS glibc systemd-resolved . o systemd-resolved (stub listener) DNS IP 127.0.0.53 127.0.0.54 . DNS API systemd-resolved . NSS ( ) ( - LLMNR) (unicast) DNS . DNS 127.0.0.53 LLMNR/MulticastDNS . DNS 127.0.0.54 <<>> DNS DNS DNSSEC LLMNR/MulticastDNS . ( DNS-over-TLS .) DNS /etc/systemd/resolved.conf /etc/systemd/network/*.network ( systemd-networkd.service(8) ) DHCP resolvectl(1) DNS . systemd DNS resolved.conf(5) systemd.network(5) . /etc/resolv.conf DNS (symlink) /run/systemd/resolve/stub-resolv.conf /usr/lib/systemd/resolv.conf /run/systemd/resolve/resolv.conf ( ). (SYNTHETIC RECORDS) systemd-resolved (RR) DNS (synthesize) : o IP (scope) -- -- IPv4 127.0.0.2 ( ) IPv6 ::1 ( ) . o "localhost" "localhost.localdomain" ".localhost" ".localhost.localdomain" IP 127.0.0.1 ::1 . o "_gateway" (gateway) (metric) . . o "_outbound" IPv4 IPv6 . IP . . IP . o "_localdnsstub" IP 127.0.0.53 DNS ( ) . o "_localdnsproxy" IP 127.0.0.54 DNS ( ) . o /etc/hosts ( MX) . /etc/hosts ReadEtcHosts=no resolved.conf(5) . (PROTOCOLS) systemd-resolved.service DNS LLMNR MulticastDNS : o ( "localhost" "localdomain" ) /etc/hosts . o (Single-label) LLMNR LLMNR . IPv4 LLMNR IPv4 IPv6 LLMNR IPv6 . LLMNR MulticastDNS DNS . o (A AAAA) DNS (unicast) (search domains) . . . . DNS ResolveUnicastSingleLabel=yes . . DNS . o (Multi-label) ".local" MulticastDNS MulticastDNS . LLMNR IPv4 IPv4 IPv6 IPv6 . o DNS DNS DNS ( ) . (route-only) . ".local" DNS DNS . ".local" DNS DNS . ".local" DNS RFC6762[2] MulticastDNS . o ( reverse lookups) - DNS LLMNR MulticastDNS ( ) . ( ). . ( ) . systemd.network(5) resolvectl(1) Domains= resolved.conf(5) DNS . DNS systemd-resolved.service : o ( ) DNS (: ) << >> : (labels) . DNS DNS << >> . ( << >> ). . . glibc . o ( ) DNS DNS . o DNS DNS DNS (fallback) . o DNS DNS . resolvectl default-route DNSDefaultRoute= .network . DNS : "~." (false) (true) . : . DNS "~." . ( ). DNS "~." . DNS . D-Bus systemd-resolved org.freedesktop.resolve1(5) . GLIBC (COMPATIBILITY WITH THE TRADITIONAL GLIBC STUB RESOLVER) nss-resolve(8) systemd-resolved nss-dns . o ( ). /etc/hosts nss-files . . nss-dns systemd-resolved [3]. o A AAAA DNS ( ResolveUnicastSingleLabel= resolved.conf(5) ). no-tld-query resolv.conf(5) . o (suffixing) . ( ). (FQDN) . nss-dns ( ) FQDN . . ndots /etc/resolv.conf . : FQDN [4]. o ".local" MulticastDNS DNS . - DNS . o /etc/hosts () . ( nss-resolve nss-dns nss-files ). /etc/hosts . o DNS LLMNR MulticastDNS LLMNR ( ) ".local" MulticastDNS ( ) . o $LOCALDOMAIN $RES_OPTIONS resolv.conf(5) . o nss-dns DNS DNS /etc/resolv.conf . systemd-resolved . . DNS (zones) DNS . /ETC/RESOLV.CONF /etc/resolv.conf ( resolv.conf(5) ) : o systemd-resolved /run/systemd/resolve/stub-resolv.conf . DNS 127.0.0.53 ( ) DNS . systemd-resolved . . /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf . /etc/resolv.conf API DNS systemd-resolved . . o /usr/lib/systemd/resolv.conf DNS 127.0.0.53 ( ) DNS . /etc/resolv.conf API DNS systemd-resolved . . o systemd-resolved /run/systemd/resolve/resolv.conf . /etc/resolv.conf DNS . : DNS DNS . /run/systemd/resolve/resolv.conf /etc/resolv.conf . API DNS systemd-resolved DNS . o /etc/resolv.conf systemd-resolved DNS . systemd-resolved . /etc/resolv.conf /run/systemd/resolve/resolv.conf 127.0.0.53 DNS . (SIGNALS) SIGUSR1 SIGUSR1 systemd-resolved () DNS DNS (dump ). 231. SIGUSR2 SIGUSR2 systemd-resolved () (flush) . - - systemd-resolved . systemd-resolved resolvectl flush-caches (synchronous) . 231. SIGRTMIN+1 SIGRTMIN+1 systemd-resolved DNS . . - - systemd-resolved DNS . systemd-resolved resolvectl reset-server-features . 235. SIGHUP SIGHUP systemd-resolved TCP ( ) . 256. (CREDENTIALS) systemd-resolved ImportCredential=/LoadCredential=/SetCredential= ( systemd.exec(5) ). : network.dns, network.search_domains IP DNS DNS . /etc/systemd/resolved.conf /etc/resolv.conf . 253. (KERNEL COMMAND LINE) systemd-resolved : nameserver=, domain= IP DNS ( nameserver=) DNS ( domain=) . DNS/ . /etc/resolv.conf DNS= Domains= resolved.conf(5) . (override) . 253. IP (IP PORTS) systemd-resolved IP : o 53 IPv4 127.0.0.53 127.0.0.54 ( "lo"). DNS . UDP TCP . o 5353 IPv4 IPv6 ( 0.0.0.0 ::0) MulticastDNS UDP. IP (wildcard) - MulticastDNS MulticastDNS . o 5355 IPv4 IPv6 ( 0.0.0.0 ::0) LLMNR TCP UDP. MulticastDNS . (SEE ALSO) systemd(1), resolved.conf(5), dnssec-trust-anchors.d(5), nss- resolve(8), resolvectl(1), resolv.conf(5), hosts(5), systemd.network(5), systemd-networkd.service(8), org.freedesktop.resolve1(5) (NOTES) 1. RFC3493 https://tools.ietf.org/html/rfc3493 2. RFC6762 https://tools.ietf.org/html/rfc6762 3. /etc/resolv.conf : nameserver 127.0.0.53 search foobar.com barbar.com "localhost" nss- dns systemd- resolved 127.0.0.53:53 : "localhost.foobar.com" "localhost.barbar.com" "localhost". () systemd-resolved (synthesize) . nss-dns nss-files . 4. <<>> . : . . systemd 257.13 SYSTEMD-RESOLVED.SERVICE(8)