From 445ad523061b27b999d053a981b52acdb9722380 Mon Sep 17 00:00:00 2001 From: Christopher Berger Date: Sat, 30 May 2026 04:19:17 +0000 Subject: [PATCH] Add netplan.md --- netplan.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 netplan.md diff --git a/netplan.md b/netplan.md new file mode 100644 index 0000000..d92c416 --- /dev/null +++ b/netplan.md @@ -0,0 +1,32 @@ +# **Netplan for Ubuntu VMs** +## Change DHCP to Static IP +### Edit /etc/netplan/50-cloud-init.yaml (change to match your netplan .yaml file) + +``` +network: + version: 2 + ethernets: + enp6s18: # replace with your interface name + dhcp4: false + addresses: + - x.x.x.x/24 # your desired static IP + routes: + - to: default + via: x.x.x.x # your gateway + nameservers: + addresses: + - 1.1.1.1 # DNS — your gateway or preferred resolver + - 8.8.8.8 +``` + +--- + +## Test and Apply changes + +**Test if config takes** + +```netplan try``` + +**Apply config** + +```netplan apply```