In Heartbeat, can I configure it so virtual IPs on different interfaces are linked together when it comes to failover? For example with:

foo1 8.8.8.1/24/eth0 10.0.0.1/24/eth1

If eth0 were to fail, and cause foo2 to pick it up, the same would happen for eth1 because eth0 failed. The same would be true for the reverse as well.

link|improve this question

78% accept rate
feedback

1 Answer

up vote 1 down vote accepted

Yes. I have a set of external VIPs "paired" with a set of internal VIPs that have this same requirement. I also have failover working in both directions.

Here's a look at my config and some explanation. I've redacted the public IPs.

server1    10.0.9.1/24/eth0/10.0.9.255
server2    10.0.9.4/24/eth0/10.0.9.255
server1    x.y.z.2/27/eth0/x.y.z.31
server2    x.y.z.25/27/eth0/x.y.z.31

So, there are two internal floating VIPs, 10.0.9.1/24 and 10.0.9.4/24. 10.0.9.1/24 is primary on server1 and 10.0.9.4/24 is primary on server2.

For external VIPs, x.y.z.2/27 is primary on server1 and x.y.z.25/27 is primary on server2.

I just realized this but I am using the eth0 interface for all these IPs without issue. In reality, the x.y.z.0/27 network is physically connecting to eth1. Give it a shot.

EDIT:

See also keepalived/vrrpd and vrrp_sync_groups:

http://www.keepalived.org/LVS-NAT-Keepalived-HOWTO.html

http://www.keepalived.org/pdf/UserGuide.pdf

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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