π ~1 min read
Table of contents
Symptom & Impact
After editing netplan YAML, Ubuntu 22.04 loses connectivity and remote administration becomes unavailable.
Environment & Reproduction
Ubuntu 22.04 LTS cloud or bare-metal node using systemd-networkd; reproduce with malformed YAML in /etc/netplan/*.yaml and sudo netplan apply.
Root Cause Analysis
Incorrect indentation, wrong interface names, or invalid renderer settings cause netplan generation failures and broken interface state.
Quick Triage
Use sudo netplan try for safe validation, run ip a and networkctl status, and confirm current default route with ip route.
Step-by-Step Diagnosis
Run sudo netplan generate, inspect parser output, compare NIC names from ip link, and review journalctl -u systemd-networkd for errors.

Solution – Primary Fix
Correct YAML syntax and interface mapping, apply with sudo netplan apply, then restart networkd if needed using sudo systemctl restart systemd-networkd.
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
Use NetworkManager renderer where appropriate, store known-good templates, or manage configs through cloud-init network-config.
Verification & Acceptance Criteria
Interfaces are UP, DNS works, default route is present, and SSH sessions stay stable after reboot.
Rollback Plan
Restore previous netplan YAML from backup, reapply configuration, and reboot in maintenance window if renderer state remains inconsistent.
Prevention & Hardening
Enforce YAML lint checks in automation, use netplan try during remote changes, and document interface naming conventions.
Related Errors & Cross-Refs
Similar Ubuntu 22.04 cases include cloud-init overwriting netplan and DNS failures with misconfigured systemd-resolved.
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
man netplan, Ubuntu netplan examples, systemd-networkd documentation, and cloud-init network reference.
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.