Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

systemd-resolved

Direct answer

systemd-resolved is a local DNS stub resolver (127.0.0.53) that caches answers, supports per-interface DNS servers (useful with VPNs), DNSSEC and DNS-over-TLS.

When to use this

Use it on systems that use resolved (Ubuntu, Fedora) when names fail or the wrong DNS server answers.

First 30 seconds

1. resolvectl status — current DNS server per link?

2. resolvectl query <name> — which link and server answered?

3. Stale answer → resolvectl flush-caches.

4. VPN names → domains set on the VPN link?

5. Logs: journalctl -u systemd-resolved -e.

Operational verification

application → stub 127.0.0.53 → resolved picks the link by domain → upstream server → cached answer

Evidence · next step

For DNS → systemd-resolved, continue with the first unproven Topic check: Confirm service/unit state, stub listener and whether /etc/resolv.conf points at the expected resolved-managed file. If that boundary is healthy, advance to the adjacent check: Inspect resolvectl status for global/per-link DNS servers, current server, search/routing domains, protocols and default-route decisions. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Scope / prerequisiteUse it on systems that use resolved (Ubuntu, Fedora) when names fail or the wrong DNS server answers.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

7 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

network link config → systemd-resolved per-link/global DNS state → routing-domain selection → cache/stub → upstream server → response → NSS/application consumer

Healthy evidence: resolved is active with expected per-link servers/routing domains, selects the intended upstream for the query and returns the expected data to the application path.

Step 2 Verification and output interpretation Verify boundary

Existing fast checks for this Topic. - Confirm service/unit state, stub listener and whether /etc/resolv.conf points at the expected resolved-managed file.

  • Inspect resolvectl status for global/per-link DNS servers, current server, search/routing domains, protocols and default-route decisions.
  • Query the exact name with resolvectl and direct upstream tools when needed, comparing interface/view and cache effects.
  • After configuration change, verify per-link state, the original application resolver path and persistence across link renewal/restart.

Verification chain. network link config → systemd-resolved per-link/global DNS state → routing-domain selection → cache/stub → upstream server → response → NSS/application consumer

Step 3 Specialized verification Verify boundary

Inspect resolved’s global and per-link state, including DNS servers, current server, search/route domains and default-route flags. Test the exact name and record type using the same application resolution path when possible, then compare with a direct query only as isolation. Confirm /etc/resolv.conf points to the intended generated file/stub. For split DNS, verify which link/server owns the queried suffix. Cache flushing can aid testing but should not substitute for understanding routing policy.

Step 4 Commands Verify boundary
resolvectl status
resolvectl query example.com
resolvectl flush-caches
Step 5 Failure modes and next checks Narrow the fault

Suspicious evidence: the wrong link owns the routing domain, a VPN/default-route change redirects queries, stub works but upstream times out, cache returns stale data, or applications bypass resolved.

systemd-resolved is confirmed when the intended link/domain selects the intended upstream, the stub/cache returns the expected data and the original application consumes that path; active service state alone is insufficient.

Step 6 Special cases and limits Narrow the fault

A successful direct query to 8.8.8.8 or another server does not show the host resolver path is correct. /etc/resolv.conf content may be generated and not the authoritative source. DNS failure can be name routing, transport, DNSSEC, search expansion or upstream data rather than basic IP reachability. Keep application NSS path, resolved routing policy, server reachability and authoritative DNS data separate.

Step 7 Common mistakes Narrow the fault
  • Pointing applications at 127.0.0.53 and expecting it to work inside containers.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

resolvectl status shows the servers per link. Flush the cache with resolvectl flush-caches. Split DNS for VPNs uses routing domains (~corp.example).

Key checks
  • resolvectl query <name> — resolve and show which link/server
  • resolvectl status — DNS servers per link (systemd-resolved)
  • cat /etc/resolv.conf — configured nameservers
  • getent hosts <name> — resolution through the system path (nsswitch)
  • dig <name> @<server> — query a specific server
ReferenceWhat it is1 section · depth on demand

Core model

Show service state, stub listener, global and per-link DNS servers/domains, routing-domain selection and cache behavior separately. A running service only shows the daemon is active, but it does not show the intended link/server is selected or that upstream responses are healthy.

ReferenceImportant terms & boundaries7 sections · depth on demand

What this shows and what it does not

systemd-resolved is confirmed when the intended link/domain selects the intended upstream, the stub/cache returns the expected data and the original application consumes that path; active service state alone is insufficient.

systemd-resolved owns its stub, cache and per-link DNS routing state.

In depth

systemd-resolved: per-link DNS and the local stub

systemd-resolved is a local resolver service that handles DNS, LLMNR and mDNS. It routes each query to the right upstream servers. The systemd-resolved.service(8) manual page describes:

  • Local stub at 127.0.0.53: the full feature set. A second stub at 127.0.0.54 only proxies, without DNSSEC validation or LLMNR/mDNS.
  • /etc/resolv.conf: four supported modes. A symlink to /run/systemd/resolve/stub-resolv.conf is recommended.
  • Per-link servers and domains: each link can have its own DNS servers, search domains and route-only domains (written ~example.net). A query goes to the link with the longest matching domain, and ~. makes a link the default for everything else.
  • Synthesised names: localhost and the local host name, _gateway (the default gateway) and _outbound.
  • Maintenance: resolvectl flush-caches clears the cache.

Split DNS with a VPN

LinkDNS serversDomainsResult
eth0 (office or home)10.20.0.53example.net (search)General queries
wg0 (VPN)10.99.0.53~corp.example.netOnly corp names go over the VPN

resolvectl commands

TaskCommand
Servers and domains per linkresolvectl status
Resolve through resolvedresolvectl query name
Set a link's DNS (runtime)resolvectl dns wg0 10.99.0.53
Set route-only domainsresolvectl domain wg0 '~corp.example.net'
Clear the cacheresolvectl flush-caches
Statistics (cache hits, DNSSEC)resolvectl statistics

Persistent configuration

Global settings go in /etc/systemd/resolved.conf (DNS=, Domains=, DNSSEC=, DNSOverTLS=). Per-link settings come from the network manager: systemd-networkd, NetworkManager or netplan.

host$ resolvectl status | sed -n '1,4p;/Link 2/,/DNS Domain/p;/Link 5/,/DNS Domain/p'
Global
       Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub
Link 2 (eth0)
Current DNS Server: 10.20.0.53
       DNS Domain: example.net
Link 5 (wg0)
Current DNS Server: 10.99.0.53
       DNS Domain: ~corp.example.net
host$ resolvectl query intranet.corp.example.net
intranet.corp.example.net: 10.99.12.20 -- link: wg0
host$ resolvectl query _gateway
_gateway: 10.110.0.1 -- link: eth0
host$ sudo resolvectl flush-caches && resolvectl statistics | grep -E "Current Cache Size|Cache Hits"

Reading the example

The answer for intranet.corp.example.net came through wg0, because of its route-only domain ~corp.example.net. Other names use eth0's server. That's split DNS without any special configuration on the DNS servers themselves.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Platform, version and operating-envelope scope

systemd-resolved is the default resolver on Ubuntu and Fedora but optional on Debian and RHEL-family systems; whether /etc/resolv.conf points to the stub (127.0.0.53) depends on distribution and NetworkManager configuration.

How it works at runtime

systemd-resolved is part of DNS → systemd-resolved. systemd-resolved is a Linux name-resolution service that can provide a local stub resolver, caching, LLMNR/mDNS integration and per-link DNS routing domains while receiving DNS configuration from network managers and link setup.

Topic-specific state model. systemd-resolved is a Linux name-resolution service that can provide a local stub resolver, caching, LLMNR/mDNS integration and per-link DNS routing domains while receiving DNS configuration from network managers and link setup.

Technical metadata. Host/VM and network namespace, distribution/kernel/libc/systemd-resolved/network-manager versions, interface/source address, resolver API/NSS order, /etc/resolv.conf ownership, per-link DNS servers/domains, query name/type/RCODE/TTL/view, destination address/protocol/port, route/rule/neighbor, firewall/MTU, socket state, capture interface/filter/time, packet direction/flags/errors and original application result.

Interpretation rule. - systemd-resolved active ≠ DNS resolution correct; per-link server/domain selection may still be wrong.

  • 127.0.0.53 reachable ≠ upstream DNS reachable or returning the intended view.
  • resolvectl query success ≠ every application uses the resolved stub/NSS path.
  • Flushing caches ≠ fixing the source of stale/wrong data; it only removes cached state.

Specialized mechanics

systemd-resolved maintains DNS configuration per link and can route queries based on search/route-only domains, default-route selection and fallback/global settings. It may expose a local stub listener and synthesize /etc/resolv.conf through one of several supported symlink modes. Applications can therefore reach resolved through the glibc NSS path, the stub file or D-Bus APIs depending on system integration. DNS server presence alone does not determine which server receives a given query.

Quick reference

systemd-resolved provides a local stub (127.0.0.53), per-interface DNS servers and routing domains, caching, LLMNR/mDNS, DNSSEC and DNS-over-TLS.

resolvectl status
resolvectl query srv01.corp.example.com
resolvectl dns eth0 10.0.0.53; resolvectl domain eth0 '~corp.example.com'   # route only this domain via eth0
resolvectl flush-caches; resolvectl statistics
# /etc/systemd/resolved.conf
[Resolve]
DNS=10.0.0.53
DNSOverTLS=opportunistic
Cache=yes

~domain (routing-only domain) is the key for VPN split DNS: queries for that domain go to the VPN's DNS, everything else to the default servers.

Limits and how it fails

Primary failure point. systemd-resolved is confirmed when the intended link/domain selects the intended upstream, the stub/cache returns the expected data and the original application consumes that path; active service state alone is insufficient.

ReferenceConfiguration & state2 sections · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. systemd-resolved owns its stub, cache and per-link DNS routing state. NetworkManager/systemd-networkd/netplan own upstream configuration sources; DNS servers own authoritative/recursive behavior.

Specialized lifecycle

Treat per-link DNS and routing domains as first-class policy. NetworkManager or systemd-networkd may be the source feeding resolved, while resolved.conf supplies global/fallback behavior. Preserve the intended /etc/resolv.conf mode rather than replacing the symlink with an unmanaged static file unless ownership is deliberately changed. Split DNS requires correct routing domains; a search domain affects name expansion while a route-only domain controls server selection without search expansion.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in DNS → systemd-resolved. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.freedesktop.org/software/systemd/man/latest/systemd-resolved.service.html · confidence 94%
2026-09-13 · vendor docsystemd-resolved current

Authoritative Linux project/vendor documentation reviewed for bounded reference claims: resolver routing, per-link DNS, stub resolver and resolv.conf modes. Documentation-based technical verification only; not lab or production-runtime proof. The schema vendor_doc method is used for authoritative project/vendor documentation; deployment applicability remains separate evidence.

Basis: https://man7.org/linux/man-pages/man8/systemd-resolved.service.8.html · confidence 93%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
systemd resolvedresolvectl127.0.0.53split dns linux
Embedded reference data

Quick lookup tables

systemd-resolved operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for systemd-resolved.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective statesystemd-resolved is a Linux name-resolution service that can provide a local stub resolver, caching, LLMNR/mDNS integration and per-link DNS routing domains while receiving DNS configuration from network managers and link setup.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin exact host/namespace + original name or endpoint → capture link/address/route/resolver state → reproduce original failure → localize first failed resolver/network boundary → collect bounded packet/socket or DNS evidence → change one demonstrated cause → read back effective state → repeat original application transaction and an adjacent regression check.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainnetwork link config → systemd-resolved per-link/global DNS state → routing-domain selection → cache/stub → upstream server → response → NSS/application consumerTrace requested/configured state through effective state to the observed workload result.
Failure boundarysystemd-resolved is proven when the intended link/domain selects the intended upstream, the stub/cache returns the expected data and the original application consumes that path; active service state alone is insufficient.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux DNS/network evidence can establish this proof path: network link config → systemd-resolved per-link/global DNS state → routing-domain selection → cache/stub → upstream server → response → NSS/application consumerUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove behavior outside the captured host/network namespace, resolver path or DNS view, interface/source, destination/protocol/port, capture point, time or workload scope. systemd-resolved is proven when the intended link/domain selects the intended upstream, the stub/cache returns the expected data and the original application consumes that path; active service state alone is insufficient.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven DNS/network boundary: preserve the original source and failure conditions, capture the adjacent resolver/socket/packet state, change only the demonstrated cause, then repeat the original application lookup or transaction and adjacent regression checks.Continue to the next unresolved boundary while preserving the original test condition.

systemd-resolved · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundarysystemd-resolved
Topic pathDNS → systemd-resolved
Runtime statesystemd-resolved is a Linux name-resolution service that can provide a local stub resolver, caching, LLMNR/mDNS integration and per-link DNS routing domains while receiving DNS configuration from network managers and link setup.
Fast checks- Confirm service/unit state, stub listener and whether /etc/resolv.conf points at the expected resolved-managed file. - Inspect resolvectl status for global/per-link DNS servers, current server, search/routing domains, protocols and default-route decisions. - Query the exact name with resolvectl and direct upstream tools when needed, comparing interface/view and cache effects. - After configuration change, verify per-link state, the original application resolver path and persistence across link renewal/restart.
Verification chainnetwork link config → systemd-resolved per-link/global DNS state → routing-domain selection → cache/stub → upstream server → response → NSS/application consumer Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundarysystemd-resolved is proven when the intended link/domain selects the intended upstream, the stub/cache returns the expected data and the original application consumes that path; active service state alone is insufficient. Boundary chain: unit config/drop-ins → dependency/order/condition → exec/process → readiness/active state → owned socket/file/device → dependent client/workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.

systemd-resolved · specialized operational reference

Topic-specific Linux mechanics, lifecycle, proof path and failure-boundary lookup.

Operational boundaryTopic-specific reference
Inputsper-link DNS + routing/search domains + global/fallback
StubLocal listener and resolv.conf integration mode
Split DNSRoute domain chooses link/server for suffix
ProofExact application-path query reaches intended server and answer
Confirmation

Confirm action

Continue?