How to configure OVH network on Ubuntu 20.04 Proxmox VM

As of Ubuntu 17.x, Canonical has implemented the use of Netplan for easy-to-use network configuration.

To configure the network interface, open the 01-netcfg.yaml file using the following command:

sudo vim /etc/netplan/01-netcfg.yaml

Edit the file to make it appear as follows:

# This file describes the network interfaces available on your system

# For more information, see netplan(5).

network:
  version: 2
  renderer: networkd
  ethernets:
          ens160:
                  dhcp4: no
                  dhcp6: no
                  addresses: [x.x.x.x/32]
                  gateway4: y.y.y.254
                  nameservers:
                          addresses: [208.67.222.222,208.67.220.220]
                  routes:
                  - to: y.y.y.254/32
                    via: 0.0.0.0
                    scope: link

In this file, replace the following pieces of information as instructed:

If you replace the VMXNET3 NIC with another one, your NIC may use a different naming convention. If it does, replace "ens160" in the file with the name of your interface. If you don't know the name of your interface, you can find it using the following command:

ip addr list

Next to "addresses", replace "x.x.x.x/32" with the Failover IP to which you have added the vMAC in the OVH US Manager plus the subnet you wish to use in CIDR notation.

Next to "gateway4", replace the "y.y.y." with the first three octets of your Dedicated Server's IP address with a final octet of "254". For instance, if your Dedicated Server IP was 1.2.3.4, you would use 1.2.3.254 as your gateway.

The DNS name server addresses listed are from OpenDNS. Feel free to use other name servers here, if you choose.

In the "routes" section, the y's correspond with your gateway IP address. Fill in these octets accordingly.

Now apply the Netplan settings with the following command:

sudo netplan apply

To test that the VM is fully connected to the Internet, ping example.com. If you get a response, you are good to go. If you do not, restart your VM and attempt the ping again.

Source: https://askubuntu.com/questions/1062406/ubuntu-18-04-server-vps-on-failover-ip-ovh