BIT254 ยท 2081 ยท 5 marks
What is the major purpose of DNS? Explain how DNS resolve its domain name.
What is the major purpose of DNS? Explain how DNS resolve its domain name. [5]
Quick answer
The major purpose of DNS (Domain Name System) is to translate human-readable domain names into machine-readable IP addresses (and vice versa).
Domain Name System (DNS)
Major Purpose of DNS
Since computers communicate using numerical IP addresses (e.g., 192.168.1.1), but humans find it easier to remember names (e.g., www.google.com), DNS acts as a distributed hierarchical naming system that maps domain names to their corresponding IP addresses automatically, without requiring users to memorize numeric addresses.
How DNS Resolves a Domain Name
DNS resolution follows a step-by-step hierarchical query process:
DNS Resolution Steps
Example: Resolving www.example.com
Step 1: Browser Cache Check
- The user types
www.example.comin the browser. - The browser first checks its local cache to see if the IP address is already stored from a previous visit.
Step 2: OS / Local Hosts File Check
- If not found in browser cache, the OS checks the local hosts file and its own DNS cache.
Step 3: Query to Recursive Resolver (Local DNS Server)
- If still unresolved, the query is sent to the Recursive Resolver (usually provided by the ISP or configured manually, e.g.,
8.8.8.8). - The recursive resolver takes responsibility for finding the answer.
Step 4: Query to Root Name Server
- The recursive resolver contacts a Root Name Server (there are 13 sets globally).
- The root server does not know the IP of
www.example.com, but it refers the resolver to the TLD (Top-Level Domain) Name Server for.com.
Step 5: Query to TLD Name Server
- The resolver queries the TLD Name Server for
.com. - The TLD server responds with the address of the Authoritative Name Server for
example.com.
Step 6: Query to Authoritative Name Server
- The resolver queries the Authoritative Name Server for
example.com. - This server holds the actual DNS records and returns the IP address (e.g.,
93.184.216.34) forwww.example.com.
Step 7: Response Returned to Client
- The recursive resolver caches the result (for the TTL duration) and sends the IP address back to the client.
- The browser then uses the IP address to establish a connection with the web server.
Diagram of DNS Resolution
Client
|
v
Recursive Resolver (ISP/Local DNS)
|
v
Root Name Server --> "Go to .com TLD server"
|
v
TLD Name Server (.com) --> "Go to example.com Authoritative server"
|
v
Authoritative Name Server (example.com) --> Returns IP address
|
v
Recursive Resolver --> Client (IP delivered)
Summary Table
| Step | Component | Role |
|---|---|---|
| 1 | Browser/OS Cache | Check locally stored records |
| 2 | Recursive Resolver | Manages the full query on behalf of client |
| 3 | Root Name Server | Directs to correct TLD server |
| 4 | TLD Name Server | Directs to authoritative server |
| 5 | Authoritative Name Server | Returns the final IP address |
Note: DNS primarily uses UDP port 53 for queries and TCP port 53 for zone transfers.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.