Recursive and Iterative Queries
Вставка
- Опубліковано 4 сер 2024
- DNS has two query types called recursive and iterative. Check out itfreetraining.com for more of our always free training videos. This video looks at how these queries are used to resolve DNS requests and how you would configure them in your organization to get the results that you require.
Download the PDF handout ITFreeTraining.com/handouts/dn...
Recursive and Iterative Queries
Recursive: This query is normally sent from a device on the network to a DNS server. This includes servers which also, when they require DNS names to be resolved, will send a recursive query to a DNS server. When a DNS server receives a recursive query, it will take responsibility to find an answer, even if this answer is, "there is no DNS name registered for that name". If the DNS server is configured to forward requests, it will simply forward the request to another DNS server to be resolved. If forwarding is not configured, the DNS server will contact other DNS servers. The first DNS server that will be contacted will be a root hints server assuming information is not available in the DNS server cache that may help resolve the request. This request will be an iterative query which is explained in more detail below. In this example, the root hints server will respond back with the IP Address of the .com servers. The DNS server will be able to send an iterative query to this server asking for the DNS server that can answer DNS requests for ITFreeTraining.com. Once the DNS server has the IP Address for one of these DNS servers, it can contact it and resolve the name ITFreeTraining.com
Iterative: An Iterative query is a DNS request which states, "Give me the answer or give me any information that will help me find the answer". If the DNS server has no information that will assist, it will respond back stating that and will not attempt to contact other DNS servers to attempt to find out the answer. Root hints servers are configured to only respond to iterative queries. As the root hints servers are at the top of the DNS hierarchy, if these were to become overloaded with recursive queries, this would affect their ability to answer other DNS queries and thus this is why recursive queries are switched off on the root hints servers.
Summary
Recursion: Sent by clients on the network to DNS Servers. The DNS server that is configured to accept recursive queries, which is the default, will contact other DNS servers as required to find out the result.
Iterative: Will respond back from its cache or zone files. It will not attempt to contact other DNS servers to find out the answer. If it knows another DNS server that may be able to assist with the name resolution it will return the IP Address of that DNS server.
References
"Domain Name System" en.wikipedia.org/wiki/Domain_N...
"MCTS 70-640 Configuring Windows Server 2008 Active Directory Second edition" pg 455
"Installing and Configuring Windows Server 2012 Exam Ref 70-410" pg 230
This is a superb explanation of how DNS resolution and iteration work. Bravo 👏
Glad it was helpful!
I watched this years ago, and I found it to re-watch it again in 2021 to make sure I had it right. Thanks * 2!
Glad we could help.
Thank you for knowledge share, keep it coming. as long as people use networks and ADDS you'll be remembered
Thanks for your great feedback!
U don't know how much you helped me.
very useful videos for the students....thank you so much sir
amazing video ..... Got the concept of Iterative and recursive queries ..... Thanks :)
+muhammad bilal ahmad You're welcome. We're very happy to hear the videos were useful to you.
Awesome explanation. Thanks !!
Thank you, we're glad you found the video helpful
Thank You so much !!! It is so good !
Thank you.
Very good video. But can you lease clarify this on the time line 1:10 on this video you mentioned each DNS server will be contacted if the name cannot be resolved. I thought the DNS query only goes to the secondary DNS server if the first server is not available.
Please clarify
Billon of thanks
Wow, this is very helpful thank you.
You're welcome!
Perfect video, thanks!
Thanks.
thanks a lot
Helping me get my degree. You go man
Thanks for watching.
always thumbs up for ur explanation
Thanks very much.
great work buddy
Thanks 👍
Great video. easily understood
Thanks!
Good explanation. Thank you
Thanks very much.
Excellent video Sir.
+rfrancoi Thanks!
Good video and informative too.
Thanks very much.
very professional, good job sir
Thank you! We're glad you enjoyed it.
thanks again :-)
Thank you.
2018!! thanks for this video
You're most welcome!
INFORMATIVE...NICE...:-)
Thank you!
is this process called round robin ?
Parabéns!
Tiago Toledo Faria Thank you
where does the resolving name server takes place. i didn't see it.
+rennyboy jumawan I am not sure what you mean. Can you elaborate.
Thanks.
You're very welcome!
Hello Sir,What is the difference between the zone file and the cache of the DNS server? If there is a location for cache ,please do let me know the path of it .Thank you
+Yoganand T S Well, a DNS zone file resides on a DNS server and contains the mappings between domain names, IP address, A & AAA records, CNAMES, MX records and more. This is opposed to the copy that was downloaded to the local workstations which is what I would assume you mean by cache. There is no real location for the DNS cache as it is stored within the TCP/IP components of the computer versus being an actual file. To view the DNS cache, you would open a command prompt and type "ipconfig /displaydns" and to clear the cache you would type "ipconfig /flushdns".
Does this answer your question?
Yes Sir. It answers my question clearly. Thank you so much for the explanation !
I was misunderstood that the cache will be stored on the DNS server.
You're are most welcome. We are so glad that we were able to answer you question. Please feel free to ask any others you may have!
in both the case its looking for other DNS server to resolve can you please explain this little bit of confused
Great !!
+Subhendu Bhattacharyya Thanks! We're glad you think so!
+itfreetraining Most welcome !! Not only this video , the complete series is great !! Even better then cbt nuggets.
We're so glad to hear that! We really appreciate the feedback justifying our free product over a paid product like CBT nuggets.
I love you
Petra? No way...kel hal2ad desperate?
If recursive disabled, then how DNS will respond to the queries from clients!
They will either respond to the entries that that they are authoritative for only or respond back with an NXDomain informing the client that the domain requested is not available. So if your use case is to lock down an environment and have informed users that will only ever expect DNS answers for one domain, that's when you disable recursion. If your use case is not this (most people's use case isn't) then you enable (or leave enabled) recursion.
Hate to complain, because on the whole the videos you produce are excellent, but, in watching this DNS series, I've noted there are segments of audio - such as in this one - where the audio quality drops; sounds like a really narrow, telephone bandwidth and you struggle to hear it.
We will investigate that issue, thanks for bringing it to our attention!
does not show the flow of recursive query just says. It is like
upload.wikimedia.org/wikibooks/en/b/ba/Recursive.jpg
+Yusuf Said CANBAZ Thanks!
Like + Subscribed to your channel.
I think your summary is wrong. Iterative will contact other dns servers. and recursive wont
It is a bit confusing. So your computer may do a number of iterative queries to different DNS servers to get a result, but essentially a direct connection. Recursive will may involved a number of DNS servers to get the result. And may do this process with a number of different DNS servers.
Shocking audio quality.
What are you referring to. Sound fine on this computer.
@@itfreetraining are you iRobot
1.25x speed. Trust me
Thanks for your suggestion!
U don't know how much you helped me.
Awesome explanation. Thanks !!
+Gadgetproblem Noproblem We're glad you are enjoying the videos and they are helpful for you