recursive vs iterative

Kevin Darcy kcd at daimlerchrysler.com
Fri Aug 25 21:41:58 UTC 2000


john.g.budnichuk at verizon.com wrote:

> I know that a iterative query response may include either a destination address
> or referral address of another name server. If the response is the address of
> another name
> server, does that mean the resolver has to send the query to that name server?

Basically, yes, assuming "resolver" is being used in a generic sense. When a
nameserver performs recursion for a client, it is acting as a "resolver" for that
client.

Oftentimes, though, "resolver" is equated with "stub resolver", and such a
resolver cannot follow referrals and therefore does not use iterative querying
unless explicitly told to (e.g. the "norecurse" option in nslookup or "+norec" in
dig).

> The DNS and
> BIND 3rd edition book, tries to show this distinction in Figures 2-12 and 2-13;
> however, I don't
> see the differences between iterative and recursive that they try to point out.
> Both figures seem
> to show recursive queries. Can anyone help clarify this topic for me?

The figures show basically the same process, the only difference is that the focus
of 2-12 is the nameserver's progress through the *namespace* whereas 2-13 doesn't
show the namespace at all and focuses on the interactions between servers. In both
diagrams, the client is issuing a recursive query to the box labeled
"nameserver" (2-12) or "A" (2-12), and this nameserver is issuing iterative
queries to other nameservers. If you want a diagram depicting only
*iterative* queries, see 2-16, although the steps in that diagram are abbreviated
because its purpose is to explain the effects of caching.

As a general rule, then: stub resolvers talk recursively to nameservers, and
nameservers talk iteratively to each other. (The "forwarding" mechanism is a major
exception to that general rule.)


- Kevin





More information about the bind-users mailing list