Specifications

Chapter 14 Configuring and Managing Network Services 249
3 Disconnect the primary server from the public and private networks.
4 On 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="admin@example.com"
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
servers public IP address, then a colon, and then the primary server’s public IP address.
In the third line, enter the mail address for notification messages regarding the primary
server status. If this line is omitted, mail notifications are sent to the root account on
the local computer.
5 Restart the secondary server so your changes can take effect and allow the secondary
server to acquire the primarys public IP address.
Important: Before you enable IP failover, verify on both servers that the port used for
the public network is at the top of the Network Port Configurations list in the Network
pane of System Preferences. Also verify that the port used for the private network
contains no DNS configuration information.
6 Reconnect the primary server to the private network, wait 15 seconds, and then
reconnect the primary server to the public network.
7 Verify that the secondary server relinquishes the primary servers public IP address.
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 /Library/IPFailover/<IP_address> on the secondary server.
You must create a folder 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).
Notification Only
You can use a script named Test located in the failover scripts folder to control
whether, in the event of a failover condition, the secondary server acquires the primary
servers IP address, or only sends a mail notification.
If no script exists, or if the script returns a zero result, the secondary server acquires the
primary’s IP address.
If the script returns a nonzero result, the secondary server skips IP address acquisition
and only sends a mail notification of the failover condition.