📖 ~1 min read
Table of contents
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.

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.

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.
Related Errors & Cross-Refs
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.