Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have two ISP's and both ISPs' IP NAT with the same webserver IP. I want failover for incoming traffic, is there any open source solution? Can I do it by making two name servers, one for each ISP?

I am not sure but as per my knowledge the primary and secondary name server will reply in a round robin fashion till they are live. Once any name server will be unreachable then only another will be replying, so if I am right then I think I can do incoming failover by making two name servers in my office...

share|improve this question
add comment

3 Answers

The name server solution is the simplest option, but you must set the TTL according to your needs. There are a lot of discussions regards TTL. We are using name servers with low TTL from several years and this solution works well for us, but if you want a real and prompt failover system you must go on more complex solution like BGP, if your ISP support it.

Little sample (with very simple TTL explanation) of failover by name servers.

Type A record in both dns server: www.domain1.com 1.1.1.1 TTL 10 (1.1.1.1 is the public ip of primary ISP)

When primary ISP fails you must change the A record of www.domain2.com to 2.2.2.2 (where 2.2.2.2 is the public ip of failover ISP).

TTL tells to client (browsers and other name servers) around the world that the ip address for www.domain1.com is valid for 10 seconds. After 10 seconds the client must re-ask ip to name server.

This link can explain better, also why this is not a perfect solution.

share|improve this answer
    
dear little more explanation how TTL use for incoming load balancing for werserver or mailserver ( with two Public IP) –  sahil May 27 '10 at 7:39
add comment

Vyatta comes to mind, it can do WAN loadbalancing.

http://www.vyatta.com/downloads/index.php

Maybe try on their forums for suggestions on how:

http://www.vyatta.org/forum/index.php

share|improve this answer
add comment

Have you looked at CARP?

share|improve this answer
    
From your CARP link: CARP is a protocol which allows multiple hosts on the same local network to share a set of IP addresses. Thus CARP is not applicable, because sahil needs failover with two public ip addresses. –  lg. May 27 '10 at 7:33
    
If the original question is looking for a way to route around a failed network link (not a failed server), then I agree CARP is not the best solution, though I don't think DNS tricks are either. If the question is "I have a multihomed network, how do I route around a failure on one of the links?", then as far as I know the correct answer is "Get your own ASN, and run a router capable of BGP". But I suspect if that were possible, it would already have been done - I think the practical answer is to move the services to a VPS/colo site that's not behind a flaky network link. –  gbroiles May 27 '10 at 17:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.