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

Hosts can ping IP addresses but domain resolution fails. apt update and outbound service calls fail with name resolution errors.

Environment & Reproduction

Ubuntu 22.04 using systemd-resolved and either netplan DHCP DNS or static resolver settings. Reproduce with invalid DNS server entries.

Root Cause Analysis

Broken upstream DNS, wrong netplan DNS config, or overridden /etc/resolv.conf symlink can disconnect libc resolver from systemd-resolved.

Quick Triage

Run resolvectl status, dig ubuntu.com @1.1.1.1, and verify /etc/resolv.conf points to stub-resolv.conf when expected.

Step-by-Step Diagnosis

Inspect resolver logs with journalctl -u systemd-resolved -b, check interface DNS assignment via resolvectl dns, and verify netplan DNS blocks.

Illustrative mockup for ubuntu-22-04-lts — ubuntu2204-common-problem-04-dns-01.webp
DNS lookups fail despite active network links. — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Set valid nameservers in netplan YAML or DHCP scope, apply changes with sudo netplan apply, then restart resolver: sudo systemctl restart systemd-resolved.

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-22-04-lts — ubuntu2204-common-problem-04-dns-02.webp
systemd-resolved status reveals upstream resolver issues. — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Temporarily set fallback DNS in /etc/systemd/resolved.conf and run sudo systemctl restart systemd-resolved.

Verification & Acceptance Criteria

dig and resolvectl query return expected results, apt update succeeds, and service endpoints resolve reliably.

Rollback Plan

Revert netplan or resolved.conf edits from backup and restart networking components.

Prevention & Hardening

Define redundant resolvers, monitor DNS latency, and enforce resolver configuration through automation.

Temporary failure resolving, Name or service not known, systemd-resolved degraded.

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

View all Ubuntu 22.04 LTS tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

systemd-resolved docs, Ubuntu DNS troubleshooting guide, man resolvectl.

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.