FAQ / How can I fail over more than one interface/address per service.

To add further VIPs to an existing interface, or to add additional interfaces to a service (say for example when you want to direct traffic down specific networks), a per service addition is made to the cluster configuration file. These entries take the form:

setenv ADDITIONAL_IP_1 “IP-Address/hostname Interface

Any number of additional IP’s can be added by simply incrementing the trailing digit (note that processing stops once a break in the sequence is detected, so ADDITIONAL_IP_1 followed by ADDITIONL_IP_3 will result in just the first IP address declared being plumbed in).

The scope of the entry can be service or server specific, thus allowing different physical interfaces on cluster nodes to be declared in the configuration. For example:

###############################################################################
# Service ha-test1 declaration.
###############################################################################

SERVICE ha-test1 192.168.33.213 “ha-test1 ZFS service”
OPTION “sdir=appliance ip_up_after=1 ip_down_before=1 zfs_export_fail_reboot=n zfs_mhdc_disable=n”
INITIMEOUT 20
RUNTIMEOUT 8
MOUNT_POINT “/volumes/ha-test1″
SETENV ADDITIONAL_IP_1 “10.0.0.3 iprb0″
SERVER nextest1
IPDEVICE “e1000g0″
SETENV ADDITIONAL_IP_2 “192.168.2.3 iprb0″
SETENV ADDITIONAL_IP_3 “192.168.89.3 iprb0″
SERVER nextest2
IPDEVICE “bge0″
SETENV ADDITIONAL_IP_2 “192.168.2.3 bge0″
SETENV ADDITIONAL_IP_3 “192.168.89.3 bge0″

###############################################################################
# End of section.
###############################################################################

This configuration file specifies the additional address 10.0.0.3 to be plumbed in on iprb0 on both machines, whereas 192.168.2.3 and 192.168.89.3 are associated with iprb0 when the service is running on the node nextest1 and with bge0 when the service is running on nextest2. In this example, when the service is running on nextest1 the resulting interface configuration is:

e1000g0: flags=1000843 mtu 1500 index 2
inet 192.168.33.221 netmask ffffff00 broadcast 192.168.33.255
ether 0:12:3f:2e:52:e0
e1000g0:1: flags=1000843 mtu 1500 index 2
inet 192.168.33.213 netmask ffffff00 broadcast 192.168.33.255
iprb0: flags=1000843 mtu 1500 index 3
inet 192.168.40.12 netmask ffffff00 broadcast 192.168.40.255
ether 0:8:c7:ea:ff:eb
iprb0:1: flags=1000843 mtu 1500 index 3
inet 10.0.0.3 netmask ff000000 broadcast 10.255.255.255
iprb0:2: flags=1000843 mtu 1500 index 3
inet 192.168.2.3 netmask ffffff00 broadcast 192.168.2.255
iprb0:3: flags=1000843 mtu 1500 index 3
inet 192.168.89.3 netmask ffffff00 broadcast 192.168.89.255

Posted in: Networking