How to setup heartbeat for IP fail over on SSH failure
Posted
by
Tony
on Server Fault
See other posts from Server Fault
or by Tony
Published on 2012-07-17T16:27:49Z
Indexed on
2012/09/08
21:40 UTC
Read the original article
Hit count: 363
I wonder if anyone can help me, I am trying to setup heartbeat on a redhat 5 to failover an IP address when ssh stops responding on a server. So basically you ssh to a VIP and then get put through which ever server has the floating ip.
192.168.0.100
|
|
/------------------------\ | /------------------------\
| Server 01 | | | Server 02 |
| eth0 - 192.168.0.1 |-----/ | eth0 - 192.168.0.2 |
| eth0:0 - 192.168.0.100 | | eth0:0 - down |
\------------------------/ \------------------------/
if ssh stops responding i want eth0:0 to be brought up on the second machine to allow ssh connections to carry on being served.
I have tried to follow some documents I have found online so here is my current configuration:
ha.cf
bcast eth0
keepalive 2
warntime 10
deadtime 30
initdead 120
udpport 694
auto_failback off
node vm-bal01
node vm-bal02
debugfile /var/log/ha-debug
logfile /var/log/ha-log
authkeys
auth 1
1 sha1 sshhhsecret1234
haresources
server01 192.168.0.100/24/eth0:0/192.168.0.255
Hope someone can help as this is driving me nuts...
© Server Fault or respective owner