Linux - NetworkingThis 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.
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.
The small business I work for is fed-up w/ the local isp's and various e-mail limits. We have our own domain name, and our e-mail is at the domain name run by a small isp in our rural area.
I am a linux admin with many years experience in linux administration, using apache and other web services. I dabbled lightly in lan dns a while back.
What I want to do:
We want to setup 2 redundant servers in alternate locations, one here in our main office, and the other at one of our homes (seperate internet, power grid, etc.).
I am confident I can configure the web services such as apache and postfix on each no problem. I am also confident I could configure a dns server that resolves our domain to the server at eather location. but I am not sure how to go about the next step:
We want the server at the promary location to be the dns and web server all the time, any requests go there. We want the second server to simply duplucate any data on the main server and listen, if the main server goes down and cannot be reached any longer the second server should kick in, replace the dns records so that any e-mail or web requests are sent to it instead, then when the main server comes back online the secondary one should send the primary one all the e-mail it recieved and then give the main server back it's responsibilities (replace dns record again, etc)
Now I can easily setup monitoring and scripts to duplicate data, the only thing I am not sure how to do in this setup is the dns part, making the name resolve to the ip of the backup server instead of the main server, then switching back later.
do I need to setup the dns to list both servers in a sequence so that incomming connections will try the first then go to second if the first is not reachable? sounds to me this would be the best option, but I am not sure if it is possible, as I said my dns experience is limited.
I understand the theory of dns, and how it does it's job, I am familiar w/ domains and such. I am just not familiar w/ the tools and behaviors of various configuration as far as implimentation goes (the qandry of theory vs. implimentation)
We want the server at the promary location to be the dns and web server all the time, any requests go there.
...so that when you loose connectivity to primary, you'll not only loose HTTP (trivial) but also your primary DNS (critical) as well. Hurrah!
We want the second server to simply duplucate any data on the main server and listen, if the main server goes down and cannot be reached any longer the second server should kick in, replace the dns records so that any e-mail or web requests are sent to it instead,
For email just add multiple MX records. Any sane remote MTA will figure out all by itself where can drop mail.
HTTP shouldn't pose problems either, just set up a share and replicate.
I don't think replacing DNS records will work as you described because you choose to host the primary *yourself*. I would think that if you own two "local" slaves and leave the master at your ISP, then you could "advertise" your www CNAME using the first slave, and when it dies increment the serial so the second slave pushes the record to the master, but then I ain't no DNS guru.
ok, a sane config will cycle mx records and drop mail wherever it works, that is the main issue I had e-mail is out priority. so that means I can go with a dns service I do not have direct system control over. as for http, that was not clear, does anyone know if I can list 2 www.xxx.tld and have it try them in order? or will this simply do the round robin I have heard of alternating the 2?
also for any dns guru's, same issue of round robin but on mail yes or no?
RFC 1035 was written back in 1987, four years before the first web server went public and at least six years before anyone thought of a web server as an essential service. Sites such as www.google.com and www.microsoft.com point to multiple aliases but I don't know if all browsers will treat that as a fallover list.
What you could do is set the TTL for your www subdomain to something rediculously low (dyndns.org sets 60 seconds for user subdomains) and run scripts to monitor connectivity and update the www A record on your primary and secondary DNS as necessary. This technique will generate a lot more DNS query traffic for you and slower load times for your visitors though, since the A record will become essentially non-cacheable.
For your mail exchangers I suggest you use the existing mechanism within DNS.
I am looking for the same features as Exodist, specifically for the Apache webserver.
Is there no function available like the MX priority for other requests, like an A record?
I do understand the technique of a script checking the server activity, update the A records, and a low TTL. I am using BIND with a MySQL database and that sounds relatively simple (although I have to look for the best way how-to do it as I never did it).
Does this work however if I am hosting the DNS myself as well and it was mentioned that losing the primary DNS is fatal. Will a request be routed past all servers listed as DNS server for the domain until it gets a proper response? The second DNS server will in this case have a changed record after detecting the primary went down.
Losing your primary DNS is not fatal if your secondary is fully functional. When the specifications for DNS were written, email and DNS were considered important enough to allow for redundant hosts, but web servers were not considered because they did not exist in 1987.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.