PDA

View Full Version : Name servers



Eric
04-04-2004, 04:05 PM
If I have 2 entries at a registrar that point to 2 different name servers, say, ns1.abc.com & ns2.def.com (they're different machines); assuming my entire website is identical on 2 different servers, if ns1.abc.com fails to respond for some reason, when people type in my domain in a browser, will they be directed to the other server (ns2.def.com), or a 404 will be displayed since ns1.abc.com does not respond?


Thanks
Eric

CyberAlien
04-04-2004, 04:53 PM
If first nameserver failes it should use second nameserver

Eric
04-04-2004, 05:33 PM
I see. Thank you.

sami
04-13-2004, 12:55 AM
however so far with directadmin since both ns1 and ns2 are on the same server...


its going to fail anyways.

I hope the upgrade to DA comes soon where it will support ns1 and ns2 on 2 diffrent servers.

That will be great :cool:

ProWebUK
04-13-2004, 01:54 AM
It "supports" it now..... you simply need to do the *initial* configuration yourself...

Chris

sami
04-13-2004, 08:17 AM
care to share te initial configuration with us?

nobaloney
04-14-2004, 06:03 PM
Originally posted by CyberAlien
If first nameserver failes it should use second nameserver
Actually, when an end user wants to visit your website, the resolver in his desktop computer will query the first nameserver listed in it's networking setup file (on a linux system, that's resolv.conf) for your website's IP#. If for some reason that nameserver doesn't answer, it will query the second, if you've listed two.

But your resolver won't query any other nameserver. The nameserver that the resolver sends the query to will then check it's own cache, and if the A record for your site isn't already in the cache, it will query the root servers (all of them), and accept the answers from the first response it gets.

And if it only gets authority (NS) records back, it will query all of those, until it gets A records, and then will try the first A record it gets.

The bottom line to all this is that if you have more than one nameserver, the so-called secondary (which should really be called a "slave" because it's not secondary in any way, but it does get it's records from the "master" nameserver, in this case the DA server) will get hits even if the master (often incorrectly called the primary server) is running.

Jeff

nobaloney
04-14-2004, 06:11 PM
Originally posted by sami
care to share te initial configuration with us?
Here's how we do it:

We set up the DA box to know about two nameservers; in our case ns1.ns-one.net and ns2.ns-one.net.

ns2.ns-one.net has the same IP# as our DA server, in this case our system da1.ns-one.net.

ns1.ns-one.net has the same IP# as our slave server, located, for redundance, on another network half the country away.

In this simplified example ns2.ns-one.net is the 'master' server for the sites located on our da1 server; it's located on the da1 system and DA sets up DNS automatically whenever a domain is created.

We manually set up slave records on the ns1.ns-one.net server for every domain

Then we restart the bind daemon with:

# service named restart

on the slave server.

We check the master server several times a week for new domains to add to the slave server.

Jeff