Computer Networks · TEE · papers

Q6(c) · DNS hierarchy

2023-11-22 · Final 2023-24 / Re-exam 2022-23

Actual paper; 100 marks attempted. Current-syllabus alignment is stated per question.

Q6(c). Explain briefly the hierarchy of name servers used in DNS. [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
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.
LevelExampleMeaning
Root.Top of the namespace
Top-level domain (TLD)com, org, inA child zone below the root
Registered/delegated domainexample.comName under a parent such as com
Subdomain/host labelwww.example.comA 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.

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 ← resolver

Assume 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.