Back to the 2024 paper

Module 5: Application Layer & Security

20247m

Explain recursive resolution and iterative resolution in name address resolution.

Worked SolutionAI Assisted

Name-address resolution in DNS

A client (the resolver) must convert a domain name such as www.example.com into an IP address. DNS is a hierarchical, distributed database of servers: root servers → TLD servers (.com) → authoritative servers (example.com), plus a local (recursive) DNS server of the ISP or organisation. The lookup can be done in two ways.

1. Recursive resolution

The client asks a DNS server to do the entire job. If that server does not know the answer, it contacts other servers on the client's behalf and returns only the final answer (or an error).

Client -> Local DNS: "IP of www.example.com?"
           Local DNS -> Root -> TLD -> Authoritative (chain)
           <- final IP address
Client <- Local DNS: 93.184.216.34

Characteristics:

  • Burden is on the queried server; the client sends one query and gets one answer.
  • The server usually caches the result, speeding up later queries.
  • Client-to-local-server queries are normally recursive.

2. Iterative resolution

The client (or the local server) asks a server, and if the server cannot answer it returns a referral: the address of another server that is closer to the answer. The asker then queries that next server itself, repeating until the answer is found.

Local DNS -> Root server:  "www.example.com?"
          <- referral: ask the .com TLD server
Local DNS -> TLD server:   "www.example.com?"
          <- referral: ask ns1.example.com
Local DNS -> Authoritative: "www.example.com?"
          <- 93.184.216.34

Characteristics:

  • Burden is on the requester; each server does minimal work.
  • Servers reply immediately with the best information they have.
  • Root and TLD servers normally answer only iteratively (to protect them from overload).

Comparison

Basis Recursive Iterative
Who does the work The queried server resolves fully The requester follows referrals itself
Reply to the requester Final answer (or error) Answer or a referral to another server
Load on the server High Low
Number of queries by the client One Several
Typical use Client → local DNS server Local DNS server → root / TLD / authoritative servers
Caching benefit Server caches the final answers Requester caches each step

In practice the two are combined: the host sends a recursive query to its local DNS server, which then performs iterative queries against the root, TLD, and authoritative servers and returns the final IP address to the host.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.