Affected versions: Ubuntu 26.04 LTS

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Applications intermittently fail DNS lookups despite network connectivity.

Environment & Reproduction

Common with mixed VPN, split-DNS, or stale resolver cache behavior.

resolvectl status
cat /etc/resolv.conf
resolvectl query ubuntu.com
ping -c 2 1.1.1.1

Root Cause Analysis

Resolver receives conflicting DNS routes or stale cache causing negative responses.

Quick Triage

Inspect DNS servers per link and cache statistics.

resolvectl dns
resolvectl domain
resolvectl statistics
journalctl -u systemd-resolved -n 100 --no-pager

Step-by-Step Diagnosis

Reproduce query failures against both stub and upstream resolvers.

dig @127.0.0.53 archive.ubuntu.com
dig @1.1.1.1 archive.ubuntu.com
resolvectl query archive.ubuntu.com
Illustrative mockup for ubuntu-26-04-lts β€” terminal_or_shell
Diagnostic output for network/systemd-resolved β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Flush resolver cache, normalize DNS route priorities, and restart resolved service.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

sudo resolvectl flush-caches
sudo systemctl restart systemd-resolved
resolvectl reset-statistics
resolvectl status
Illustrative mockup for ubuntu-26-04-lts β€” log_or_console
Resolution output for network/systemd-resolved β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Set explicit DNS servers in netplan for deterministic resolver behavior.

sudoedit /etc/netplan/01-netcfg.yaml
sudo netplan apply
resolvectl dns

Verification & Acceptance Criteria

Accepted when repeated DNS queries resolve consistently without SERVFAIL bursts.

for i in $(seq 1 10); do resolvectl query security.ubuntu.com >/dev/null || echo fail; done
resolvectl statistics

Rollback Plan

Revert resolver/network config if static DNS settings break dynamic VPN domains.

sudo cp -a /etc/netplan/01-netcfg.yaml.bak /etc/netplan/01-netcfg.yaml
sudo netplan apply

Prevention & Hardening

Document DNS ownership between VPN, netplan, and systemd-resolved to avoid conflicts.

resolvectl status
networkctl status

Related errors include temporary failure in name resolution, SERVFAIL, and stale NXDOMAIN responses.

Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.

View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

systemd-resolved documentation, netplan DNS docs, and Ubuntu networking troubleshooting guides.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β€” we respond within one business day.