Computer Networks · TEE · papers
Q4(a) · DNS resolution
2025-02-19 · 2023-24 / 2024-25
Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.
Q4(a). Explain the working of the DNS protocol in resolving domain names to IP addresses. Discuss the role of the hierarchical structure of DNS servers in this process. [10 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.
| 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
- 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.
- 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.
- 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.
- 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
- A client stub resolver normally asks a recursive resolver for the answer. If a usable cached result exists, the resolver can return it.
- 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.
- 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.
Yaad rakho: Full path unique; www label akela unique nahi.
Worked resolution example: www.xyz.com
Client → recursive resolver → root (.)
→ .com TLD
→ authoritative server for xyz.com
Client ← final A/AAAA answer ← resolverAssume a cache miss and that the name exists. (1) The client asks its resolver for www.xyz.com. (2) A root server refers the resolver to .com servers. (3) A .com server refers it to authoritative servers for xyz.com. (4) An authoritative server returns the applicable A/AAAA record, or a CNAME that must be followed. (5) The resolver returns the answer and caches it according to TTL. No real IP address for this domain is assumed. Root and TLD servers normally supply referrals here, not the final host address.