You are here: Home / Debian GNU/Linux / System / OVH / Setup the OVH failover IP solution on Debian

Setup the OVH failover IP solution on Debian

by Pierre-Yves Landuré last modified Mar 02, 2018 08:35

OVH, a dedicated hosting company, offer the possibility to associate many public IP addresses to one server. It is useful to setup many HTTPS web sites with various SSL certificates on a same server. The failover IP is also designed to ease the management of server downtime.

Prerequisites

Obtain a failover IP address :

  1. Login to the manager OVH.
  2. Select the server.
  3. Go to "Dedicated servers -> Services -> IP Failover".
  4. Click on add a IP address.

Parameters

Provide the failover IP given to you:

FAILOVER_IP="92.131.53.135"

Provide the network interface linked to the failover IP:

NET_DEV="eth0"

Server configuration

Compute the number of the network interface alias to assign to the failover IP :

ALIAS_NUMBER=$(command grep -e "iface[ \t]*${NET_DEV}:" '/etc/network/interfaces' \
| command wc --lines)

Create a network interface alias for the failover IP :

command echo "auto ${NET_DEV}:${ALIAS_NUMBER}
iface ${NET_DEV}:${ALIAS_NUMBER} inet static
  address ${FAILOVER_IP}
  netmask 255.255.255.255
  broadcast ${FAILOVER_IP}
" >> '/etc/network/interfaces'

Enable the alias interface :

command ifup ${NET_DEV}:${ALIAS_NUMBER}

The failover IP address should now reply to ping requests.

Usage with Xen domains

To link thisPour lier cette IP à un domaine Xen, je vous propose de suivre mes guides: