LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-23-2013, 12:31 PM   #1
LeHibou2
LQ Newbie
 
Registered: Feb 2013
Posts: 20

Rep: Reputation: Disabled
Ip failover - need to understand


Hello,

I need to understand how to make an ip failover system.

Since pacemaker and corosync didn't went well on my debian (stable or sid : bugged as hell), I wondered why I couldn't make a simple, light system.

Coding is not considered a problem here. My concern is not to recreate the wheel but to make this thing working pretty quickly.

Scenario :
1)Node1 : public ip 123.456.789
2)Node2 : public ip 213.546.879

I would like to tell node2 to takeover the node1 ip in case node 1 dies.

I thought of a nat system : not convenient since I still have to indicate a port.

I should be able to setup a system which tells node2 to simulate node1 ip. And there is the first step. I own my dns server but even a reacting script won't go against the isp's cache.

What is left ?

What about an ip dedicated to face the public (my dns would always send traffic toward it) but create an order of priorities so that node1 comes first, node2 second.., node n nth.

One more time, the already existing solution don't interest me here. To understand, I need to make a small tool myself.

Could you help by telling me how I could cheat with this 3rd ip and my nodes to watch it and react ?

Many thanks,

Larry
 
Old 04-23-2013, 05:37 PM   #2
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
You can try ucarp. You can visit this link for setup on Debian
 
Old 04-24-2013, 01:27 AM   #3
LeHibou2
LQ Newbie
 
Registered: Feb 2013
Posts: 20

Original Poster
Rep: Reputation: Disabled
Exactly what I need.

So I should rent a third public ip (additional to one of my node, say, node1, with no machine behind it) to be the shared one, right ?

3rd public shared ip : 222.333.111

So I will put this ip in the configuration to be listen on ? Like that :

Code:
# /etc/network/interfaces
# ..

# The primary network interface
auto eth0
iface eth0 inet static
address  ..
netmask  ..
gateway  ..
  #######################
  # ucarp configuration
  #######################
  ucarp-vid      1
  ucarp-vip      222.333.111
  ucarp-password mypass32
  ucarp-advskew  1
  ucarp-advbase  1
  ucarp-master   no

# The carp network interface, on top of eth0
iface eth0:ucarp inet static
        address 222.333.111
        netmask 255.255.255.255
Right ?

Thanks,

Larry
 
Old 04-24-2013, 06:12 PM   #4
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
Yes you are correct. You need 3rd IP. So that will float between the machines. So Traffic will destined to that IP. Whichever machine is up and running will carry that IP.
 
  


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
Failover ???? hesisaboury Linux - Newbie 2 07-31-2012 05:34 AM
Failover wasamzy Linux - Server 11 09-25-2010 04:56 AM
Failover vkmgeek Linux - Networking 5 04-05-2008 03:10 PM
IP failover sanjibgupta Linux - Networking 6 05-04-2007 04:01 AM
Failover tests ahmedrulezz Linux - Hardware 0 04-03-2006 03:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:54 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