You are here: Home > How-to > Failover
Configuring the failover IP
You may need to configure a failover IP address on your instances, for one of the following reasons:
However failover IPs will not be automatically configured on your instance.
This guide explains how to configure your instance's network interface so that a failover IP can be allocated to it.
- * you have a large number of websites on your instance
- * you host international projects
However failover IPs will not be automatically configured on your instance.
This guide explains how to configure your instance's network interface so that a failover IP can be allocated to it.
.
Configuring the interface
vi /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address should-be-your-main-ip
netmask 255.255.255.255
post-up /sbin/ip route add 158.69.192.1 dev eth0
post-up /sbin/ip route add default via 158.69.192.1
pre-down /sbin/ip route del default via 158.69.192.1
pre-down /sbin/ip route del 158.69.192.1 dev eth0
dns-nameserver 213.186.33.99
dns-search vps.ovh.ca
auto eth0:0
iface eth0:0 inet static
address your-failover-ip
netmask 255.255.255.255
post-up /sbin/ifconfig eth0:0 your-failover-ip netmask 255.255.255.255 broadcast your-failover-ip
pre-down /sbin/ifconfig eth0:0 down
If you have many IPs to allocate, they must be added on the same line:
by increasing the value of Y (the alias number)
.
- Restart the network services with the command:
- Restart the network services with the command:
service networking restart