Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-26-2008, 03:29 AM   #1
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Rep: Reputation: 39
Question Whats the best way to switch IP Addresses between servers in a redundant architecture

Hi All,

I've been working on a simple method to switch IP Addresses between two servers, and before i get to far again i thought i'd go and check what other people thought.

One method i've used before is to:
machine A
machine B
Main IP address of service

Make the IP an alias address that moves between the two servers when required for failover. Restart any running services on the other box so that the new ip is realized.

Second method i've also tried before:
machine A
machine B
Main IP address of service
and then getting the IP to move between machines by re-writing the network config files on the server that set the ip address settings for an interface...and then making the server stop and start the interface so that the new network config settings are used and the server is using not an aliased ip but a real one.

Obviously using an Alias has its advantages is there any service that could run into problems using an ip alias such as samba or ldap etc etc...or is IP Alias done on a different layer and therefore the service like ldap and samba itself is un-ware of it using an alias and not having any problems using that method?

Old 08-26-2008, 10:20 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 256Reputation: 256Reputation: 256
Are you simply just trying to achieve a failover between these two servers? You should probably just look into using a round-robin approach within DNS. What you've outlined probably isn't an ideal way of switching between servers to sort of load balance them.

If you're just looking for a quick way to switch a server when one fails manually though, the above would work. Just write yourself a script to bring up the new IP from the server that goes down, using an alias is probably the easiest approach between the two.

Last edited by trickykid; 08-26-2008 at 10:21 AM.
Old 08-26-2008, 01:14 PM   #3
Registered: Aug 2006
Location: England Somewhere
Distribution: Mandriva, PCLinuxOS, Karoshi, Suse, Redhat, Ubuntu
Posts: 518

Original Poster
Rep: Reputation: 39
Cheers Trick, i thought one of those methods would be ok...there's no load balencing involved on this one..difficult to do so for a few reasons..if there was i'd probably use LVS anyway.

Thanks for the advice much apreciated my main concern was how different services would cope working off a server with IP Alias's.

The other thing is which is along the same lines...i know of send_arp that you get with the project 'fake' and 'ha-project' to refresh arp tables of the change in MAC address when IP move to other server, and i wondered if the send_arp of these other project ...or perhaps you can tell me what if any advantage there is using send_arp??

If you don't worries and i'll go down the arping route and give that a whirl.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redundant FTP Servers ddenton Linux - Server 4 11-26-2007 05:04 PM
Redundant servers dranobob Linux - General 3 04-03-2006 03:59 PM
Redundant Servers: where do I start? walterbyrd Linux - Software 2 02-20-2006 08:41 AM
redundant web servers exodist Linux - Networking 6 12-21-2005 03:09 AM
Redundant Linux Servers mephitic Linux - General 3 07-13-2004 01:33 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration