I am running an Ubuntu 18.04 server in Hyper-V on Windows 2012 R2. I am familiar with assigning static IPs in Mint 18.3 via the GUI tools, but not using only the CLI. I tried creating a 99_config.yaml file in the netplan directory that contains the following:
If I try to include lines for renderer or nameservers, I would get error messages when I ran the netplan apply command. The above does work and sets the IP address. The problem is that it doesn't always work automatically when I reboot and uses DHCP for an address. This messes up my client PCs using the MySQL server on my Ubuntu server.
What should I be doing to fix this? Thank you.
Code:
network:
version: 2
ethernets:
eth0:
dhcp4: false
dhcp6: false
addresses: [192.168.20.20/24]
gateway4: 192.168.20.1
What should I be doing to fix this? Thank you.