Heartbeat 删除默认网关

Heartbeat 删除默认网关

我正在设置 2 个邮件服务器 (Postfix),并带有心跳故障转移和 drbd 共享邮件目录。出于某种原因,在启动心跳时,默认网关丢失。您知道这种情况发生的原因和解决方法是什么吗?

/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

故障转移工作正常,但似乎一旦心跳启动,默认网关就会丢失(因此,在启动后/尚未接管任何东西后也是如此)。到目前为止,我唯一能想到的就是添加一个route add default gw 192.168.2.46in post-up& post-downof eth0:0,但这似乎相当丑陋......

答案1

这是你的配置中真正的拼写错误吗?

    gateaway 192.168.2.46

应该

    gateway 192.168.2.46

相关内容