Friday, August 9, 2013

DNS Queries – Iterative and Recursive

In this article I will try to explain you the type of answer you will get when you set a query to your DNS server.

The Recursive name query
When a client sends request to a Recursive type of DNS server he most gets a response no matter if the server an autoretive to response or not. In this case the server can respond in two different ways.

The first option is that the DNS servers hold the record for the requested client query, and will respond as it’s supposed to for the specific record type.

The second option is that the DNS server is not holding the requested record for the client query; in that case the server will send an error message to the client and not forward the client query to another DNS server to try to resolve the client query.

The Recursive name queries can be made by clients to a DNS server or from one DNS server to a second DNS server (To set queries between to DNS servers we need to set the second DNS server as Forwarder).

Here we need to remember one easy role!
No matter if the server can or cannot resolve the client query he is the last stage for the client queries.

The Iterative name query
When a client sends request to a Iterative type of DNS server he also allow the server to forward is request in case the server don’t holds the record for is query to another DNS server that holds the record and can answer the correct respond to the query forward to him .

These types of queries typically established between two different DNS servers.
Here I will show you an example of those two queries types.
User connects to DNS1 with a Recursive query for

In that case the DNS1 server must respond to the client query with the correct answer or an error massage.
DNS1 need to check if he has an answer to the query and couldn’t find the correct record for it.

DNS1 will check both is Zones and is Cache to see if he can answer the client query.
Because DNS1 cannot respond the correct answer to the client query he send a recursive request to alterative DNS server over the internet.

DNS servers holds by default the “Root Hints” that help him sends queries to other DNS servers around the net.

The root DNS server from the internet also cannot resolve the request from DNS1.
The root DNS server try to resolve the request with autorative DNS server for .Com domain name.

DNS1 establish connection to the .COM domain with Iterative query for

Now the server responsible for the .Com domain doesn’t know the full answer for the client query so he answer with referral to server authorities for the

DNS1 connects to the server holds the

The server also doesn’t know the full answer so he responds with the requested IP.

After all this process DNS1 now can respond the user with the IP address to “”

No comments:

Post a Comment

My Presentations