Last updated 8th April 2020
Objective
IP aliasing is a special network configuration for your OVHcloud servers, which allows you to associate multiple IP addresses with a single network interface.
This guide explains how to add failover IP addresses to your network configuration.
OVHcloud is providing you with services for which you are responsible, with regard to their configuration and management. You are therefore responsible for ensuring they function correctly.
This guide is designed to assist you in common tasks as much as possible. Nevertheless, we recommend contacting a specialised provider and/or the software publisher for the service if you encounter any difficulties. We will not be able to assist you ourselves. You can find more information in the “Go further” section of this guide.
Requirements
- a Virtual Private Server in your OVHcloud account
- a failover IP address or a failover IP block (RIPE)
- administrative access (root) via SSH or remote desktop (Windows) to your server
Instructions
The following sections contain the configurations for the most commonly used distributions/operating systems.
Concerning current distributions, please note that the proper procedure to configure your network interface may be subject to change. We recommend to consult the manuals and knowledge resources of the respective OS versions if you experience any issues.
Debian 9
Step 1: Disable automatic network configuration
First, open the following file, as shown below:
# nano /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
Next, edit the file with the configuration shown below. This will prevent changes from being made to your network configuration automatically.
network: {config: disabled}
Step 2: Edit the network configuration file
Next, open the network configuration file for editing with the following command:
# nano /etc/network/interfaces.d/50-cloud-init.cfg
Then edit the file with the following configuration:
Note that the names of the network interfaces in our examples may differ from your own. Please adjust to your appropriate interface names.
auto ens3
iface ens3 inet dhcp
auto ens3:0
iface ens3:0 inet static
address FailoverIP 0
netmask 255.255.255.255
auto ens3:1
iface ens3:1 inet static
address FailoverIP 1
netmask 255.255.255.255
Ubuntu 18.04
Each failover IP address will need its own line within this file. The configuration file for your failover IP addresses should be called "50-cloud-init.yaml".
Step 1: Create the configuration file
Connect to your server via SSH and run the following command:
# nano /etc/netplan/50-cloud-init.yaml
Next, edit the file with the content below:
network:
version: 2
ethernets:
your_network_interface:
dhcp4: true
match:
macaddress: fa:xx:xx:xx:xx:63
set-name: your_network_interface
addresses:
- your_failover_ip/32
Finally, save and close the file.
Then apply config:
# netplan apply
# netplan try
Repeat this procedure for each failover IP address.
CentOS and Fedora (25 and earlier)
Step 1: Create the source file
First, make a copy of the source file so that you can use it as a template:
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
Step 2: Edit the source file
You can now modify the eth0:0 file in order to replace the IP:
editor /etc/sysconfig/network-scripts/ifcfg-eth0:0
First, replace the name of the device
, then replace the existing IP with the failover IP you have received:
DEVICE="eth0:0"
ONBOOT="yes"
BOOTPROTO="none" # For CentOS use "static"
IPADDR="IP_FAILOVER"
NETMASK="255.255.255.255"
BROADCAST="IP_FAILOVER"
Step 3: Restart the interface
You now need to restart your interface:
ifup eth0:0
Windows Server 2012/2016
Step 1: Check the main IP configuration
First of all we need to recover the information of the main IP address:
Step 2: Change the IPv4 Properties
Now we must change the IP properties from 'automatically configuration' to a 'static' configuration manually:
Now we can define the IP information obtained previously:
Step 3: Add the failover IP in the 'Advanced configuration' section
Here we must to define the failover IP information and the correspond netmask (normally the netmask is -> 255.255.255.255)
Step 4: Rebooting the network interface
First we do the disabling process
Then we do the enabling process
Step 5: Checking the new network configuration
Using the console and the ipconfig command we can check the new network configuration
cPanel (on CentOS 6)
Step 1: Create the source file
First, make a copy of the source file, so that you can revert at any time:
cp /etc/ips /etc/ips.bak
Step 2: Edit the source file
You then need to edit the /etc/ips file:
editor /etc/ips
Then add the failover IP to the file:
IP_FAILOVER:255.255.255.255:IP_FAILOVER
Next, add the IP in /etc/ipaddrpool:
IP_FAILOVER
Step 3: Restart the interface
You now need to restart your interface:
/etc/init.d/ipaliases restart
Plesk Onyx 17.x
Step 1: Access to the 'IP Addresses' management inside the control panel:
Access to the Tools & Settings
>IP Addresses
section:
Step 2: Add the additional IP information:
Click on the Add IP Address
button:
Then put the additional IP information in the form and press OK
Step 3: Check the current IP configuration inside Plesk panel:
Troubleshooting
If you are unable to establish a connection from the public network to your alias IP and suspect a network problem, please reboot the server in Rescue Mode and setup the alias directly on the server.
In order to do that, once you have rebooted your server in Rescue Mode, please enter the following command:
ifconfig ens3:0 FAILOVER_IP netmask 255.255.255.255 broadcast FAILOVER_IP up
Replace FAILOVER_IP with the actual IPFO.
Next, simply ping your IPFO from the outside. If it works, it probably means that there is a configuration error that requires to be fixed. If, on the contrary, the IP is still not working, please inform our support team by creating a support request in your OVHcloud Control Panel for further investigations.
Go further
Join our community of users on https://community.ovh.com/en/.