how the hell do dns server requests work?

233 views

how the hell do dns server requests work?

In: 1

5 Answers

Anonymous 0 Comments

For recursive DNS (what your computer probably does), you send a packet to a server saying “Please find out the AAAA record for google.com for me”. The recursive DNS server has a way to find out and does, or possibly already has the result and remembers. Then it tells you “The AAAA record for google.com says 2a00:1450:400a:800::200e”.

For authoritative DNS, which is how the recursive server finds out: You remember a few (about ten) addresses for _root servers_. You start asking there.

You send a packet to an authoritative server saying “What is the AAAA for google.com?” and it can either say “The AAAA for google.com is 2a00:1450:400a:800::200e and I know because I’m the authority” or “There is no such thing as google.com and I know because I’m the autority for com” or “I don’t know, I’m only the autority for ., but I _do_ know that for .com. you should ask one of these servers”.

If the server you are asking gives you the answer, you have the answer, if it sends you to another one (this is called _delegation_), you ask that one.

For lots of cool detail, please read [RFC1034](https://datatracker.ietf.org/doc/html/rfc1034) and [RFC1035](https://datatracker.ietf.org/doc/html/rfc1035).

You are viewing 1 out of 5 answers, click here to view all answers.