Namespace and DNS

Module: B1.5-R5: Data Communications and Computer Networks

Chapter: Application Layer

🔹 Introduction

The Internet consists of billions of devices, each identified by an IP address. Humans cannot remember IP addresses like 142.250.182.78, so we use readable domain names such as google.com. To manage these names and map them to IP addresses, we use:

  • Namespace: Structured naming system
  • DNS (Domain Name System): Distributed database that resolves names to IPs
DNS is one of the most important Application Layer services, enabling everyday activities like browsing websites, sending emails, and accessing online services.
1️⃣ Namespace in Computer Networks

A namespace is a structured naming system that uniquely identifies resources in a hierarchical manner.

✔ Types of Namespaces
  • Flat Namespace: No structure; names must be globally unique (not scalable)
  • Hierarchical Namespace: Tree-like structure; scalable, easy to manage
✔ DNS Uses a Hierarchical Namespace

Similar to an inverted tree:

ROOT (.) ├── Top-Level Domains (TLDs) │ ├── .com │ ├── .org │ ├── .net │ ├── .edu │ └── Country TLDs → .in, .uk, .jp ├── Second-Level Domains → google, amazon, microsoft └── Subdomains → mail.google.com, docs.google.com

Advantages of Hierarchical Namespace:
  • Scalability
  • Distributed management
  • Easy delegation
  • Supports billions of names
2️⃣ Domain Name System (DNS)

DNS is a distributed, hierarchical naming system that maps domain names to IP addresses. It acts like the phonebook of the Internet.

✔ Why DNS?
  • Humans remember names, not IP addresses
  • IP addresses change—DNS ensures continuity
  • Load balancing and redundancy
3️⃣ DNS Components and Architecture
✔ A. DNS Client / Resolver
  • Runs on user’s device
  • Sends queries to DNS servers
✔ B. DNS Servers
  • Root Servers – 13 sets worldwide
  • TLD Servers – manage .com, .org, .in, etc.
  • Authoritative Servers – store domain records
  • Local DNS (Resolver) – ISP or router level
4️⃣ DNS Name Resolution Process
✔ How DNS Finds an IP Address

When user enters: www.example.com

  1. Browser checks cache
  2. OS checks DNS cache
  3. Query sent to Local DNS server
  4. If not found → forwarded to Root Server
  5. Root → directs to TLD server (.com)
  6. TLD → directs to authoritative server
  7. Authoritative server replies with IP
  8. IP returned to user → Browser connects to web server
✔ Diagram (Explained in Words)

User → Local DNS → Root → TLD → Authoritative → Local DNS → User

5️⃣ DNS Record Types
Record TypePurpose
AMaps domain → IPv4
AAAAMaps domain → IPv6
CNAMEAlias name for another domain
MXMail server records
NSAuthoritative nameserver
TXTVerification & SPF records
PTRReverse DNS lookup
SOAStart of authority (domain admin info)
6️⃣ DNS Query Types
  • Recursive Query: DNS server must return final answer
  • Iterative Query: Server returns best possible info
  • Inverse Query: IP → domain lookup (PTR)
7️⃣ Advantages of DNS
  • Easy to use names
  • Distributed database—no single point of failure
  • Scalable for billions of domains
  • Supports load balancing (multiple IPs for a domain)
  • Automatic updates via TTL
✔ Real-World Example: Google DNS Load Balancing

google.com resolves to multiple IPs worldwide to balance traffic and reduce latency.

📝 Conclusion

Namespaces organize domain names hierarchically, while DNS resolves these names to IP addresses using a global, distributed database system. Together, they ensure smooth, human-friendly internet browsing and service access for billions of users daily.