π ~1 min read
Table of contents
Symptom & Impact
Package operations fail with DNS errors, and other outbound services may also lose connectivity.
Environment & Reproduction
Ubuntu 20.04 hosts using systemd-resolved with transient network changes or invalid DNS upstreams.
Root Cause Analysis
Resolver configuration points to unreachable nameservers or local stub resolution is unhealthy.
Quick Triage
Validate default route, resolver status, and direct DNS queries against expected nameservers.
Step-by-Step Diagnosis
Inspect `resolvectl status`, test UDP/TCP port 53 reachability, and isolate DNS from routing issues.

Solution – Primary Fix
Set reliable nameservers via Netplan or resolved config, apply changes, and restart resolver components.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use local caching DNS, fallback public resolvers, or provider DNS endpoints with health checks.
Verification & Acceptance Criteria
Name lookups succeed consistently and `apt update` runs without temporary resolution failures.
Rollback Plan
Revert DNS settings to last known good configuration if application behavior regresses.
Prevention & Hardening
Monitor DNS latency/failures and define redundant resolvers in network configuration standards.
Related Errors & Cross-Refs
`Could not resolve`, `Name or service not known`, and intermittent package mirror timeout events.
Related tutorial: View the step-by-step tutorial for Ubuntu 20.04 LTS.
View all Ubuntu 20.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu networking and systemd-resolved guidance for production DNS resilience.
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.