Making Mac OS X Ipfailover Work Correctly

IP failover is a wonderful technology. The Mac OS X implementation does have a major problem. When the fallen host comes back online, it will find a duplicate ip address and disables it’s network interface. So bringing the failed host back online requires you to bring down the failover host and thus making you service unavailable. There is a way to avoid this problem.

Create a StartupItem with one line:

ifconfig en0 1.2.3.4

This will force your host online, ignoring the fact that there is another host online with the same ip address. After this the failover host “sees” the host coming online and will release the ip address.

Usualy AFP refuses to start automatically after booting so I start it manually with the same script:

/usr/sbin/serveradmin start afp

An example StartupItem can be found here.