I've done this multiple times before. The way I do it is with a dynamic DNS provider like dyndns.org.
- 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.
- Create a dynamic DNS account and record for office.ourfirm.com
- 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:
- Get a premium account where it can host DNS for you (you can host ourfirm.com, or just delegate office.ourfirm.com to the service).
- Create a domain using their hosting services, like ourfirm.dyndns.org (which will be an A record hosted by dyndns). Set up office.ourfirm.com to be a CNAME to ourfirm.dyndns.org. 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.