Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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: TTL 10 ( is the public ip of primary ISP)

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

TTL tells to client (browsers and other name servers) around the world that the ip address for 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

Vyatta comes to mind, it can do WAN loadbalancing.

Maybe try on their forums for suggestions on how:

share|improve this answer

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

Your Answer


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