I'm setting up 2 mailservers (Postfix) with heartbeat failover & drbd shared maildirs. For some reason, when starting the heartbeat, the default gateway is lost. Any idea how / why this happens and what the solution is?
/etc/network/interfaces
:
# The loopback network interface
auto lo
iface lo inet loopback
# eth0: ip of this node
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.168.2.3
gateaway 192.168.2.46
netmask 255.255.255.0
# eth0:0: ip address which heartbeat is supposed to take over
iface eth0:0 inet static
address 192.168.2.5
netmask 255.255.255.0
/etc/ha.d/haresources
:
mx1 IPaddr::192.168.2.5
mx1 drbddisk::r0 Filesystem::/dev/drbd0::/syncdata::ext3 nfs-kernel-server
Failover works fine, but a the default gateway is lost as soon as heartbeat starts it seems (so, also after booting / not yet taking anything over). So far, the only thing I can think of is adding a route add default gw 192.168.2.46
in post-up
& post-down
of eth0:0
, but that seems rather ugly....
Is this an actual typo in your config?
Should be