📖 ~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

Commands fail with Temporary failure resolving hostnames. Package operations, API calls, and service startup checks depending on DNS all fail.

Environment & Reproduction

Common on Ubuntu 16.04 VMs after network reconfiguration, broken DHCP, or overwritten /etc/resolv.conf. Reproduce by setting invalid nameserver entries.

Root Cause Analysis

The resolver chain is broken: bad nameserver, unreachable DNS, or conflicts between resolvconf, NetworkManager, and static interface settings.

Quick Triage

Run ping -c1 8.8.8.8 to test raw connectivity, then ping -c1 archive.ubuntu.com for DNS. Check /etc/resolv.conf and systemd-resolved status where present.

Step-by-Step Diagnosis

Inspect interface state via ip a and ip r, then review /etc/network/interfaces and NetworkManager control flags. Use dig or nslookup against explicit DNS servers.

Illustrative mockup for ubuntu-16-04-lts — ubuntu1604-b01-p05-diagnosis
DNS lookup failures in apt and ping — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Set valid nameservers in resolvconf or network config, restart networking/NetworkManager, and confirm /etc/resolv.conf points to working resolvers. Retry apt update.

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-16-04-lts — ubuntu1604-b01-p05-fix
resolv.conf corrected and DNS restored — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Configure local caching DNS (dnsmasq/unbound), enforce DHCP option 6, or hard-code resilient upstream resolvers for isolated networks.

Verification & Acceptance Criteria

Hostnames resolve consistently with dig and apt update completes. Service dependencies that call external endpoints recover without name resolution errors.

Rollback Plan

Restore previous network and resolver config files, then restart networking stack. Revert to known-good DHCP profile if static settings fail.

Prevention & Hardening

Monitor DNS latency and failure rates, template resolver settings, and validate DNS after every interface change in automation.

Can appear with proxy misconfiguration, MTU issues, or firewall DNS blocks on UDP/TCP 53.

Related tutorial: View the step-by-step tutorial for Ubuntu 16.04 LTS.

View all Ubuntu 16.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

resolv.conf(5), resolvconf(8), NetworkManager docs for Ubuntu 16.04, and internal DNS operations guide.

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.