3

This question already has an answer here:

Domain name: abc.com Name Server: ns1.abc.com and ns2.abc.com

I am running a DNS server and hosting the zone (abc.com) on-premise.

When a client wants to resolve *.abc.com, it will query ns1.abc.com or ns2.abc.com, that is straight forward.

The question is how does it resolve ns1.abc.com before it can sends query to it?

marked as duplicate by Andrew B, HopelessN00b, Community Apr 20 '16 at 5:12

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 5
    Glue Records... – joeqwerty Apr 20 '16 at 2:49
  • @joeqwerty thanks, this is exactly the answer to my questions. – Leon Apr 20 '16 at 3:20
2

To find the name server for abc.com a DNS server will query the DNS server for com. This will return the nameserver information provided to your registrar. You must provide the IP addresses to the registrar when the servers are within your domain.

To find the com DNS servers the DNS server will contact one of the root domain servers. When the DNS server starts it will use a hints file to do an initial lookup of the root servers.

  • it's obvious with IP address, but not clear with domain name, e.g. how DNS resolve ns1.example.com, if it's under example.com which DNS is ns1.example.com – Alex Ivasyuv Mar 18 '17 at 12:48
  • @AlexIvasyuv The server for .com will return the NS records for example.com which would be ns1.example.com, and include the A records for servers. One of those servers would be queried for the A record for example.com. – BillThor Mar 18 '17 at 23:20
-1

you assign DNS servers on clients when configuring IP, so each client already have the ip addresses of DNS servers. and on your DNS servers there are NS records for your name servers.

-1

You should never specify a name server by name, only by IP. So you wouldn't tell the DNS client to talk to ns1.abc.com, you'd tell the client to talk to it's ns1.abc.com's IP.

For the top level DNS servers, a "hints" file is, or used to be, used to tell the client of the top level DNS servers.

  • if that's the case, google.com setup is wrong? since they are pointing to ns1.google.com etc etc... – Leon Apr 20 '16 at 3:23
  • 1
    Incorrect. The standard only allows NS records to refer to nameservers by name, not IP address, and it was designed that way for a reason. – Andrew B Apr 20 '16 at 3:28
  • Thanks for the correction guys, so the answer then is "A records are used to resolve the names in the NS records"? – user1174838 Apr 20 '16 at 4:10
  • It's a mixture. NS records point at A records. When defining the domain itself though, it is frequently necessary to use glue records as you otherwise end up with chicken and egg scenarios. (example.com defining nameservers inside of its own domain, ala ns1.example.com) They should be avoided unless absolutely necessary. – Andrew B Apr 20 '16 at 4:20

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