I am an Ubuntu beginner. I have an Ubuntu 22.04 server, and I want to just set a static LAN IP on it. At the moment, I have the below configuration with a public IP (grayed out) and the static IP.
If I try to set the static IP in the file, I get the below error.
What is the best way forward and what is the best way to set an IP that persists? I have heard that the config file is the old way of doing it, but then I heard that is the recommended way.
Please let me know if anything is missing. Essentially my goal is to be left with the static private IP that will persist during reboots.
IP list:
Image may be NSFW.
Clik here to view.
IP configuration:
Image may be NSFW.
Clik here to view.
network: version: 2 renderer: networkd ethernets: ens33: dhcp4: no addresses: - 10.1.0.15/15 gateway4: 10.0.0.111 nameservers: addresses: - 10.0.0.2 - 10.0.0.19
IP error: