# Q5(b) · Iterative DNS resolution

Subject: Computer Networks

Exam: TEE

Reader: https://deep-learning-study-room.vercel.app/cn/#tee/papers/paper-2024-ai-final/q5b

Canonical: https://deep-learning-study-room.vercel.app/read/cn/tee/papers/paper-2024-ai-final--q5b/

Exact historical variant. Current-syllabus questions solved; excluded topics and source limitations stated.

### Q5(b). The user wants gaia.cs.umass.edu but has no IP address. In the supplied iterative DNS diagram: (1) where does local DNS check before querying root? (2) what server category does the root referral identify? (3) what category does the TLD referral identify? (4) what record carries the returned IPv4 address? (5) is iterative or recursive querying best practice? [5 marks]

### Answer

The **Domain Name System (DNS)** is a distributed hierarchical naming system. Its namespace is a tree with the root at the top. A complete name is the ordered path of labels from a node back to the root. An absolute name may be written with a trailing dot, for example www.example.com.

Swipe across the diagram to read its labels ↔

![DNS namespace: full label paths are unique](https://deep-learning-study-room.vercel.app/cn/fig/tee-dns.f5345fe9fb.svg)

Diagram: DNS namespace: full label paths are unique. Labels: DNS namespace: full label paths are unique | DNS namespace: full label paths are unique | Root . | com | org | example.com | example.org | www.example.com | www.example.org | Same local label “www”; different full names, so no collision.

Root, top-level domains, delegated domain and host labels.

| Level | Example | Meaning |
| --- | --- | --- |
| Root | . | Top of the namespace |
| Top-level domain (TLD) | com, org, in | A child zone below the root |
| Registered/delegated domain | example.com | Name under a parent such as com |
| Subdomain/host label | www.example.com | A label below example.com; a name may own different record types |

## Why names remain unique

1. A parent manages the labels immediately beneath it and does not assign the same child label to two different nodes in that parent’s namespace.
2. The full sequence of labels identifies the node. The local label www can appear below many domains without conflict: www.example.com and www.example.org are different complete names.
3. Administration is delegated: the parent publishes information identifying authoritative servers for a child zone. A domain is a namespace subtree; a zone is the portion administered together, excluding subtrees delegated onward.
4. Multiple names may resolve to one IP address, and one name can return several addresses. Uniqueness of names does not imply a one-name/one-IP rule.

## Resolution

1. A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
2. Otherwise the resolver can query a root server, receive a referral to the relevant TLD, then receive a referral to the authoritative server for the domain.
3. The authoritative server supplies the requested record or a relevant negative response. The recursive resolver returns the result and may cache it according to TTL.

#### Practical example

The labels “mail” under two organizations do not collide because mail.example.com and mail.example.org have different ancestors. DNS delegation distributes administration while preserving a unique full path.

**Yaad rakho:** Full path unique; www label akela unique nahi.

| Part | Answer | Explanation |
| --- | --- | --- |
| 1 | DNS Local | Check the local resolver cache first |
| 2 | DNS TLD | Root supplies a referral toward .edu TLD servers; the response packet itself goes back to local DNS |
| 3 | DNS Authoritative | TLD supplies a referral toward the responsible authoritative servers; response goes back to local DNS |
| 4 | A record | Contains an IPv4 address; AAAA would contain IPv6 |
| 5 | Iterative between the resolver and hierarchy; recursive client-to-resolver | Neither is universally best in every role. Typical deployment combines the two |

The wording “where does the response link” is read as the referral target, not the packet’s network destination. This distinction prevents confusing local DNS with the next server category.
