previous |
start |
next
Recursive Queries
A host within a specified domain (eg a machine at Bendigo, in
domain bendigo.latrobe.edu.au
) is configured to
"know" the IP address of its local nameserver. What happens when it
sends a query for a non-local name, (eg
amazon.com
)? The sequence of events is
something like:
- The local nameserver will forward the query to its "parent"
nameserver -- in our case, the nameserver for domain
latrobe.edu.au
.
- This nameserver, in turn, (usually)
forwards the query recursively up the "tree", to
where a root nameserver will pass it to a
nameserver for the
.com
domain, which will have
the desired name-to-address mapping.
- The result of the query is then passed back through the chain
of nameservers (each of whom will normally cache
the information), finally arriving at the originating host. This
process is called a recursive query.
It's obvious that recursive queries could
be quite slow. The DNS provides a way of "short-circuiting" the
whole process. If (for example) the local nameserver already knows
(due to caching) the IP address of a nameserver for the
.com domain in the above example, it can contact
it directly, thus avoiding many recursive stages. This is called an
iterative query. In practice, most (all?) queries
to root nameservers are iterative. Every nameserver is configured
to know the IP address of at least one root nameserver.
previous |
start |
next