You can configure a unique gateway for your virtual machines, allowing them to move between hypervisors without changing their network configuration.
- IP address of the unique gateway:
62.210.0.1
When you install your server with a virtualization solution like VMware vSphere Hypervisor (ESXi) or Proxmox you can create multiple virtual machines on the physical server.
This can be used to have separate environments to divide between your different services (for example, keeping mail and web services on different VMs) or to launch several virtual machines to make better use of the performance of the server.
To communicate on the Internet, each of your virtual machines needs an IP address. You can use failover IP’s to have additional IP addresses available for your server.
You can configure a unique gateway for your virtual machines, allowing them to move between hypervisors without changing their network configuration.
62.210.0.1
To complete the actions presented below, you must have:
Find below examples of network interface configurations on different distributions inside a virtual machine:
Since the release of version 18.04 (Bionic Beaver) Ubuntu has switched to Netplan for the configuration of network interfaces. For older releases of the distribution, refer to the configuration for Debian.
/etc/netplan/01-netcfg.yaml
in a text editor of your choice, for example nano
:
sudo nano /etc/netplan/01-netcfg.yaml
fail.over.ip.address
with your failover IP address:
network:version: 2renderer: networkdethernets:eth0:dhcp4: nodhcp6: noaddresses: [fail.over.ip.address/32]gateway4: 62.210.0.1nameservers:addresses: [ "51.159.47.28", "51.159.47.26" ] # Replace the IP of the DNS cache server with the one located in the same physical location as your machine for optimal performances (https://www.scaleway.com/en/docs/console/account/reference-content/scaleway-network-information/#dns-cache-servers)routes:- to: 62.210.0.1/32via: fail.over.ip.addressscope: link
sudo netplan apply
Log into the virtual machine and edit the file /etc/network/interfaces/
with a text editor of your choice, for example, nano
:
nano /etc/network/interfaces
Configure the network interface as follows. Remember to replace fail.over.ip.address
with your failover IP address:
auto eth0iface eth0 inet staticaddress fail.over.ip.addressnetmask 255.255.255.255pointopoint 62.210.0.1gateway 62.210.0.1
Save the file and exit the text editor.
Set the DNS server information by editing the file /etc/resolv.conf
:
nano /etc/resolv.conf
Set the DNS resolver by adding the following lines to the file. Then save it and exit the text editor:
nameserver 51.159.47.28nameserver 51.159.47.26
The DNS resolvers above are operated by Scaleway. You can also set your preferred alternative DNS resolvers in the file.
Activate the network on your virtual machine by running the following code:
ifup eth0
Log into the virtual machine and edit the file /etc/sysconfig/network-scripts/ifcfg-eth0
with a text editor of your choice, for example, nano
:
nano /etc/sysconfig/network-scripts/ifcfg-eth0
Configure the network interface as follows. Remember to replace fail.over.ip.address
with your failover IP address and virtual:mac:address
with the virtual MAC of the VM:
DEVICE=eth0BOOTPROTO=noneONBOOT=yesUSERCTL=noIPV6INIT=noPEERDNS=yesTYPE=EthernetNETMASK=255.255.255.255IPADDR=fail.over.ip.addressGATEWAY=62.210.0.1DNS1=51.159.47.28DNS2=51.159.47.26ARP=yesHWADDR=virtual:mac:address
Save the file and close the text editor.
Edit the file /etc/sysconfig/network-scripts/route-eth0
as follows, then save and exit the text editor:
62.210.0.1 dev eth0default via 62.210.0.1 dev eth0
Run the following command to bring the network interface up:
ifup eth0
255.255.255.255
62.210.0.1
51.159.47.28
51.159.47.26