Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


# The loopback network interface
auto lo
iface lo inet loopback

# eth0: ip of this node
auto eth0
allow-hotplug eth0
iface eth0 inet static
# eth0:0: ip address which heartbeat is supposed to take over
iface eth0:0 inet static


mx1 IPaddr::
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 in post-up & post-down of eth0:0, but that seems rather ugly....

share|improve this question
up vote 2 down vote accepted

Is this an actual typo in your config?


Should be

share|improve this answer
OMFG... Pfft.... I probably moved things around to much with getting it to work I totally missed this... Fixing now, and if this was the problem all along, you have the right to call me an idiot for a full year... – Wrikken Oct 26 '11 at 12:15
Don't worry, mistakes like that do happen all the time. That's why it's good to have an extra eye pair looking at the config files :) – Janne Pikkarainen Oct 26 '11 at 12:17
Even after knowing there was an error here, I had to read it twice to find it :) – Chris N Oct 26 '11 at 12:19
@Chris N: I spotted that because the vertical alignment of text was wrong. The words address, network, netmask and gateway in /etc/network/interfaces all contain seven characters, so the gateaway line being unaligned immediately got my attention. :-) Yes I know, I probably have seen that file too many times in my life. – Janne Pikkarainen Oct 26 '11 at 12:22
Yup, extra eyes help a lot ;). Confirmed this was the one & only problem, thanks! – Wrikken Oct 26 '11 at 12:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.