since artful
cp -pi /etc/netplan/01-netcfg.yaml /etc/netplan/01-netcfg.yaml.dist vi /etc/netplan/01-netcfg.yaml network: version: 2 renderer: networkd ethernets: eth0: dhcp4: no dhcp6: no bridges: xenbr0: interfaces: - eth0 dhcp4: no dhcp6: no addresses: - x.x.x.x/xx gateway4: x.x.x.x nameservers: search: [nethence.com] addresses: [62.210.16.6, 62.210.16.7] netplan generate netplan apply ping -c1 opendns.com
those should be absent
dpkg -l | grep ifupdown dpkg -l | grep netscript
check
systemctl restart systemd-networkd.service
if you need to setup static routes e.g.,
routes: - to: x.x.x.x/xx via: x.x.x.x
Netplan configuration examples https://netplan.io/examples
Network Configuration with Netplan on Ubuntu https://documentation.online.net/en/dedicated-server/network/network-configuration-with-netplan