My understanding of iterative vs. recursive DNS queries

Discussion in 'DNS Server' started by Spin, Jun 19, 2009.

  1. Spin

    Spin Guest


    My understanding of iterative vs. recursive DNS queries is as follows. Is
    this correct?

    Iterative DNS queries are performed by a DNS server in such a fashion that
    it queries multiple DNS servers for an answer. While recursive queries
    performed by a DNS server (or client resolver) simply go to the first DNS
    Server configured in it's TCP/IP configuration (if it answers, it doesn't it
    goes to the second one in the list) for an answer and that's it.
    Spin, Jun 19, 2009
    1. Advertisements

  2. Hi Spin,

    Well, this depends on context and which machine is doing what with a query.

    Reason why I say that, is basically a recursive query means the machine send the query, such as a client machine, or even a DC, etc, to a DNS server for resolution. Recursive name queries are generally made by a DNS client to a DNS server, or by a DNS server that is configured to pass unresolved name queries to another DNS server, in the case of a DNS server configured to use a forwarder.

    Interative queries is a request from a client tells the DNS server that the client expects the best answer the DNS server can provide immediately, without contacting other DNS servers. The process then relies on the client to continue the process possibly by using a referral where the DNS server supplying the client NS or A records of a DNS server that is closer to the namespace which may possibly provide the answer. However we don't see that with the normal sense of the word, 'query,' when a client sends a request to a DNS server, which we are more familiar with. However, with a recursion request from a client to a DNS server, which as I said is what we normally think of using the term 'query,' the DNS server will do its best to resolve it, either by using the Root Hints, which is essentially an interative query to the Roots to devolve the namespace from the TLD backwards, or a query to a Forwarder, if configured with a Forwarder, which is essentially a recursion request.

    Here are some Mircosoft links on it:

    Recursive and Iterative QueriesRecursive and Iterative Queries. With a recursive name query , the DNS client requires that the DNS server respond to the client ...

    How DNS query works: Domain Name System(DNS)Jan 21, 2005 ... As DNS servers process client queries using recursion or iteration, they discover and acquire a significant store of information about the ...

    To go further...

    The following quote is a non-Microsoft definition, but it still applies, no matter what DNS server service is used. The quote was taken from:

    "Since isn't authoritative for and hasn't recently communicated for any host that is, it begins a query of its own on the user's behalf. The process of asking one or more queries in order to answer other queries is called recursion."

    Does that make sense so far?

    So to take it a little further...

    Keep in mind, recursion is not necessarily resolution. The reasons is the process of following a chain of delegations from one set of content DNS servers to another,starting at some root servers, is termed "resolution"; as exemplified in section 6.3 of RFC 1034. It is not termed "recursion". "Recursion" is something else. The definition of "recursion" is the act
    of a server sending back-end queries (of _whatever_ sort) to another server. Both query resolution, where back-end queries are sent to content DNS servers, and forwarding, where back-end queries are sent to proxy DNS servers, are forms of recursion.


    Resoluton can be provided many times from its own authoritative zones where no recursion involved.
    A query can be resolved from its cache where no recursion involved (directly, because it's in its cache).
    By forwarding, with the forwardee doing the resolution where recursion is involved. However if it forwards it out, it essentially becomes an interative query because it's proxying the request elsewhere for the client, such as an indirect query for the client, but essentially this can be viewed as an recursive query by the DNS server itself acting as a recursive client.
    Or DNS can perform the query resolution itself where recursion is involved. An example is when Forwarding is not enabled, and the DNS server uses the Root Hints, where essentially it's querying the Roots in a recursive manner devolving the DNS name hierarchy from the TLD backwards.

    Got it?

    Next week we'll discuss helion particles (a-particle of the helium-3 nucleus) and their mass.


    This posting is provided "AS-IS" with no warranties or guarantees and confers no rights.

    Please reply back to the newsgroup/forum to benefit from collaboration among responding engineers, as well as to help others benefit from your resolution.

    Ace Fekay, MCSE 2003 & 2000, MCSA 2003 & 2000, MCSA Messaging, MCT
    Microsoft Certified Trainer

    For urgent issues, you may want to contact Microsoft PSS directly. Please check for regional support phone numbers.
    Ace Fekay [Microsoft Certified Trainer], Jun 30, 2009
    1. Advertisements

  3. Ace Fekay [Microsoft Certified Trainer], Jun 30, 2009
  4. Spin

    Spin Guest

    Spin, Jul 20, 2009

  5. My pleasure!

    Ace Fekay [MCT], Jul 20, 2009
  6. Spin


    Jan 23, 2013
    Likes Received:
    difference between iterative and recursive dns query

    Hi all..

    This is the most confusing topic in dns for most of the people out there.
    All TLD servers & root servers are always iterative in nature..

    You local dns server can be configured as iterative or recursive...Infact, all dns servers must be iterative atleast.
    The complete explanation can be found here.
    sarathp, Jan 23, 2013
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.