LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-26-2008, 02:29 AM   #1
helptonewbie
Member
 
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 192.168.0.2
machine B 192.168.0.3
Main IP address of service 192.168.0.1

Make the IP 192.168.0.1 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 192.168.0.2
machine B 192.168.0.3
Main IP address of service 192.168.0.1
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?

Cheers,
Regards
 
Old 08-26-2008, 09:20 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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 09:21 AM.
 
Old 08-26-2008, 12:14 PM   #3
helptonewbie
Member
 
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 know....no worries and i'll go down the arping route and give that a whirl.

Cheers
 
  


Reply


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 04:04 PM
Redundant servers dranobob Linux - General 3 04-03-2006 02:59 PM
Redundant Servers: where do I start? walterbyrd Linux - Software 2 02-20-2006 07:41 AM
redundant web servers exodist Linux - Networking 6 12-21-2005 02:09 AM
Redundant Linux Servers mephitic Linux - General 3 07-13-2004 12:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:40 AM.

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