All,
I am looking to setup a simple IP failover setup, but it seems every place i look has some difficult setup like pacemaker or LVS.
I only want to handle the IP piece to failover a VIP.
Any suggestions? I checked out keepalived and that my work for me.
on solaris i use IPMP... don't know on which OS you are...
Duke, I am going to be using RHEL 5.4
I want to have a VIP and 1 interface on each server.
If the interface on 1 goes down the second server will take over the VIP
mph
June 21, 2010, 2:03pm
4
I'm not sure if this will work under Linux. I know Cisco routers will do it. Your default route should look something like this.
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 xxx.xxx.xxx.xxx 0.0.0.0 UG 5 0 0 eth0
Just put the same route in with the secondary NIC as the gateway with a higher metric.
For example a default with failover would look something like this.
route add default gw xxx.xxx.xxx.xxx dev eth1 metric 100
You'll end up with something like this,
route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 xxx.xxx.xxx.xxx 0.0.0.0 UG 5 0 0 eth0
0.0.0.0 xxx.xxx.xxx.xxx 0.0.0.0 UG 100 0 0 eth1
The route with the higher metric should only kick in if the lower metric is unavailable.
Hope it helps.
I think a simple mechanism is alright if you perform manual failovers. If you require automated failover imo usually you need some kind of cluster set up to avoid the possibility that two servers serve the same IP address at the same time. (An effective failover usually is easy to set up nowadays if you use virtual machines in clusters with shared storage...)