Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm in the process of setting up my own name servers using BIND9, however I want to visualize the name server setup in relation to registrars and other name servers.

Say I have a domain www.mydomain.com

I setup my 2 name servers: ns1.mydomain.com -> 192.168.0.1 & ns2.mydomain.com -> 192.168.0.2

1) How does the world know that my name servers are now at ns1.mydomain.com and ns2.mydomain.com? I read about setting up glue records at my registrar. Could you please elaborate on this, i.e. once i setup these glue records, can I now use my name servers in NS records for any other domain?

For e.g. NS records for www.otherdomain.com -> ns1.mydomain.com/ns2.mydomain.com

2) Given I setup the glue records as mentioned above, do I "have to" update mydomain.com NS records to point to my name servers? Can I keep mydomain.com NS records pointing to my registrars name servers, however use ns1.mydomain.com/ns2.mydomain.com as name servers for any other domain I own?

share|improve this question
1  
Just one or two quick hints: It's usually a very good idea to put these two nameservers in separate networks in order to increase the reliability. Also, in case the IP addresses where more than just examples: Are you aware that these addresses will not work for public nameservers because these are private addresses? Lastly: DNS is notoriously difficult to get right and for most small sites it's a much better idea to simply use the service your registrar or provider offers. –  SvW Jun 1 '12 at 10:45
    
Thanks @SvenW, the ip addresses were just used as an example! I want to start using my own names servers as I want to have more control on my dns records. –  mmokh Jun 1 '12 at 10:51

2 Answers 2

If you're going to run your own name server you REALLY need to understand how DNS works. My advice would be to spend a few nights in bed with the O'Reilly book on BIND, it does a great job of explain how DNS works in the introduction, and then shows you how to architect and build up your own DNS system with examples.

Really, if you are admining a service, you need to really understand it deeply. We can't do that for you in a reply on a Q&A website

share|improve this answer
    
thank you for posting the DNS & BIND mantra for me - I'm starting to feel like a shill every time I direct people to it. O'Reilly is probably going to start sending me ad payments... –  voretaq7 Jun 1 '12 at 15:44
  1. The world knows because someone else hosts your glue records. Everyone knows where the root servers are and the root servers know where you are. The glue records tell everyone where your name servers are. Lots of detail in this older, canonical question.

  2. You don't have to make your NS records match your glue records but bad things sometimes happen if you don't. Specifically, some DNS resolvers will throw an error and some won't. I had to deal with a client recently whose DNS provider didn't serve NS records. PowerDNS could still look up their domain but bind couldn't. From memory, one of OpenDNS and Google's public DNS servers did and the other didn't. The result was that some people couldn't visit his website. I don't know exactly what would happen if you served NS records but they didn't match the glue.

Do use IntoDNS when setting yours up to make sure you're doing it right.

Extra credit: Why does DNS work the way it does?

share|improve this answer
    
thank you very much @Ladadadada ! i had to count 4 da's to get your name correctly:) –  mmokh Jun 1 '12 at 11:43
1  
@mmokh See also the book Bart B recommended - DNS and BIND - Absolutely required reading for anyone setting up a DNS server. –  voretaq7 Jun 1 '12 at 15:45

Your Answer

 
discard

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.