Follow this guide to set a static IP on your Ubuntu Server, ensuring reliable networking for your HomeLab.
sudo cp /etc/netplan/00-installer-config.yaml /etc/netplan/00-installer-config.yaml.bk
sudo nano /etc/netplan/00-installer-config.yaml
network:
ethernets:
ens160:
dhcp4: no
addresses: [10.10.10.5/24]
gateway4: 10.10.10.1
nameservers:
addresses: [8.8.8.8, 8.8.4.4]
version: 2
Save your changes and exit the text editor.
sudo netplan apply
ip a show ens160