Mailing List Archive

heartbeat and takeover of real ip addresses?
Hi,
This is my setup.I have two machines connected to the net each with 2
NIC's.When one goes down the other must take over.I have one real
purchased ip address and one domain name.One nic on each machine is
connected to my internal network.The other nic on each machine is
connected to my router to the net.I use only serial heartbeat for
dead/alive status.

When the main server dies i want the backup to take over my real purchased
ip address.This heartbeat does if and only if this address is aliased to
say eth0:0!:(.Now lets say i alias my only real purchased ip address to
eth0:0.I still have to set eth0 to 192/10/something not visble on the net.
However when i try to browse my real ip address(the one that is aliased
will not be used and eth0 address is used and rightly so!)Which means that
my packets dont get past the router which drops anything with 192 or 10
etc..

All this means that i will have to buy 2 more ip-addresses?Or is there
another way.?
At the moment i use a nasty kludge of my own invention.

When heartbeat starts up,it first runs IPAddr script that sets up my
interfaces with all internal ip's,it then runs a httpd or userdefined
script to start daemons.I have installed my own script which runs and
alters the ip setup to what i want(simple ifconfig commands)

When heartbeat on main server collapses it first runs the daemon script to
terminate and then runs ipaddr release.So what my script does is when it
gets a script stop it reinstalls the old setup that heartbeat set up.Then
ipaddr runs and release all the interfaces and exits gracefully.
If i didnt reinstate the original heartbeat setup takeover does not occur
because heartbeat wouldnt know what ip addresses to release

Wouldnt it be nice to have ipaddr simply run a script on start up and
another on shutdown without checking for what interfaces to release and
what not.?