Affected versions: 20.04

πŸ“– ~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

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.

Illustrative mockup for ubuntu-20-04-lts β€” dns-failure-triage
hostname resolution failures affecting apt β€” Illustrative mockup β€” Progressive Robot

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.

Illustrative mockup for ubuntu-20-04-lts β€” dns-failure-fixed
resolver restored and repositories reachable β€” Illustrative mockup β€” Progressive Robot

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.

`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.