← Lessons

quiz vs the machine

Silver1100

Networking

Recursive vs Iterative Resolvers

Who does the legwork of chasing a name down the tree.

4 min read · intro · beat Silver to climb

Two Styles of Lookup

DNS lookups come in two modes that differ by who chases the answer. The distinction explains why your laptop asks one question yet a resolver may ask many.

Recursive Resolution

In a recursive query the client asks a resolver for the final answer and expects a complete reply. The resolver takes on all the work, asking other servers as needed and returning only the finished address.

  • The client sends one question and waits.
  • The resolver hides the multi step search behind a single response.
  • This is what your operating system asks of its configured resolver.

Iterative Resolution

In an iterative query a server that does not know the answer returns a referral instead. It points the asker toward a server closer to the answer rather than solving it.

  • Root and top level domain servers answer iteratively with referrals.
  • The recursive resolver follows each referral step by step.
  • This keeps the busy upper servers from doing per client work.

How They Combine

The resolver is recursive toward you but iterative toward the tree, absorbing the round trips so each authoritative server only answers what it owns.

Key idea

A recursive query asks for the full answer, while an iterative query returns a referral, and resolvers act recursively to clients but iteratively toward root and top level domain servers.

Check yourself

Answer to earn rating on the learn ladder.

1. What does a server return for an iterative query when it lacks the answer?

2. How does a resolver behave toward the client and toward the tree?