You can find information about the DNS resolver to use in each datacenter at the network reference documentation.
How to configure a flexible IP on an Elastic Metal server
Learn how to configure a flexible IP address on your Elastic Metal server. The configuration depends on the Linux distribution running on your machine. You can configure your flexible IP on machines running one of Ubuntu Linux, Debian Linux or CentOS.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An SSH key
- An installed Elastic Metal server
- A flexible IP address attached to your Elastic Metal server
How to configure a flexible IP on Ubuntu Linux
Since the LTS release of Ubuntu Version 18.04 (Bionic Beaver) the recommended way to configure a flexible IP is by using Netplan. If you prefer a more traditional configuration, refer to the instructions for flexible IP configuration on Debian.
-
Log into your server using SSH with a user having super-user rights.
-
Open the file
/etc/netplan/01-netcfg.yaml
with superuser rights in your favorite text editor and configure the networking for your machine.NoteIP addresses in the configuration file have to be specified in CIDR notation. The netmask is
/24
for the principal IP of the server and/32
for each flexible IP.Your configuration file should look like the following example:
network:version: 2renderer: networkdethernets:enp1s0f0:addresses: [163.172.123.123/24, 212.83.123.123/32]gateway4: 163.172.123.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)TipThe interface name for your primary interface may be different from
enp1s0f0
. You can use theip link show
command to determine the name of your public internet interface. -
Once the file is edited as required, save it and quit the text editor. Then apply the configuration using the following command:
sudo netplan apply
Your server now responds on both the primary IP address and the flexible IP address.
How to configure a flexible IP on Debian Linux
-
Log into your server using SSH with a user having super-user rights.
-
Open the file
/etc/network/interfaces
with superuser rights in your favorite text editor and configure the networking for your machine. -
Edit the file and add the flexible IP as shown in the following example:
# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).# The loopback network interfaceauto loiface lo inet loopback# The primary network interfaceauto eth0iface eth0 inet staticaddress 195.154.123.123netmask 255.255.255.0gateway 195.154.123.1auto eth0:0iface eth0:0 inet staticaddress ip_flexiblenetmask 255.255.255.255NoteThe interface name of your server might be different depending on the hardware of the server. You can use the
ip link show
command to determine the name of your public internet interface. -
Save the file and quit the editor.
-
Bring the interface up using the
ifup
command:ifup eth0:0
Your server now responds on both the primary IP address and the flexible IP address.
How to configure a flexible IP on CentOS
- Log into your server using SSH using the
root
user. - Copy the default network configuration file to create an alias:
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
- Open the file
/etc/sysconfig/network-scripts/ifcfg-eth0:0
in your favorite text editor and modify it as in the following example:DEVICE="eth0:0"BOOTPROTO=staticIPADDR="my_flexible_ip"NETMASK="255.255.255.255"ONBOOT=yes - Save the file, exit the text editor and run the following command to reload the network configuration:
/etc/init.d/network restart
Your server now responds on both the primary IP address and the flexible IP address.
How to configure a flexible IP in a virtual machine (VM)
When you install your Elastic Metal server with a virtualization solution like VMware vSphere Hypervisor (ESXi) or Proxmox you can create multiple virtual machines on the physical server.
To communicate on the Internet, each of your virtual machines needs an IP address. You can use flexible IPs to have additional IP addresses available for your virtual machines.
Configure the networking of your VM’s as follows:
- IP address: Your flexible IP
- Netmask:
255.255.255.255
- Gateway:
62.210.0.1
- DNS resolver:
51.159.47.28
and51.159.47.26
- The gateway of all flexible IPs is
62.210.0.1
. This allows you to move your VMs between your hypervisors without changing the network configuration of the virtual machine. - When configuring a failover IP in a virtual machine, you must specify which route will be used by the VM. Refer to our dedicated documentation for further information.