- Asked 3/15
- 2075 Asoj · 2+6 marks
- 2073 Shrawan · 1+4 marks
- 2071 Chaitra · 10 marks
DNS and its working mechanism
Short answer
DNS is a distributed hierarchical database mapping domain names to IP addresses, split into zones managed by authoritative servers with root, TLD, and local resolvers. Resolution asks servers iteratively or recursively, then caches the reply for the TTL; features include delegation, replication, caching, and scalability.
What is DNS (Domain Name Service)? Explain the DNS working mechanism with features and suitable example. (Why is naming necessary in distributed system? Justify that DNS is a distributed hierarchical database system.)
The Domain Name System (DNS) is a distributed, hierarchical naming service of the Internet that maps human friendly domain names (www.tu.edu.np) to IP addresses and other attributes (mail servers, aliases).
Why naming is needed: names are easy to remember, are independent of the physical address, allow a resource to move without users noticing (location transparency), and let resources be shared and found by many users.
Distributed and hierarchical: the name space is a tree. The root has top-level domains (com, org, edu, np), below them are second-level domains (edu.np), then organisations (tu.edu.np) and hosts. No single server holds the whole database. The tree is split into zones, each managed by one organisation with its own authoritative servers. Delegation passes authority downwards, and replication of each zone (primary and secondary servers) gives fault tolerance. This is why DNS is a distributed hierarchical database.
Name servers
- Root servers: know the addresses of the top-level domain servers.
- TLD servers: know the authoritative servers of each second-level domain.
- Authoritative servers: hold the actual records of a zone (A, AAAA, MX, NS, CNAME, PTR).
- Local (resolver) server: run by the ISP or organisation, accepts the client's request and does the lookup, with a cache.
Working mechanism (name resolution)
Client -> Local DNS -> Root -> .np TLD -> edu.np -> tu.edu.np
^ | <----- referrals / answers ------|
+----------+ answer IP, cached with TTL
- The application calls the resolver to find www.tu.edu.np.
- The resolver checks its cache; if present it returns the answer.
- Otherwise it asks the local DNS server (recursive query).
- The local server asks a root server, which refers it to the .np server.
- The .np server refers it to the edu.np server, which refers it to the tu.edu.np authoritative server.
- The authoritative server returns the A record (IP address).
- The local server caches the reply for the TTL and returns it to the client, which connects to the IP.
Resolution methods: iterative (the server returns the next server to ask, the resolver continues) and recursive (the server does the whole lookup for the client). Multicast and non-recursive server-controlled navigation are other variants.
Features: hierarchical naming, distribution of administration, replication, caching with TTL, scalability, and support for many record types.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Stateful/stateless and DNS working · Distributed System, chapter 2
- Name service and name resolution · Distributed System, chapter 2
- Need of naming; Sun NFS · Distributed System, chapter 2
- Autonomous vs distributed system · Distributed System, chapter 1
- Models of distributed system · Distributed System, chapter 1
- True distributed system; middleware organisation · Distributed System, chapter 3
- Need and services of DNS · Internet and Intranet, chapter 3
- Internet vs Intranet and DNS need · Internet and Intranet, chapter 1
- Types of doors by working mechanism · Building Technology, chapter 6 · asked 2×
- Working mechanism of WDM · Data Communication, chapter 6