📖 ~1 min read
Table of contents
Symptom & Impact
Name lookups randomly fail, breaking package installs, API calls, and internal service discovery.
Environment & Reproduction
Ubuntu 24.04 hosts using systemd-resolved stub resolver with mixed upstream DNS servers.
Root Cause Analysis
Unreliable upstream resolvers and timeout fallback behavior produce intermittent NXDOMAIN or SERVFAIL.
Quick Triage
Check resolver status and current upstream server health from the host perspective.
resolvectl status; ping -c 2 1.1.1.1
Step-by-Step Diagnosis
Test repeated queries, inspect per-link DNS, and review resolved logs for timeout spikes.
for i in {1..10}; do resolvectl query archive.ubuntu.com; done; sudo journalctl -u systemd-resolved --since '2 hours ago'

Solution – Primary Fix
Set stable DNS servers in netplan, apply configuration, and restart resolved for clean state.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudoedit /etc/netplan/01-netcfg.yaml && sudo netplan apply && sudo systemctl restart systemd-resolved

Solution – Alternative Approaches
Deploy local caching resolver or conditional forwarding for split-horizon enterprise domains.
Verification & Acceptance Criteria
Repeated queries succeed with low latency and no resolver timeout bursts in logs.
Rollback Plan
Revert netplan DNS entries and restore previous nameserver set if new servers underperform.
Prevention & Hardening
Monitor resolver latency and automate alerts on sustained SERVFAIL/NXDOMAIN anomalies.
Related Errors & Cross-Refs
Related to network route flaps and VPN DNS leakage conditions.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
systemd-resolved man pages and Ubuntu networking documentation.
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.