Domain Name System
Introduction
- The Domain Name System (DNS) is responsible for translating hostnames into IP addresses.
- It operates as:
- A distributed database implemented across a hierarchy of DNS servers.
- An application-layer protocol enabling hosts to query this database.
Distributed, Hierarchical Database
- DNS is distributed globally across multiple servers to handle scalability.
- These servers are structured in a hierarchical fashion, ensuring efficient resolution of domain names.
Types of DNS Servers
DNS servers are categorized into three hierarchical classes:
Root DNS Servers
- The top-level servers that direct queries to appropriate TLD servers.
- There are 13 root server clusters worldwide.
Top-Level Domain (TLD) DNS Servers
- Responsible for handling domain extensions like
.com
,.org
,.net
, etc. - These servers forward queries to authoritative DNS servers.
- Responsible for handling domain extensions like
Authoritative DNS Servers
- Maintain records for specific domains (e.g.,
example.com
). - Provide final IP address resolutions for queries.
- Maintain records for specific domains (e.g.,
Recursive vs. Iterative DNS Queries
Recursive DNS:
- The server takes full responsibility for resolving the query.
- It queries other DNS servers on behalf of the client until an answer is found.
Iterative DNS:
- The server provides the best available answer but may refer the client to other DNS servers.
- The client must follow up on the next query.
DNS Resource Records (RRs)
- DNS servers store Resource Records (RRs), which provide hostname-to-IP mappings.
- A resource record consists of four fields:
- Name – The domain name (e.g.,
www.example.com
). - Value – The corresponding IP address or another DNS name depending on the type.
- Type – The type of DNS record.
- TTL (Time-To-Live) – The time the record remains valid before refresh.
- Name – The domain name (e.g.,
Common DNS Record Types
- A (Address Record): Maps the hostname to it's IP address.
- NS (Name Server Record): Specifies an authoritative name server for the domain.
- CNAME (Canonical Name Record): Maps an alias name to a canonical domain name.
Reference Books
- Kurose, J. F., & Ross, K. W. Computer Networking: A Top-Down Approach. Pearson.
- Tanenbaum, A. S., & Wetherall, D. J. Computer Networks. Pearson.