6.3. Local Failover of an IP Address

You can configure a Linux FailSafe system to fail over an IP address to a second interface within the same host. To do this, specify multiple interfaces for resources of IP_address resource type. You can also specify different interfaces for supporting a heterogeneous cluster. For information on specifying IP address resources, see Section 5.5.1.1.

The following example configures local failover of an IP address. It uses the configuration illustrated in Section 6.1.

  1. Define an IP address resource with two interfaces:

    define resource 192.26.50.1 of resource_type IP_address in cluster TEST
              set NetworkMask to 0xffffff00
              set interfaces to eth0,eth1
              set BroadcastAddress to 192.26.50.255
    done

    IP address 192.26.50.1 will be locally failed over from interface eth0 to interface eth1 when there is an eth0 interface failure.

    In nodes N1, N2, and N3, either eth0 or eth1 should configure up automatically, when the node boots up. Both eth0 and eth1 are physically connected to the same subnet 192.26.50. Only one network interface connected to the same network should be configured up in a node.

  2. Modify the /etc/conf/netif.options file to configure the eth0 and eth1 interfaces:

    if1name-eth0 if1addr=192.26.50.10  if2name=eth1 if2addr=192.26.50.11
  3. The etc/init.d/network script should configure the network interface eth1 down in all nodes N1, N2, and N3. Add the following line to the file:

    ifconfig eth1 down