Hey, did you consider using BGP [1]? Reading your requirements seems like you're not doing this for home, that said, two business uplinks supporting BGP should be payable for a company (not THAT expensive, I went into this once, too). OTOH, if basic A-record switching does the thing for you, I'd recomment using a very low TTL for your record (can go even down to 1 second as minimum) and install some uptime script that does exactly the check another poster already replied :) So long, Christian Parpart. [1] http://en.wikipedia.org/wiki/Border_Gateway_Protocol On Mon, Nov 21, 2011 at 11:03 AM, Pandu Poluan wrote: > On Mon, Nov 21, 2011 at 16:52, Pandu Poluan wrote: > > Hello all, I'm in need of some suggestions. > > > > You see, I have 2 Internet connections with public IP addresses, let's > > say ISP A 11.22.33.44 and ISP B 22.33.44.66 > > > > Now, I want outside parties trying to connect to "target.example.com" > > by default resolves to 11.22.33.44, but if ISP A's connection goes > > down for any reason, the DNS server will instead return "22.33.44.66". > > > > The nameserver itself will be located in the company, accessible from > > the world via "ns1.example.com" = 11.22.33.44:53 or "ns2.example.com" > > = 22.33.44.66:53. This allows the nameserver to monitor the state of > > the connections to ISP A and ISP B. > > > > I've been perusing pages discussing BIND, and came to the conclusion > > that BIND is incapable of doing that. > > > > Anyone can recommend me a DNS server that has such capability? Or how > > to implement this ability with maybe Python or (*shivers*) Perl? > > > > To illustrate further, here's the pseudo-language logic that I want to > implement: > > if ( request == target1.example.com ) > { > if ( state("ISP A") == "up" ) > { > return "target1.example.com = 11.22.33.44" > } > else > { > return "target1.example.com = 22.33.44.66" > } > } > > if ( request == target2.example.com ) > { > if ( state("ISP B") == "up" ) > { > return "target2.example.com = 22.33.44.66" > } > else > { > return "target2.example.com = 11.22.33.44" > } > } > > So, as you can see, there are actually two targets, one defaults to > ISP A (unless ISP A is down, then it 'falls back' to ISP B), and the > other defaults to ISP B (unless ISP B is down, then it 'falls back' to > ISP A). > > Rgds, > -- > FdS Pandu E Poluan > ~ IT Optimizer ~ > > • LOPSA Member #15248 > • Blog : http://pepoluan.tumblr.com > • Linked-In : http://id.linkedin.com/in/pepoluan > >