LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-17-2015, 12:27 PM   #1
AWSmith
Member
 
Registered: Jun 2012
Posts: 32

Rep: Reputation: Disabled
Floating IP addresses ? An easier way than Cluster Services?


Irregardless [sic] of the distribution, sometimes you need this functionality:

IP 10.1.1.1 on server A.
IP 10.1.1.2 on servpr B.
IP 10.1.1.5 is a floating iP that we'd like to have on both A and B at the same time.

Obviously you can't have it on both servers.

So the most common cluster solution is to have each server configured with a service IP (.1 & .2). Then configure one box with a resource ip (10.1.1.5). Then the resource IP moves between the 2 servers depending on if one server is 'up' or not.

Problem:

The above is easy to say, easy to do, and a pain to automate.

We have 2 DNS servers and a manager (#@!!%!) who wants 10.1.1.5 as the only IP address our clients are configured to use.

So we would need either a load balancer (a huge pain) or we can have the resource IP move around.

I've seen pacemaker and other 'from sourceforge' solutions and honestly they are just complicated.

I tried writing my own... but that too is a mess. Such as the logic to decide when to fail over and to fail back. Yes, I can write it. No, I'm not overly confident in how well it wolud perform for a $750M company's need for redundant DNS. No, I don't want to tell the manager that this is why DNS clients have a primary and secondary DNS address to use. He's admant about using a floating IP between the 2 boxes but I just don't trust this to 'AW Smith's PERL script'. Ya'll know what I mean, right? Its someting that will look great and then it will break for some silly reason or it'll have both servers with the same IP on them spamming up arp tables and causing God knows what headaches with the OS deciding to stop using or listening b/c of a duplicate.

I realize I'm asking for a miracle here. I want HA without the fight to configure HA. Even for DNS. 8( Its just such overkill when the better solution is to use a primary and secondary DNS server on all DNS clients.

There has to be an easy off the shelf product that will merely ping the target resource IP, if its not up on the other server, it will then assign it to the local IP and restart named so that it will listen on the newly bound IP.

I have the script about 80% written - one for the 'primary' and one for the secondary (he wants to fail back the IP as well). But I really am spooked about trusting this much responsibility to a simple perl script when the real answer is to use 2 addresses on each client. Ideas?
 
Old 02-17-2015, 02:20 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Maybe you can use "ucarp", here's one page about it: https://www.debian-administration.or...h-availability

It's very easy to install & configure, should be in all repos so just "yum install ucarp" etc.
Example of a very basic & simple config:
Code:
 /etc/ucarp/vip-001.conf - content is to be the same on all hosts except SOURCE_ADDRESS:
ID=001
SOURCE_ADDRESS=<ip-of-this-host>
VIP_ADDRESS=192.168.0.99
PASSWORD=incorrect
With this very simple setup you can't use "ifconfig" to see what server actually has the floating ip, use "ip addr" instead.
 
Old 02-17-2015, 04:26 PM   #3
AWSmith
Member
 
Registered: Jun 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pingu View Post
Maybe you can use "ucarp", here's one page about it: https://www.debian-administration.or...h-availability

It's very easy to install & configure, should be in all repos so just "yum install ucarp" etc.
Example of a very basic & simple config:
Code:
 /etc/ucarp/vip-001.conf - content is to be the same on all hosts except SOURCE_ADDRESS:
ID=001
SOURCE_ADDRESS=<ip-of-this-host>
VIP_ADDRESS=192.168.0.99
PASSWORD=incorrect
With this very simple setup you can't use "ifconfig" to see what server actually has the floating ip, use "ip addr" instead.


Nice. I will try this. 8) I suspect the whole project has now been poo pooed though. Layer 8 of the OSI model is a nightmare sometimes. (Layer 8 = managemnt layer... human layer...) So now we're going to use dual server configs. When I explained that there are commercial products specifically designed to handle all of the 'unknowns' with clustering they changed their mind. 8)


But. This is still cool and i'll try it out anyway to see if it will do what I need.
 
Old 02-19-2015, 05:03 PM   #4
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Rep: Reputation: 53
Hi AWSmith,

I guess you could have quiet a few solution for this issue which are stable/reliable.

1.: Keepalived: http://www.cyberciti.biz/faq/rhel-ce...configuration/

Takes about 15 mins to setup.

2.: Corosyns, pacemaker: http://zeldor.biz/2010/12/activepass...aker-corosync/

This is definitely a much longer shoot to set it up, but much more flexible.
Got some setup at my workplace, I'll upload it tomorrow for you.

Hope it will help to sort out your trouble.

Regards,
Laz
 
  


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
Cannot Add new services to Cluster hostmaster Linux - Enterprise 4 10-09-2014 01:58 PM
RHEL5 2-Node Apache Cluster w/multiple floating IPs Linville79 Linux - Enterprise 2 04-13-2010 05:47 PM
Does RH Cluster Service 3 supports IPv6 addresses visra Linux - Enterprise 0 06-25-2007 08:22 AM
Which is easier to install on Linux PGP, x.509/PKCS, SAML, or SSO Web Services sdonohue Linux - Software 2 09-26-2006 05:12 PM
linux cluster: slave nodes keep switching ip addresses frankie_DJ Linux - Networking 0 08-30-2006 03:48 PM

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

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