I am running an Ubuntu Server on my VMBox and need to set static IP. By following the steps described in https://www.techrepublic.com/article/how-to-configure-a-static-ip-address-in-ubuntu-server-18-04/, I created the configuration file 01-netcfg.yaml as follows.
network: version: 2 renderer: networkd ethernets: enp0s3: dhcp4: no addresses: [10.10.21.8/24] gateway4: 10.10.21.100 nameservers: addresses: [220.127.116.11, 18.104.22.168]
sudo netplan apply --debugresults in:
Which I'm not sure if the process is succesful or not since it mentions a merged config but gives no error at the end. However, I can not connect to Internet.
sudo ping www.facebook.com returns "Temporary failure in name resolution".
ping 22.214.171.124 results in "Destination Host Unreachable".
sudo apt-get update fails as well.
sudo lshw -C network:
After trying the answer.
ls -al /etc/resolv.conf
ls -al /etc/netplan
sudo netplan generate --debug
sudo netplan apply