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

Hosts intermittently fail to resolve names, causing package, API, and service disruptions.

Environment & Reproduction

Observed with mixed VPN and local DNS settings or unstable upstream resolvers.

resolvectl query archive.ubuntu.com
getent hosts archive.ubuntu.com

Root Cause Analysis

Resolver upstream instability or split-DNS misconfiguration leads to query timeouts.

Quick Triage

Check resolver status, link-specific DNS, and recent timeout logs.

systemctl status systemd-resolved
resolvectl status
journalctl -u systemd-resolved -n 80 --no-pager

Step-by-Step Diagnosis

Compare per-link DNS routing and identify problematic nameserver paths.

resolvectl dns
resolvectl domain
resolvectl statistics
ss -ulpn | grep ':53'
Illustrative mockup for ubuntu-26-04-lts β€” resolved_dns_fail
systemd-resolved DNS timeout diagnostics β€” Illustrative mockup β€” Progressive Robot

Solution – Primary Fix

Set reliable DNS servers and restart resolver to clear stale state.

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

sudo mkdir -p /etc/systemd/resolved.conf.d
sudo tee /etc/systemd/resolved.conf.d/10-dns.conf >/dev/null <<'EOF'
[Resolve]
DNS=1.1.1.1 8.8.8.8
FallbackDNS=9.9.9.9
EOF
sudo systemctl restart systemd-resolved
Illustrative mockup for ubuntu-26-04-lts β€” resolved_dns_fixed
Stable DNS resolution after resolver tuning β€” Illustrative mockup β€” Progressive Robot

Solution – Alternative Approaches

Configure DNS per interface in netplan for deterministic routing.

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

Verification & Acceptance Criteria

Repeated DNS queries succeed and resolver error counters stabilize.

for i in $(seq 1 5); do resolvectl query ubuntu.com; done
resolvectl statistics

Rollback Plan

Remove resolver override drop-in and restart service.

sudo rm -f /etc/systemd/resolved.conf.d/10-dns.conf
sudo systemctl restart systemd-resolved

Prevention & Hardening

Standardize DNS policy and monitor query failures across fleet nodes.

journalctl -u systemd-resolved --since '1 day ago' --no-pager | grep -i -E 'timeout|failure' || true

Can overlap with DHCP option conflicts and VPN split-routing misconfiguration.

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 and Ubuntu DNS troubleshooting references.

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.