Definition: Recursive and Iterative queries

There are two types of queries defined for DNS.  Recursive and (somewhat predictably) non-recursive queries which are called iterative queries.

An iterative query is a query which will return either the answer required, or a reference to another resource (usually another nameserver or some other specific item), and then it’s done.  Iterative queries are very simple, and what everything else is built upon.  See also http://www.zytrax.com/books/dns/ch2/index.html#iterative.  If your nameserver is responsible for being the source of information for a zone, it’s going to need to allow iterative queries from anyone who’s supposed to be able to access that.

A recursive query can be thought of as “plain old nameservice” where a server is given a query for the IP address associated with a name, or the name associated with an IP address.  A recursive query can actually involve quite a bit of work, so they should not be allowed for the general public.  See also http://www.zytrax.com/books/dns/ch2/index.html#recursive.  If you’re running a caching nameserver at home, you will need to allow the hosts on your local network (and no one else) to perform recursive queries.

You may also like...