Search


print PDF Ireland

IP fail-over


A full description of possibilities of this option is available here:

http://www.ovh.ie/items/ip_failover.xml

Requirements:


Here is the tools list that you must prepare to correctly use this function:

  • 2 nsxxx.ovh.net servers,
  • an Ip fail-over,
  • a domain and the possibility to manage the DNS of this one,
  • a reverse for the Ip failover, if you do not want to use the one by default available in the manager.

In the examples shown below, we will use the A server as the main one and the B server, which will be used to receive the Ip fail-over.

The examples have been tested on the RedHat? 7.2 Release 1 OVH servers.

Warning: this is a set up example. In real time, do not forget that the Ip fail-over must not be on the two servers at the same time. In fact, the network interface must not be added in advance on the server, which will take the relay when breakdown if it is not configured as backup MX server due to the local processing of emails. It may generate problems.

Activation


In the manager, click on A server, then Services, and Ip failover''
Activate your Ip by using Add Ip address. Follow the instructions and validate your selection.

Once finished, an email will be sent containing the fail-over address and the link to the manual for its installation on the servers.

Installation


Follow the instructions of this manual: http://help.ovh.ie/IpAlias

Important: Install the Ip address on the two servers to be able to test the rocking before declaring a domain name on the Ip address. Thus you can be sure that at the critical moment this option will be really operational.

Now we have the Ip address configured on the two servers:

  • A server to which the failover Ip address is routed. You can test it by making a SSH connection on the Ip Address. Then, you must get connected on your A server.
  • B server, which is only configured but not accessible via the Ip fail over.

Rocking test


In the manager, A server, then Services, and Ip failover, then Move the Ip fail-over. Choose your Ip fail-over and change the routing to the B server. Once again, you will receive an email, which will confirm the routing of your Ip failover to the B server. A simple SSH connection on the Ip failover and you must get connected on the B server. The option is thus operational in case of emergency. Now we must re-rout the Ip to the A server, in the manager, but this time B server, then Services, and Ip failover, then on Move the Ip fail-over.

New Domain


Configure DNS


With the reverse by default attributed by OVH:

For a new domain, which must be created, you must use the Reverse of your Ip failover as primary DNS and sdns1.ovh.net as secondary DNS. When domain creation, you must then select choose customised DNS. Indicate the names servers as follows:

primary: IP_FAIL_OVER_OF.ovh.net
secondary: sdns1.ovh.net

You find the reverse of your Ip fail-over in the A server section, then Services, and IP fail-over.

With a customised reverse:

It is possible to set a reverse on your Ip fail-over.
You must create a field: A IN IP.DE.FAIL.OVER on an already existing domain , declare this one in Hosts management in the DNS section of your manager and then add it in the Ip fail-over section as REVERSE. Once propagated, indicate the names servers as the following:

  • primary: yourhost.yourdomain.co.uk
  • secondary: sdns1.ovh.net

In the two cases, you must then go to the manager, click on A server then Services and secondary DNS. Add the domain without WWW and select the Ip fail-over as primary. Then wait at least for 12h to 24h that the DNS are correctly propagated before making any modification.

Installation on dedicated


Add the domain on the A server via Ovhm by clicking on Add a domain. Select the failover in the IP field. Choose the additional options according to your needs and validate all by clicking on Create. Go back to the index and click on Restart all services to take the modifications into account. It is ready. You can install your site as usual.

Do the same on the B server.

Important: Keep in mind that each modification in the DNS zone carried out on the A server must be switched on the B server. In case of oversight, the sub-domains, such as forum.yourdomain.com may not work when rocking.

The difference between backup server, which takes the relay in case of breakdown and server rocking to another one must also be taken in consideration.

In case of backup server functionality:

In all cases, you must synchronize regularly the web datas and SQL between A server and B server. The most important are the emails. As the B server must only store emails and relay them later to the A server not to loose them.

In case of server/offer rocking functionality::

During a rocking, you must first synchronize the web datas and SQL between A server and B server. You must create all the mail accounts present on A server to B server, in order the mails to be correctly sent after the rocking.

Rocking


We have two dedicated servers, which have similar configuration according to the above specifications. They have the same web data, SQL and zone files.
Now you must rock the Ip fail-over of A server to B server as the rocking test.
During the writing of this manual, all the manipulations have been made in real time to check all the steps. The domain rocking of A server on B server took less than 2 minutes.

Existing Domain


As your domain is already installed on the A server with the main Ip address, you must proceed as the following:

  • Reconfigure the DNS on the A server
  • Change the VirtualHost? on the A server
  • Add the domain with the Ip fail-over on the B server
  • Change the primary DNS
  • Update the information of the secondary DNS


DNS Modification of A server


You must edit the zone file of the domain:

via SSH:

nano /var/named/domaine.com.hosts


First, the SOA field, which is like 2007022101. The serial is the date of your modification with the 01, for the first modification of the day. If you modify several times a day, you must increase the last two numbers in the incremental way (02,03,04, and so on...)
Then IN NS: ns.yourserver.ovh.net becomes Ip_fail_over.ovh.net and all the Ips have to be replaced by the Ip fail-over. Make sure you keep the points at the end of lines of some fields.
The most important is that you replace the IN NS ns.ovh.net to sdns1.ovh.net because during the recreation of secondary DNS in the manager, your domain will be present on the new secondary server, which is sdns1.ovh.net. Save and restart bind.

/etc/init.d/named restart


via webmin:

Servers section, then Domain Name Server BIND, and on the MASTER icon above the domain, then on "Modify the records file".
First, the SOA field, which is like 2007022101. The serial is the date of your modification with the 01 corresponding to the first modification of the day. If you modify several times a day, you must increase the last two numbers in the incremental way (02,03,04, ...)
Then IN NS: ns.your-server.ovh.net becomes Ip-fail-over.ovh.net and all the Ips are replaced by the Ip fail-over. Make sure to keep the points at the end of lines of some fields.
The most important is that you replace the IN NS ns.ovh.net to sdns1.ovh.net because during the recreation of secondary DNS in the manager, your domain will be present on the new secondary server, which is sdns1.ovh.net. Then save and apply changes.

VirtualHost on A server


via SSH:

nano /httpd.conf


In the VirtualHost of your domain, replace the Ip address by the Ip fail-over and save
Restart your web server

/etc/init.d/httpd restart


via webmin:

Server section, then Server Web Apache, and on the WWW icon of VirtualServer? having your domain name. In the Virtual Server Details replace the Ip address by the Ip fail-over, save and click on the top on the Apply Changes index.

B server Domain


Add the domain on the B server via Ovhm by clicking on Add domain
Select in the "Ip" field, the Ip fail-over. Select the additional options according to your needs and validate all changes by clicking on create. Then click on return to index and on reboot all services (to accept all changes).

Primary and Secondary DNS


First, you must go to the manager, click on A server then Services and Secondary DNS.
Delete your domain of the Secondary DNS and add it immediately by selecting this Ip fail-over Address as primary one.

Then go to the Domain & DNS section then DNS servers and replace the current DNS by:
  • primary: Ip-fail-over.ovh.net
  • secondary: sdns1.ovh.net

After 12h to 24h later, the DNS must be correctly propagated. Before rocking, we test the DNS.

DNS test


Before rocking the Ip fail-over and to risk an inaccessibility, first you must test the configuration. Use your shell command in your webmin or get connected in SSH on one of your servers.

Test the zones with the command: dig your-domain.co.uk @your-server.ovh.net

Here is an example:


A SERVER:

1:08 melost@InTheShell ~% dig guidesovh.co.uk @ns38936.ovh.net
<<>> DiG 9.2.4 <<>> guidesovh.co.uk @ns38936.ovh.net
guidesovh.co.uk. IN A
ANSWER SECTION:
guidesovh.co.uk. 86400 IN A 91.121.63.5
AUTHORITY SECTION:
guidesovh.co.uk. 86400 IN NS sdns1.ovh.net.
guidesovh.co.uk. 86400 IN NS 91-121-63-5.ovh.net.
ADDITIONAL SECTION:
sdns1.ovh.net. 170542 IN A 213.251.188.140
91-121-63-5.ovh.net. 84144 IN A 91.121.63.5



B SERVER:

1:08 melost@InTheShell ~% dig guidesovh.co.uk @ghost.ovh.net
<<>> DiG 9.2.4 <<>> guidesovh.co.uk @ghost.ovh.net

guidesovh.co.uk. IN A
ANSWER SECTION:
guidesovh.co.uk. 86400 IN A 91.121.63.5
AUTHORITY SECTION:
guidesovh.co.uk. 86400 IN NS 91-121-63-5.ovh.net.
guidesovh.co.uk. 86400 IN NS sdns1.ovh.net.
ADDITIONAL SECTION:
sdns1.ovh.net. 165503 IN A 213.251.188.140
91-121-63-5.ovh.net. 165503 IN A 91.121.63.5


A _dig @sdns1.ovh.net_ must return you the reverse of your Ip fail-over.

Rocking


Normally everything is ready for the rocking of your Ip fail-over of a server to the other one. If you are not sure that it is working correctly, you may request our customer support to check it for you. They will let you know if everything is ok or if you have to change some parameters.

Then


The writing of some manuals is in progress to give you an easier use.

  • a manual about the synchronization of the datas between 2 servers
  • a manual about the configuration of a backup mx for the emails
  • a section will be added in this manual to solve all the problems generated by ZoneCheck?