Flexible IP Addresses on Bare Metal Cloud Servers

Flexible IPs for Bare Metal servers- Overview

Flexible IP addresses are additional IP addresses, available for Bare Metal Cloud Servers. They allow you to move an IP from one server to another without changing your whole configuration. Flexible IPs can also be used as additional IP addresses to create virtual machines on your Bare Metal Cloud Server.

This documentation provides information on the following topics:

Note: This documentation concerns Flexible IPs for Bare Metal Cloud Servers. Flexible IPs for Virtual Instances have different functionalities and are not managed in the same way: please see the relevant documentation.

Requirements

Ordering a Flexible IP

1 . Click on Bare Metal in the Compute section of the console’s side-menu.

2 . The list of your Bare Metal servers displays. Click on the Flexible IP tab on top of the page to enter the flexible IP section of the console for Bare Metal servers:

3 . If you don’t already have any existing flexible IPs, click on + Order a flexible IP. Otherwise, click on the green + sign to order an additional flexible IP.

4 . The order dialog displays. Optionally you can enter a description and tags to facilitate the management of your flexible IPs. Tags allow you to filter IP addresses from the Scaleway console. Once done, confirm the order by clicking on Order a flexible IP.

5 . The flexible IP will be added to the list of your Bare Metal flexible IPs:

Allocating a Flexible IP to a Bare Metal Server

Once you have ordered a flexible IP, you can configure it to be allocated to one of your Bare Metal Servers. For each of your servers, you can order up to 64 flexible IPs.

The console provides a drag and drop view to facilitate the allocation of your flexible IPs.

1 . Drag and drop the flexible IP from the Flexible IP panel to your server in the Bare Metal Servers panel:

Drag&Drop

2 . Click Validate to complete the allocation.

Note: If you are using virtual MAC groups, all flexible IPs sharing the same MAC address will be moved from one server to another.

Configuring a Flexible IP

A flexible IP needs to be configured on the Bare Metal Cloud Server to make it reachable.
The configuration depends on the Operating System running on the machine.

Configuring a Flexible IP on Ubuntu

On the latest LTS release of Ubuntu (Version 18.04 Bionic Beaver) you can configure the Flexible IP using Netplan. If you prefer a more traditional configuration, refer to the Debian section of the documentation.

1 . Edit the file /etc/netplan/01-netcfg.yaml and configure static networking for your server.

2 . IP 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: 2
  renderer: networkd
  ethernets:
    enp1s0f0:
      addresses: [163.172.123.123/24, 212.83.123.123/32]
      gateway4: 163.172.123.1
      nameservers:
        addresses: [ "62.210.16.6", "62.210.16.7" ]

Note: The interface name for your primary interface may be different than enp1s0f0. You can use the ip link show command to determine the name of your public Internet interface.

3 . Save the configuration file once edited as required and quit the text editor. Then apply the configuration using the following command:

sudo netplan apply

Configuring a Flexible IP on Debian

1 . Open the file /etc/network/interfaces in your favorite text editor.

2 . 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 interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
  	 address 195.154.123.123
  	 netmask 255.255.255.0
  	 gateway 195.154.123.1
auto eth0:0
iface eth0:0 inet static
     address ip_flexible
     netmask 255.255.255.255

Note: The 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.

3 . Save the file and quit the editor.

4 . Bring the interface up using the ifup command:

ifup eth0:0

Configuring a Flexible IP on CentOS

1 . Copy the default network configuration file to create an alias:

cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0

2 . Open the file /etc/sysconfig/network-scripts/ifcfg-eth0:0 in your favourite text editor and modify it as in the following example:

DEVICE="eth0:0"
BOOTPROTO=static
IPADDR="my_flexible_ip"
NETMASK="255.255.255.255"
ONBOOT=yes

3 . Save the file, exit the text editor and run the following command to reload the network configuration:

/etc/init.d/network restart

Changing the Assigned Server

You can update the destination host of a flexible IP from the Scaleway Console.

1 . Navigate to the Flexible IPs tab in the Bare Metal section of the console.

2 . Click on next to the flexible IP that you want to move to another Bare Metal Cloud Server.

3 . The configuration menu of the flexible IP displays. Click on More Info to see detailed information about the IP address.

4 . The IP information page displays. Click on Manage assignment to update the destination of the flexible IP:

5 . Choose the new destination host from the drop down list and click on Validate to update the configuration:

Configuring the Reverse DNS

Reverse DNS, or rDNS, is exactly the opposite of classic forward DNS as we know it. Forward DNS maps a hostname to an IP address. Reverse DNS means we are mapping the IP address to a hostname. This can be very useful, especially if you want to send emails from your Bare Metal Cloud Server.

1 . Click on next to the flexible IP that you want configure.

2 . The configuration menu of the flexible IP displays. Click on More Info to see detailed information about the IP address.

3 . Scroll down to the Reverse section and click on Add Reverse:

4 . Enter the new reverse DNS and click on Edit this reverse to validate the changes.

Note: Make sure that a corresponding A-Record pointing to the IP address exists before editing the reverse DNS of an IP address.

Adding a Virtual MAC Address

Virtual MAC addresses are virtual interface identifiers and are required for virtualization. If you run multiple virtual machines on a physical Bare Metal Cloud Server, you can configure the MAC address of its virtual network interface to the virtual MAC associated with the flexible IP to ensure network connectivity of the virtual machine.

Note: Virtual MAC addresses are only required for virtualization purposes. If you want to configure the flexible IP as a second interface on the host OS, no virtual MAC is required.

1 . Click on next to the flexible IP that you want configure.

2 . The configuration menu of the flexible IP displays. Click on More Info to see detailed information about the IP address.

3 . Scroll down to the Mac address section and click on Add Reverse:

4 . Choose the desired type of the virtual MAC address. You can choose from VMware, XEN or KVM. It is recommended to choose the type corresponding to your virtualization technology. Confirm by clicking on Generate MAC Address.

If the virtual MAC address is no longer needed, you can remove it from the flexible IP by clicking on the Delete button.

For more information how to configure the flexible IP on a virtual machine, refer to our documentation

Creating Virtual MAC Groups

If you want to assign multiple flexible IPs to one virtual machine, you can create virtual MAC groups. A virtual MAC group contains at least two flexible IPs that share the same virtual MAC address.

Once the virtual MAC group is active, the IPs sharing the same MAC address are linked together. Moving one IP of the group will automatically move all IPs within the group from one Bare Metal Cloud Server to another.

Note: You need to have at least two flexible IPs in your account to create a virtual MAC group.

1 . Make sure that at least one flexible IP is assigned to one of your servers.

2 . Drag and drop the second flexible IP from the Failover IPs section to your Bare Metal Cloud Server.

3 . Click on > Generate Mac, then select Copy from another flexible IP from the drop-down list:

4 . Choose the IP to copy the MAC address from in the list of available IPs and click Generate MAC Address to confirm:

5 . The virtual MAC group is being created. Once ready, the status indicator becomes green.

The IPs are now linked together in a virtual MAC group and share the same virtual MAC address. They can be assigned to the same virtual machine to provide a multi-IP environment. When moving one of the IPs of the group to another server, all other IPs within the group are automatically moved to the same server.

To remove a flexible IP from a virtual MAC group, click on > Generate MAC and generate a new MAC address as described in the Adding a Virtual MAC Address section.

Discover the Cloud That Makes Sense