Enabling ip failover, Configuring ip failover – Apple Mac OS X Server (Administrator’s Guide) User Manual
Page 569
![background image](/manuals/44541/569/background.png)
Tools for Advanced Users
569
Enabling IP Failover
You enable IP failover by adding command lines to the file /etc/hostconfig on the primary
and the secondary server. Be sure to enter these lines exactly as shown with regard to spaces
and punctuation marks.
To enable IP failover:
1
At the primary server, add the following line to /etc/hostconfig:
FAILOVER_BCAST_IPS=”10.0.0.255 100.0.255.255”
Substitute the broadcast addresses used on your server for the public and private networks.
This tells the server to send broadcast messages over relevant network interfaces that the
server at those IP addresses is functioning.
2
Restart the primary server so that your changes can take effect.
3
At the secondary server, add the following lines to /etc/hostconfig:
FAILOVER_PEER_IP=”10.0.0.1”
FAILOVER_PEER_IP_PAIRS=”en0:100.0.0.10”
FAILOVER_EMAIL_RECIPIENT=”[email protected]”
In the first line substitute the IP address of the primary server on the private network.
In the second line enter the local network interface that should adopt the primary server’s
public IP address, a colon, then the primary server’s public IP address.
(Optional) In the third line, enter the email address for notification messages regarding the
primary server status. If this line is omitted, email notifications are sent to the root account
on the local machine.
4
Restart the secondary server so that your changes can take effect.
Configuring IP Failover
You configure failover behavior using scripts. The scripts must be executable (for example,
shell scripts, Perl, compiled C code, or executable AppleScripts). You place these scripts in a
directory named “IPFailover” in the Library directory of the secondary server. Check the
IPFailover directory for sample scripts.
You need to create a directory named with the public IP address of the primary server to
contain the failover scripts for that server. For example:
/Library/IPFailover/100.0.0.10
Important
Always be sure that the primary server is up and functioning normally before
you activate IP failover on the secondary server. If the primary server is not sending
broadcast messages, the secondary server will initiate the failover process and acquire the
primary’s public IP address.