π ~1 min read
Table of contents
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'

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

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
Related Errors & Cross-Refs
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.