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

Host has network connectivity by IP but domain names fail to resolve.

Environment & Reproduction

Ubuntu 18.04 with netplan and systemd-resolved; ping 8.8.8.8 works while ping archive.ubuntu.com fails.

Root Cause Analysis

Incorrect netplan DNS config, broken /etc/resolv.conf symlink, or failing systemd-resolved service.

Quick Triage

Run systemctl status systemd-resolved and resolvectl status (or systemd-resolve –status on 18.04).

Step-by-Step Diagnosis

Inspect /etc/netplan/*.yaml, validate YAML syntax, and verify /etc/resolv.conf points to /run/systemd/resolve/stub-resolv.conf.

Illustrative mockup for ubuntu-18-04-lts — ubuntu1804-dns-systemd-resolved-diagnose.webp
Checking DNS resolver path on Ubuntu 18.04 — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Set correct nameservers in netplan, apply with sudo netplan apply, restart systemd-resolved, and recreate resolv.conf symlink if needed.

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-18-04-lts — ubuntu1804-dns-systemd-resolved-fix.webp
Repairing netplan and systemd-resolved DNS settings — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Configure static resolv.conf temporarily for emergency access or use upstream DNS directly in netplan for each interface.

Verification & Acceptance Criteria

dig and apt update resolve domains successfully, and resolver service remains active after reboot.

Rollback Plan

Restore previous netplan YAML from backup and re-apply configuration.

Prevention & Hardening

Manage DNS via version-controlled netplan files and validate with netplan try before applying in production.

Temporary failure in name resolution, Could not resolve host, and failed DNS lookups in journalctl.

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

View all Ubuntu 18.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

man netplan, man systemd-resolved, 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.