A failover setup has a few basic requirements: nearly identical hardware and software for the master and backup servers, multiple common network interfaces (Ethernet or FireWire), and the ability to connect to common networks and common storage. Initial failover configuration requires several steps:
1 Configure the primary Ethernet interface of each server to connect to the primary network. Each server should have its own IP address and be connected to the same subnet.
2 Configure Domain Name System (DNS) for the interfaces. A DNS administrator should also:
P Map the IP address of the master server to a virtual DNS name (for example, store.example.com) that users use to connect to your server. This allows you to change the IP address of the master server transparently to users.
– Map the IP addresses of the master and backup servers to DNS names (for example, master.example.com and secondary.example.com) that you can use to refer to the two computers when setting up IP failover.
3 Directly connect the master and backup computers together using a second Ethernet interface or IP over FireWire. This is an important step because the two computers communicate failover events over this connection. In addition, the administrator should do the following:
– Configure the TCP/IP settings of the secondary Ethernet interface or IP over FireWire interface on both computers.
– Assign each computer a private network IP address, separate from the primary interface. For example, use 10.1.0.2 and 10.1.0.3, while the primary interfaces are configured with 192.168.200.2 and 192.168.200.3.P Make sure the secondary connections are on the same subnet.
4 Configure the master server following these four steps:
P Add or edit the FAILOVER_BCAST_IPS entry in /etc/hostconfig to specify the addresses to send heartbeat messages to.
– It’s most efficient to send the heartbeat messages to specific addresses, rather than a broadcast address. For example, if the primary IP address of the master server is 220.127.116.11 and the secondary IP address is 10.1.0.2, add the following line to the /etc/ hostconfig file: FAILOVER_BCAST_IPS=”10.1.0.3 18.104.22.168” This line instructs the master server to send the heartbeat messages to the primary and secondary IP addresses of the backup server.
NOTE P To edit the /etc/hostconfig file, you must be root. Use the sudo command when opening this file using your preferred command-line editor.
– Add or edit the FAILOVER_EMAIL_RECIPIENT entry to specify the mail address to send notifications to. If you don’t add this entry, mail notifications go to root, which typically routes to no one.
– Restart the server.