Mailing List Archive

heartbeat and takeover of real ip addresses?
On Fri, Jun 16, 2000 at 07:48:28PM +0530, catls wrote:
> 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.?

I think it would be reasonable to enable the IPAddr resource for heartbeat
to fuction on interfaces that have not yet be brought up, though
it is really only plausible to do this if the machines involved
have an alternate method of communicating with each other such
as a NULL modem or second ethernet interface.

Alan what are your thoughts on this?

--
Horms
heartbeat and takeover of real ip addresses? [ In reply to ]
Horms wrote:
>
> On Fri, Jun 16, 2000 at 07:48:28PM +0530, catls wrote:
> > 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.?
>
> I think it would be reasonable to enable the IPAddr resource for heartbeat
> to fuction on interfaces that have not yet be brought up, though
> it is really only plausible to do this if the machines involved
> have an alternate method of communicating with each other such
> as a NULL modem or second ethernet interface.
>
> Alan what are your thoughts on this?

I think the main problem is that someone needs to tell it which
interfaces to use, and how to use them. Right now it infers the
interface, and netmask from other things that are already set up. You
would have to tell it explicitly these things. It also assumes that the
net (not host) route is already set up for it.

It does have provisions to let you specify the interface, netmask, etc
in its arguments. I don't know of any reason why that couldn't be coded
up and have it work correctly. I'd entertain a patch that did that.

-- Alan Robertson
alanr@suse.com