📖 ~1 min read
Table of contents
Symptom & Impact
Interfaces fail to come up, causing loss of SSH and outbound connectivity.
Environment & Reproduction
Common after editing /etc/netplan files.
lsb_release -a
ip a
sudo netplan apply
Root Cause Analysis
YAML indentation mistakes, wrong interface names, or renderer mismatch break configuration.
Quick Triage
Generate and inspect current netplan interpretation.
sudo netplan --debug generate
networkctl status
ls /etc/netplan
Step-by-Step Diagnosis
Validate interface names and YAML schema.
ip -br link
sudo netplan get
sudo python3 -c 'import yaml,glob; [yaml.safe_load(open(f)) for f in glob.glob("/etc/netplan/*.yaml")]'

Solution – Primary Fix
Correct YAML and reapply safely.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo cp -a /etc/netplan /var/tmp/netplan.bak.$(date +%s)
sudoedit /etc/netplan/01-netcfg.yaml
sudo netplan generate
sudo netplan apply

Solution – Alternative Approaches
Use interactive rollback mode to avoid lockout.
sudo netplan try
# confirm within timeout if network works
Verification & Acceptance Criteria
Interface has expected address and routes.
ip -4 a
ip r
ping -c 3 1.1.1.1
Rollback Plan
Restore last known working netplan files.
sudo rm -f /etc/netplan/*.yaml
sudo cp -a /var/tmp/netplan.bak.*/netplan/* /etc/netplan/
sudo netplan apply
Prevention & Hardening
Keep one config per interface and validate before apply.
sudo netplan generate
sudo netplan try
git -C /etc/netplan init 2>/dev/null || true
Related Errors & Cross-Refs
Often appears with cloud-init overriding local network settings.
Related tutorial: View the step-by-step tutorial for Ubuntu 24.04 LTS.
View all Ubuntu 24.04 LTS tutorials on the Tutorials Hub →
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
Ubuntu netplan and systemd-networkd reference guides.
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.