Sharing IP addresses

I want to have two systems, one standing by as a “warm” backup to the
primary. When the primary fails, the backup will take over, and will need to
assume the IP address of the primary.

My approach is for both the primary and the backup to have two NICs. On each
machine one NIC will have a unique IP address, and will be used for the
backup to watch the primary. The second NICs will have the same IP address
on each machine; initially only the primary will set this NIC to be active.
When the primary fails, the backup will activate the second NIC, which will
begin to use the IP address initially used on the primary. This way all
devices talking to the second IP address will not know that the primary has
gone away, and the backup has taken over.

Does this sound linke it will work? Is there something like this that
Neutrino specifically supports that would be easier? My understanding is
that Windows clustering works this way, and that is essentially what I am
trying to emulate.

Thanks,

Kevin

This sounds like a good approach. Keep in mind that existing TCP/IP
(as apposed to UDP) connections will have to be re-established. As
an alternative, you could use QNET as the channel that the master and
slave communicate over, avoiding the need for a 2nd NIC in each
machine.

There are problems concerning UDP packets (and also TCP stream setup).
When a
computer FIRST attempts to send a message to another computer, it sends
out an
arp request (‘WHO-HAS’) message with a IP address which the relevant
computer
answers with an arp reply (‘IS-AT’) containing the MAC address. The
ethernet
driver uses that mac address. If you change physical cards, you change
the mac address regardless of the tcp/ip address. Point-to-point UDP
messages
will be sent to the old mac address UNLESS you tell the world the old ip
address
is associated with a new MAC address.

Kevin Miller wrote:

I want to have two systems, one standing by as a “warm” backup to the
primary. When the primary fails, the backup will take over, and will need to
assume the IP address of the primary.

My approach is for both the primary and the backup to have two NICs. On each
machine one NIC will have a unique IP address, and will be used for the
backup to watch the primary. The second NICs will have the same IP address
on each machine; initially only the primary will set this NIC to be active.
When the primary fails, the backup will activate the second NIC, which will
begin to use the IP address initially used on the primary. This way all
devices talking to the second IP address will not know that the primary has
gone away, and the backup has taken over.

Does this sound linke it will work? Is there something like this that
Neutrino specifically supports that would be easier? My understanding is
that Windows clustering works this way, and that is essentially what I am
trying to emulate.

Thanks,

Kevin
\

On 2006-09-13 11:06:36 +1000, “Kevin Miller” <kevin.miller@transcore.com> said:

I want to have two systems, one standing by as a “warm” backup to the
primary. When the primary fails, the backup will take over, and will
need to assume the IP address of the primary.

My approach is for both the primary and the backup to have two NICs. On
each machine one NIC will have a unique IP address, and will be used
for the backup to watch the primary. The second NICs will have the same
IP address on each machine; initially only the primary will set this
NIC to be active. When the primary fails, the backup will activate the
second NIC, which will begin to use the IP address initially used on
the primary. This way all devices talking to the second IP address will
not know that the primary has gone away, and the backup has taken over.

Does this sound linke it will work? Is there something like this that
Neutrino specifically supports that would be easier? My understanding
is that Windows clustering works this way, and that is essentially what
I am trying to emulate.

This approach will not work (on its own) as your clients will have have
an entry in their ARP cache which maps the IP address to the MAC
address of the primary machine. Until the ARP cache times out (or the
clients re-boot), they will still send all their packets to the old MAC
address.

You can address this by transmitting a broadcast ARP update when your
backup takes over. This is fairly straightforward but does require the
ability to send raw packets out the wire.

Have a look at the source to the Linux utility send_arp, you also need
the QNX raw packet interface nfm-nraw.so.

Rob Rutherford
Ruzz Technology