π ~1 min read
Table of contents
Symptom & Impact
After assigning static IP, host loses connectivity or routes incorrectly. SSH sessions drop and package updates fail.

Environment & Reproduction
Occurs when editing /etc/netplan/*.yaml with wrong indentation, interface name mismatch, or invalid gateway values.

Root Cause Analysis
Netplan YAML syntax or semantic errors prevent renderer from applying intended interface configuration.

Quick Triage
Check interface name using ip link and validate YAML with sudo netplan generate before applying changes.

Step-by-Step Diagnosis
Use sudo netplan try to test config safely and inspect renderer logs via journalctl -u systemd-networkd -n 100.

Solution – Primary Fix
Correct YAML keys and CIDR notation, then run sudo netplan apply. Confirm routes with ip route and DNS with resolvectl status.
Still having issues? Our Network Design team can diagnose and resolve this for you. Get in touch for a free consultation.

Solution – Alternative Approaches
Use DHCP temporarily while troubleshooting, or split routes and DNS into a minimal known-good netplan file.

Verification & Acceptance Criteria
Static IP persists after reboot, default route is correct, and remote SSH remains stable.

Rollback Plan
Restore previous YAML from backup and rerun sudo netplan apply. Revert to DHCP stanza if static config remains unstable.

Prevention & Hardening
Use netplan try before netplan apply on remote systems. Keep backup copies of working YAML files.

Related Errors & Cross-Refs
Common errors include ‘Invalid YAML’ and ‘Gateway4 has been deprecated’. Cross-reference systemd-networkd settings.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading
Netplan official examples, Ubuntu Server networking documentation, and systemd-networkd man pages.

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.