Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

The firm that I work for has 2 ADSL lines into the office. We have a domain which we would like to be able to reach our network server on. One of ADSL connections is already a DNS entry for

We would like to use the other connection as a backup. I know there is "round robin" DNS but that isn't a redundancy system is it? How would you suggest we get this other ADSL connection added to the DNS so one ADSL will act as a failover for the other?

Example: If one of the ADSL lines goes down, the other is used seamlessly.

Cheers Chris

share|improve this question
That's network routing, it's not something you can do with DNS (alone). You either build it into the client, or you build it into routing, or you put a transparent proxy in front of your ADSL connections (i.e. before they get to your office) and it probes and checks with routes are up. But really, you're talking about network routing. – EightBitTony Jul 13 '11 at 18:25
You seem to be bordering on the point where getting an AS number, IP address allocation, and setting up BGP would be the way to go, but it depends heavily on how critical access to that server is. Round robin DNS is used for load balancing, rather than failover, the best case failover scenario with round robin is a 50% failure rate, as each attempt would swap between the connections. Dynamic DNS using a low TTL will work, but that also adds a significant point of failure on the DNS server - without caching of records, any DNS failure makes the server unreachable. – Stephanie Jul 14 '11 at 4:30
up vote 0 down vote accepted

I've done this multiple times before. The way I do it is with a dynamic DNS provider like

  1. Set up your router to prefer traffic out one connection. At the least, do this for HTTP/HTTPS traffic (there are benefits to this -- some web apps will not like it if you use the same session but bounce between different IPs, and will log you out). This means no HTTP(S) traffic goes out over your secondary connection unless the primary is down.
  2. Create a dynamic DNS account and record for
  3. Install the dynamic DNS client on an internal server.

When the dyn DNS client updates your record, it will usually come from your primary connection, and so everything will come to that IP. If the connection goes down, it will start coming from your secondary connection, and thus you get your failover. If you lose a connection, it will take up to as long as your dyn DNS client updates before coming back up (5 minutes maybe? less with "pro" accounts).

There's two ways to do the dyn DNS account:

  1. Get a premium account where it can host DNS for you (you can host, or just delegate to the service).
  2. Create a domain using their hosting services, like (which will be an A record hosted by dyndns). Set up to be a CNAME to Often this method will be free.

On a side note regarding fail-over, you mention two ADSL connections. That's great and all, but there are several considerations here:

  • If they're both accounts from the same provider, all you're really getting is redundancy from your DSL modem in your office. If the phone lines, your provider, or their upstream provider go down, you're still offline regardless of having a failover.
  • Do the lines come in on the same sets of phone lines? Most datacenters put in lots of effort to ensure their upstream connections come physically from different directions and come into the building in separate places. This ensures that eg, a construction crew can't take out a line and kill all your connections in one swoop.
  • If they're different providers, are they still on the same upstream connections? Figure out what your ISP's providers are (hopefully they have more than one). If you have two different ISPs but they both share the same upstream provider, you still aren't totally protected.
  • With DSL, often it's the phone company that provides the DSL and resells bandwidth and access to ISPs (eg, Bell Nexxia). In this case, you're still dependent on one company (your local phone company) to have their DSL network up, even if the actual internet bandwidth comes from different places.

At my current office we have failover exactly as described, and our primary connection is cable, and our secondary is DSL. Nothing is shared between the two, and both are major ISPs with multiple upstream connections to the internet backbone. I'm sure somewhere it's vulnerable to a backhoe operator, but at least they're completely physically different cables maintained by different companies, so there's very little chance of something that will kill both.

I'd highly recommend using two different technologies for the best redundancy. There are many possible ways to connect now, so it's not overly difficult or expensive in most places: cable, DSL, fibre, satellite, wireless, GSM/cellular.

share|improve this answer

The easy answer is with a router that supports a failover iconnection, but then you can't use both lines. How are you using both lines right now? What's the chance that one ADSL will go out and leave the other one up? Are they from the same provider coming through the same demarcation point? If you are looking to create network redundancy to ensure uptime of, please consider getting a backup internet connection from a different provider that comes into your office through other means. You may also want to consider hosting's site with a hosting provider that can guarantee uptime.

share|improve this answer
Thanks for your response. The 2 lines that we currently have are from different providers. The service that points to is actually a server that controls VPN connections. Ideally we would like to have it so that will find the server no matter which ADSL connection is up/down. – Chris Wilkinson Jul 13 '11 at 22:21

Depending on how comfortable you are with BIND (I assume you control your own DNS servers, but you do not specify what type), this is possible with dynamic DNS updates. I recently set something like this up as a proof-of-concept.

You can configure a probe that tests the availability of your ADSL connections and invokes nsupdate to dynamically modify the zone in the event of a failure. See man nsupdate for more details about that. You would supply some simple instructions indicating "delete the A-record for the downed router" or "readd the A-record once that router comes back up". You can use "round-robin" A-records with low TTLs under normal circumstances so that the DNS server returns more than one functional address. Then you simply remove non-functional addresses if they are unusable and re-add them once they're working again.

share|improve this answer
This isn't a great option, as you'll have to keep your TTLs very low or deal with some failures. You can achieve instantaneous migration with proper IP-based migration. – Michael Lowman Jul 13 '11 at 20:12

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.