A common configuration is that of a high-availability server which simply provides two IP addresses (22.214.171.124, and 126.96.36.199) to be failed over between the nodes of our cluster. We will set this up as an active/active configuration.
logfacility daemon # Log to syslog as facility "daemon" node paul silas # List our cluster members keepalive 1 # Send one heartbeat each second deadtime 10 # Declare nodes dead after 10 seconds bcast eth0 eth1 # Broadcast heartbeats on eth0 and eth1 interfaces ping 188.8.131.52 # Ping our router to monitor ethernet connectivity auto_failback yes # Try and keep resources on their "preferred" hosts respawn hacluster /usr/lib/heartbeat/ipfail # Failover on network failures
paul 184.108.40.206 silas 220.127.116.11
The first word (paul or silas) on the line represents the "preferred" host for the service. The remainder of the line is the list of resources (services) which are part of this ResourceGroup. In this case, each ResourceGroup consists of only one resource -- an IP address. 18.104.22.168 is a shorthand notation for IPaddr::22.214.171.124, and 126.96.36.199 is a similar shorthand for IPaddr::188.8.131.52.
Because auto_failback was enabled, when paul joins the cluster it will regain the 184.108.40.206 address. Similarly, when silas joins the cluster, it will regain its (220.127.116.11) service address. If an active/passive configuration is desired, then simply change auto_failback to no.
auth 1 1 sha1 PutYourSuperSecretKeyHere