Difference Between Iterative and Recursive Dns Query
Difference Between Iterative and Recursive Dns Query
ABOUT US (HTTP://SLASHROOT.IN/ABOUT-US)
CONTACT US (/CONTACT)
ARCHIVE (HTTP://SLASHROOT.IN/ARCHIVE)
ARCHIVES (/TAXONOMY/TERM/2)
NETWORKING (/NETWORKING)
Tweet
0
Like
43 (#)
Share
(#)
1. recursive query
2. iterative query OR Nonrecursive query
3. Inverse queries
The above resolve conf entry means that,Your DNS servers are
172.16.200.30 & 31. Whatever application you use, the
operating system will send DNS queries to those two DNS
servers.
STEP 1: You enter www.example.com in the browser. So the
operating system's resolver will send a DNS query for the A
record to the DNS server 172.16.200.30 .
STEP 3: As the answer for the query is not available with the
DNS server 172.16.200.30, this server sends a query to one of
the DNS root server,for the answer. Now an important fact to
note here is that root server's are always iterative servers.
STEP 4: The dns root server's will reply with a list of server's
(referral) that are responsible for handling the .COM gTLD's.
STEP 6: Similar to the root server's , the gTLD server's are also
iterative in nature, so it replies back to our DNS server
172.16.200.30 with the list of IP addresses of the DNS server's
responsible for the domain(authoritative name server for the
domain) www.example.com.
STEP 7: This time also our DNS server will select one of the IP
from the given list of authoritative name servers, and queries the
A record for www.example.com. The authoritative name server
queried, will reply back with the A record as below.
How does the name server select one from the given list of
servers to query?
In the above case, you might have seen that our DNS server
172.16.200.30, had to select one server, from the given list of
Send
servers to Me Article
query, Updates
multiple times.Via E-mail SignUp
For example there are 13 root servers(Well when i say 13 root
servers, 13 is the number of addresses that is universal. There
are Hundreds of servers at different locations in the world. These
13 root server addresses are anycasted addresses.), which root
server will be queried, for an answer?
In an iterative query, the name server, will not go and fetch the
complete answer for your query, but will give back a referral to
other DNS server's, which might have the answer. In our
previous example our DNS server 172.16.200.30, went to fetch
the answer on behalf of our resolver, and provided us with the
final answer.
Now its the job of our resolver to query the root server, .COM
TLD servers, and authoritative name server's, for the answer.
Lets go through
Send Me the steps
Article involved.
Updates Via E-mail SignUp
STEP 1: You enter www.example.com in the browser. So the
operating system's resolver will send a DNS query for the A
record to the DNS server 172.16.200.30 .
Now the rest of the steps are all the same. The only difference in
iterative query is that
if the DNS server does not have the answer, it will not
query any other server for the answer, but rather it will
reply with the referral to DNS root server's
But if the DNS server has the answer, it will give back the
answer(which is same in both iterative and recursive
queries)
in an iterative query, the job of finding the answer(from the
given referral), lies to the local operating system resolver.
Add a comment...
AAdil HusSayn · Street Poet at Raba guma nu meRi khushiyan naL bhar de
ye kaRam menu meRe naAl kaRde..... own poetry
Awesome
Like · Reply · 3w
Thanks a ton
reply (/comment/reply/79/65)
Permalink (/comment/103#comment-103)
Submitted by Ankit Gupta on Mon, 07/01/2013 -
16:50
Thanks a lot.
reply (/comment/reply/79/103)
Permalink (/comment/104#comment-104)
Submitted by bbo on Mon, 07/01/2013 - 19:39
reply (/comment/reply/79/104)
Permalink (/comment/105#comment-105)
Submitted by Sarath Pillai on Mon, 07/01/2013
- 21:44
Hi bbo,
Regards
Sarath
reply (/comment/reply/79/105)
Permalink (/comment/109#comment-109)
Submitted by ravi on Wed, 07/10/2013 - 15:17
reply (/comment/reply/79/109)
Permalink (/comment/115#comment-115)
Submitted by Aziz on Thu, 07/25/2013 - 13:25
Great work!!!!!!
reply (/comment/reply/79/115)
Permalink (/comment/117#comment-117)
Submitted by Rupesh on Fri, 08/02/2013 - 18:17
Hi Sir,
Very good documentation. what is advantage &
disadvantage of both queries,which is one best
&why? will iterative queries decrease load of DNS
server? I am confuse. Both queries gives surely
answer then what is advantages &
disadvantages?
reply (/comment/reply/79/117)
Hi Rupesh, (/comment/118#comment-
118)
Permalink (/comment/118#comment-118)
Submitted by Sarath Pillai on Sat, 08/03/2013
- 00:34
reply (/comment/reply/79/118)
Permalink (/comment/169#comment-169)
Submitted by Ashrafi Afzal on Tue, 11/05/2013 -
16:32
Regards,
Afzal Ashrafi.
System Administrator.
reply (/comment/reply/79/169)
Hi Afzal Ashrafi,
(/comment/170#comment-170)
Permalink (/comment/170#comment-170)
Send Me ArticleSubmitted
Updates Via E-mail Pillai SignUp
by Sarath on Tue, 11/05/2013
- 18:11
Hi Afzal Ashrafi,
reply (/comment/reply/79/170)
Permalink (/comment/490#comment-490)
Submitted by Nikhil Rupanwar on Wed,
11/27/2013 - 23:33
reply (/comment/reply/79/490)
Permalink (/comment/533#comment-533)
Submitted by sysadmin@avz.org.ua on Wed,
01/15/2014 - 14:57
Permalink (/comment/537#comment-537)
Submitted by Sarath Pillai on Mon, 01/20/2014
- 05:29
Hi,
Regards
Sarath
reply (/comment/reply/79/537)
Permalink (/comment/539#comment-539)
Submitted by imanuel on Tue, 01/21/2014 - 12:34
reply (/comment/reply/79/539)
Easy to understand
(/comment/541#comment-541)
Permalink (/comment/541#comment-541)
Submitted by Kumpon on Wed, 01/22/2014 - 10:12
reply (/comment/reply/79/541)
reply (/comment/reply/79/551)
kalakiteenga thala
(/comment/564#comment-564)
Permalink (/comment/564#comment-564)
Submitted by saravanan subra... on Wed,
02/12/2014 - 12:45
Thank you
Saravanan
reply (/comment/reply/79/564)
thanks (/comment/604#comment-604)
Permalink (/comment/604#comment-604)
Submitted by vijay pratap singh on Tue,
03/25/2014 - 17:00
reply (/comment/reply/79/604)
Permalink (/comment/690#comment-690)
Send Me Article Updates
Submitted Via E-mail
by tokol SignUp - 05:16
on Mon, 04/21/2014
First, thanks for this great article!
reply (/comment/reply/79/690)
DNS (/comment/695#comment-695)
Permalink (/comment/695#comment-695)
Submitted by gt on Fri, 04/25/2014 - 11:52
reply (/comment/reply/79/695)
Permalink (/comment/707#comment-707)
Submitted by sri on Fri, 05/09/2014 - 19:54
reply (/comment/reply/79/707)
Permalink (/comment/785#comment-785)
Submitted by chandu on Sun, 07/13/2014 - 03:09
reply (/comment/reply/79/785)
Permalink (/comment/788#comment-788)
Submitted by suresh s on Tue, 07/15/2014 - 13:24
reply (/comment/reply/79/788)
Permalink (/comment/795#comment-795)
Submitted by shinu on Thu, 07/17/2014 - 13:04
reply (/comment/reply/79/795)
Permalink (/comment/1037#comment-1037)
Submitted by Laxman S Mandloi on Tue,
01/27/2015 - 14:34
Hi,
reply (/comment/reply/79/1037)
Permalink (/comment/1047#comment-1047)
Submitted by george on Sat, 02/14/2015 - 06:54
reply (/comment/reply/79/1047)
Permalink (/comment/1048#comment-1048)
Submitted by george on Mon, 02/16/2015 -
03:24
reply (/comment/reply/79/1048)
Thanks a lot!!
reply (/comment/reply/79/1124)
Permalink (/comment/1147#comment-1147)
Submitted by Shubham Shah on Fri, 07/31/2015 -
11:47
Thanks a lott...
reply (/comment/reply/79/1147)
Awesome explanation.
(/comment/1155#comment-1155)
Permalink (/comment/1155#comment-1155)
Submitted by Vishesh on Sun, 08/09/2015 - 18:30
Awesome explanation.
reply (/comment/reply/79/1155)
excellent article
(/comment/1187#comment-1187)
Permalink (/comment/1187#comment-1187)
Submitted by azmat shaikh on Wed, 09/09/2015 -
12:39
Send Me Article
replyUpdates Via E-mail
(/comment/reply/79/1187) SignUp
Wow dude, (/comment/1192#comment-
1192)
Permalink (/comment/1192#comment-1192)
Submitted by bajay j. on Fri, 09/18/2015 - 18:02
Wow dude,
this is amazing - for the first time I clearly
understand the machinery behind dns in very
simple terms.
reply (/comment/reply/79/1192)
Permalink (/comment/1205#comment-1205)
Submitted by Shahnwaz on Thu, 10/08/2015 -
12:44
reply (/comment/reply/79/1205)
Good explanation
(/comment/1227#comment-1227)
Permalink (/comment/1227#comment-1227)
Submitted by Anonymous on Tue, 11/03/2015 -
20:21
reply (/comment/reply/79/1227)
Nyc Explanation
(/comment/2267#comment-2267)
Send Me Article Updates Via E-mail SignUp
Permalink (/comment/2267#comment-2267)
Submitted by Atul Girishkumar on Tue, 05/17/2016
- 10:46
reply (/comment/reply/79/2267)
Good Explanation
(/comment/2373#comment-2373)
Permalink (/comment/2373#comment-2373)
Submitted by Vinodh on Wed, 09/21/2016 - 17:09
reply (/comment/reply/79/2373)
Permalink (/comment/2399#comment-2399)
Submitted by Anonymous on Sun, 10/09/2016 -
17:59
good explanationn
reply (/comment/reply/79/2399)
Excellent explanation
(/comment/2459#comment-2459)
Permalink (/comment/2459#comment-2459)
Send Me Article Updates
Submitted Via E-mail
by Neeraj SignUp - 08:54
on Tue, 11/29/2016
Excellent explanation
reply (/comment/reply/79/2459)
Permalink (/comment/2550#comment-2550)
Submitted by Ibrahim N. Almahfooz on Tue,
02/07/2017 - 14:18
Well done.
reply (/comment/reply/79/2550)
Good (/comment/2612#comment-2612)
Permalink (/comment/2612#comment-2612)
Submitted by Ajay sharma on Fri, 04/14/2017 -
00:10
reply (/comment/reply/79/2612)
Permalink (/comment/2624#comment-2624)
Submitted by Abdul Rehman on Tue, 05/02/2017 -
22:28
reply (/comment/reply/79/2624)
Permalink (/comment/2641#comment-2641)
Submitted by Gebre on Sat, 05/13/2017 - 12:33
Thanks
reply (/comment/reply/79/2641)
Permalink (/comment/2778#comment-2778)
Submitted by Puni Henry on Thu, 11/16/2017 -
19:10
reply (/comment/reply/79/2778)
Your name
Subject
Comment *
(/curl-command-tutorial-linux-
example-usage)
CURL command
Tutorial in Linux with
Example Usage (/curl-
command-tutorial-linux-
example-usage)
Archives (/taxonomy/term/2) -
16 comment(s)
(https://www.slashroot.in/curl-
command-tutorial-linux-
example-
usage#comments#comments)
(/iperf-how-test-network-
speedperformancebandwidth)
IPERF: How to test
network
Speed,Performance,B
andwidth (/iperf-how-
test-network-
speedperformanceband
width)
Archives (/taxonomy/term/2) -
18 comment(s)
(https://www.slashroot.in/iperf-
how-test-network-
speedperformancebandwidth#c
omments#comments)
(/difference-between-iterative-
and-recursive-dns-query)
difference between
iterative and recursive
dns query (/difference-
Send Me Article Updates Via E-mail SignUp
between-iterative-and-
recursive-dns-query)
Archives (/taxonomy/term/2) -
43 comment(s)
(https://www.slashroot.in/differe
nce-between-iterative-and-
recursive-dns-
query#comments#comments)
(/how-does-traceroute-work-
and-examples-using-traceroute-
command)
How Does Traceroute
Work and Example's
of using traceroute
command (/how-does-
traceroute-work-and-
examples-using-
traceroute-command)
Networking (/networking) - 72
comment(s)
(https://www.slashroot.in/how-
does-traceroute-work-and-
examples-using-traceroute-
command#comments#comment
s)
(/how-does-traceroute-work- (/fingerprinting-detect-remote-
and-examples-using-traceroute- operating-system)
command) fingerprinting-detect
How Does Traceroute remote operating
Work and Example's system (/fingerprinting-
of using traceroute detect-remote-operating-
command (/how-does- system)
traceroute-work-and-
examples-using- Average: 5 (9 votes)
traceroute-command)
Networking (/networking) - 72
comment(s)
(https://www.slashroot.in/how-
does-traceroute-work-and- (/what-is-port-knocking-and-
examples-using-traceroute- how-to-configure-it-in-linux)
command#comments#comment What is Port knocking
s) and how to configure
it in Linux (/what-is-
port-knocking-and-how-
SAN vs NAS -
Send Me Article
Difference Updates
between a Via E-mail SignUp
to-configure-it-in-linux)
Average: 5 (4 votes)
(/san-vs-nas-difference-
between-storage-area-network-and-
network-attached-storage) how to add an init
Storage Area Network script for nginx
and Network Attached service (/how-add-init-
Storage (/san-vs-nas- script-nginx-service)
difference-between-
storage-area-network- Average: 5 (5 votes)
and-network-attached-
storage)
Archives (/taxonomy/term/2) -
54 comment(s)
(/software-raid-1-configuration-
(https://www.slashroot.in/san-
linux)
vs-nas-difference-between-
storage-area-network-and- Software RAID 1
network-attached- Configuration in Linux
storage#comments#comments) (/software-raid-1-
configuration-linux)
(/linux-booting-process-step- (/httperf-web-server-
step-tutorial-understanding-linux-boot- performance-test)
sequence) httperf web server
Linux Booting performance test
Process: A step by (/httperf-web-server-
step tutorial for performance-test)
understanding Linux
boot sequence (/linux-
Average: 5 (1 vote)
booting-process-step-
step-tutorial-
understanding-linux-
boot-sequence)
(/how-to-configure-split-
Archives (/taxonomy/term/2) - horizon-dns-in-bind)
40 comment(s)
How To Configure
(https://www.slashroot.in/linux-
booting-process-step-step-
Split Horizon DNS in
tutorial-understanding-linux- BIND (/how-to-
Send Me Article Updates Via E-mail SignUp
boot-
sequence#comments#comment configure-split-horizon-
s)
dns-in-bind)
Ch
an
(/changing-timezone-linux)
gin
g Timezone in Linux
(/changing-timezone-
linux)
Average: 5 (1 vote)
Be a fan on Facebook
sarath@slashroot.in (http://www.facebook.com/pages/Slashrootin-
(mailto:sarath@slashroot.in) A-technical-
Blog/101642306662299)
Satish Tiwary
Ph: +919509452488
Email:
satish@slashroot.in
(mailto:satish@slashroot.in)
(/what-is-system-call-in-unix- (/understanding-differentiated-
and-linux) services-tos-field-internet-protocol-
What is a System Call in header)
Unix/Linux (/what-is-system- Understanding Differentiated
Send Me Article Updates Via E-mail
call-in-unix-and-linux) SignUp
Services (TOS) field in
Archives (/taxonomy/term/2) - 2 Internet Protocol Header
weeks 4 days ago (/understanding-differentiated-
services-tos-field-internet-
protocol-header)
Archives (/taxonomy/term/2) -
(/how-configure-mysql-cluster- last view 2 sec ago
multiple-masters-ubuntu-1604)
How To Configure MySQL
Cluster with Multiple Masters
on Ubuntu 16.04 (/how-
configure-mysql-cluster- (/what-dns-zone-file-complete-
multiple-masters-ubuntu-1604) tutorial-zone-file-and-its-contents)
What is a DNS ZONE file: A
Archives (/taxonomy/term/2) - 3 Complete Tutorial on zone
weeks 3 days ago file and its contents (/what-
dns-zone-file-complete-tutorial-
zone-file-and-its-contents)
Archives (/taxonomy/term/2) -
(/how-run-multiple-commands- last view 2 sec ago
parallel-linux)
How To Run Multiple
Commands In Parallel on
Linux (/how-run-multiple-
commands-parallel-linux) (/curl-command-tutorial-linux-
example-usage)
Archives (/taxonomy/term/2) - 2 CURL command Tutorial in
months 4 weeks ago Linux with Example Usage
(/curl-command-tutorial-linux-
example-usage)
Archives (/taxonomy/term/2) -
(/how-increase-size-root- last view 6 sec ago
volume-google-cloud-platform-gcp)
How to Increase the Size of
Root Volume in Google
Cloud Platform - GCP (/how-
increase-size-root-volume- (/how-do-linux-nfs-
google-cloud-platform-gcp) performance-tuning-and-optimization)
How to do Linux NFS
Archives (/taxonomy/term/2) - 3 Performance Tuning and
months 1 day ago Optimization (/how-do-linux-
nfs-performance-tuning-and-
optimization)
Archives (/taxonomy/term/2) -
last view 8 sec ago