Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-17-2015, 12:27 PM
|
#1
|
Member
Registered: Jun 2012
Posts: 32
Rep:
|
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?
|
|
|
02-17-2015, 02:20 PM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350
Rep:
|
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.
|
|
|
02-17-2015, 04:26 PM
|
#3
|
Member
Registered: Jun 2012
Posts: 32
Original Poster
Rep:
|
Quote:
Originally Posted by pingu
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.
|
|
|
02-19-2015, 05:03 PM
|
#4
|
Member
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 09:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|