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've had a good look at Wikipedia's article on DNS, and got a somewhat broad overview of how the process of resolving domain names works.

However, I was having a bit of trouble understanding the exact role of the DNS server itself. My understanding is as follows:

  • The DNS server receives a request from a client asking for the IP address of a given domain name.
  • The DNS server checks whether it is authoritative for that domain and...
    • ...if it is, then it returns the IP address.
    • ...if it is not, then it in turn queries another DNS server.

And here is where my actual questions come about:

  • Do I understand the process of DNS resolution, or am I missing something?
  • What does the DNS server use to make DNS queries...? The configured DNS server for the machine it's running on?
  • I read that DNS uses UDP sockets but it can also use TCP sockets. When does each get used? Can a DNS server only use TCP sockets?
  • Is there an RFC document that details the format expected of the packets the DNS server receives and replies with?
share|improve this question

migrated from stackoverflow.com Feb 27 '11 at 7:44

This question came from our site for professional and enthusiast programmers.

closed as not a real question by John Gardeniers, Iain, Chopper3 Feb 27 '11 at 11:27

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
@aaa: That's an excellent resource. If you post that as an answer, I will gladly accept it. –  Nathan Osman Feb 27 '11 at 7:03
1  
uh, in retrospect i think it on Ukrainian site which has lax legality and i'll get flamed for posting copyright material.... –  aaa Feb 27 '11 at 7:14
    
You really haven't made much of an attempt to help yourself. Try doing some basic searching, such as Googling for "dns protocol". –  John Gardeniers Feb 27 '11 at 8:38
1  
I voted to close it or the simple reason that as IT professionals we are expected to put in some basic groundwork before asking a question. This one clearly shows no such effort was put in. A quick look at a Wikipedia article, which are not reliable sources of technical information at the best of times, does not qualify as basic research. –  John Gardeniers Feb 27 '11 at 21:04
1  
@John That's a judgement call to far IMHO, and as it happens the Wikipedia page on DNS is pretty thorough. He has sensible questions, and #2 and #3 in particular don't have easily found answers. –  Alnitak Feb 27 '11 at 21:24
show 3 more comments

2 Answers

up vote 1 down vote accepted

Do I understand the process of DNS resolution, or am I missing something?

You are missing caching - many DNS servers will cache answers so that they don't have to query upstream for each request.

What does the DNS server use to make DNS queries...? The configured DNS server for the machine it's running on?

This What is DNS KB article from DynDNS has a good explanation of the parts and the answers to this question provide information too.

When does each get used? Can a DNS server only use TCP sockets?

Have a look at the TCP/IP Guide's information on DNS Message Generation and Transport

share|improve this answer
    
Thank you... your answer really points out some good resources. –  Nathan Osman Feb 27 '11 at 19:38
2  
George - for the question on TCP support in DNS see my RFC 5966. –  Alnitak Feb 27 '11 at 20:48
add comment

Is there an RFC document that details the format expected of the packets the DNS server receives and replies with?

From the very link you provided to the Wikipedia article:

At the request of Jon Postel, Paul Mockapetris invented the Domain Name System in 1983 and wrote the first implementation. The original specifications were published by the Internet Engineering Task Force in RFC 882 and RFC 883, which were superseded in November 1987 by RFC 1034 and RFC 1035. Several additional Request for Comments have proposed various extensions to the core DNS protocols.

So, in short, yes there is an RFC or ten that details the DNS service protocols in excrutiating detail.

share|improve this answer
    
Heh-heh... oops. I missed that :P But my other questions still stand. –  Nathan Osman Feb 27 '11 at 7:02
1  
The rest of your questions can be answered by reading RFCs 1034 and 1035 (plus the RFCs that update them) I think. 1034 in particular will answer the first while 1035 (and the updates) will answer the remaining ones. –  JUST MY correct OPINION Feb 27 '11 at 7:05
add comment

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