Address Resolution in DNS (Domain Name Server) (original) (raw)

Last Updated : 12 Dec, 2025

DNS address resolution converts human-readable domain names into IP addresses that computers use to locate servers. It works like a digital phonebook, mapping names to numbers so websites can load correctly.

key_components_of_dns

**The Role of DNS Resolver in Address Resolution

DNS operates as a **client-server application. A host that needs to map a domain name to an IP address (or vice versa) calls a DNS client called a **resolver. The resolver accesses the nearest DNS server with a mapping request. Here's how the process works:

**Step 1: The resolver sends a query to the nearest DNS server.
**Step 2: If the server has the required information, it returns the result. If not, it refers the resolver to other DNS servers.
**Step 3: The resolver checks if the response is correct and delivers it to the requesting application or user.

How Does Address Resolution Work in DNS?

Address resolution in DNS can be broken down into the following categories:

address_resolution_in_dns

A) Mapping Domain Names to IP Addresses

When a user types a domain name into their browser, the DNS system queries various DNS servers to find the corresponding IP address. The resolver checks different domain sections (e.g., generic or country domains) to determine the correct IP address for the given domain name.

B) Mapping IP Addresses to Domain Names

A client can send an IP address to a server to be mapped to a domain name. This is called a PTR query. To answer queries of this kind, DNS uses the inverse domain. However, in the request, the IP address is reversed and two labels, in-addr and arpa are appended to create a domain acceptable by the inverse domain section.

For example. if the resolver receives the IP address 132.34.45.121, the resolver first inverts the address and then adds the two labels before sending. the domain name sent is "121.45.34.132.in-addr.arpa", which is received by the local DNS and resolved.

To find a particular DNS requesting host place its query to the Local DNS Server with a mapping request. If it has the information, the resolver is satisfied else the resolver is referred to other servers or other servers are asked to provide the information. After the resolver, gets the response, it checks whether the response is correct or not. If the response is correct, the response is passed to the process that requested it, or else the name query fails.

**Types of DNS Resolution

**1. Recursive Resolution

In **recursive DNS resolution, the client (resolver) asks the DNS server to return the **final answer—not referrals.
This means the server receiving the query becomes **responsible for completing the entire lookup, querying other servers on behalf of the client until the answer is found or an error is returned.

**How Recursive Resolution Works

**Step 1. Client Sends a Recursive Query

**Step 2. Local DNS Resolver Searches Its Cache

**Step 3. Resolver Queries the Root Name Server

Even though root gives a referral, the resolver continues the recursion on behalf of the client, so recursion still applies.

**Step 4. Resolver Queries the TLD Server

**Step 6. Resolver Returns the Response to the Client

**Key Property:
The client only sends **one query—the local resolver performs all subsequent steps.

Recursive and Iterative Resolution

**2. Iterative Resolution

Iterative Resolution is the DNS lookup process in which each DNS server returns the best possible answer it has, without performing further queries on behalf of the client. Instead, the client (resolver) is responsible for repeatedly querying the next server in the hierarchy.

This mechanism reduces the load on DNS servers and makes the client drive the entire resolution process.

**How Iterative Resolution Works

  1. **Client → Local DNS Resolver
    The application sends a DNS query (e.g., _www.example.com) to the local DNS resolver.
  2. **Local DNS Server Query to Root Server
    If the local server does not have the record cached, it sends an iterative query to a Root DNS Server.
  3. **Root Server Response (Referral)
    The Root Server does _not resolve the domain.
    Instead, it returns the IP address of the corresponding Top-Level Domain (TLD) serverfor example, the .com TLD server.
  4. **Local Server → TLD Server
    The local DNS server now queries the returned TLD server.
  5. **TLD Server Response (Referral)
    The TLD server also does not perform further lookups.
    It returns the IP address of the Authoritative DNS Server for the domain.
  6. **Local Server → Authoritative DNS Server
    The local server queries the authoritative server, which finally returns the actual IP address of the domain.
  7. **Response Returned to Client
    The IP address is delivered back to the original requesting application.

**Key Characteristics of Iterative Resolution

**Example

To resolve **www.example.com:

Step Server Contacted Response Returned
1 Local DNS → Root Server Returns IP of .com TLD server
2 Local DNS → .com TLD Server Returns IP of authoritative server for example.com
3 Local DNS → Authoritative Server Returns final IP of www.example.com

This final answer is cached by the local server for future queries.

Caching Mechanism in DNS Resolution

DNS caching is a performance-enhancing mechanism used by DNS servers and client resolvers to temporarily store recently resolved domain-to-IP mappings. When a DNS server receives a response from another server during resolution, it stores this information in its **cache so future queries for the same domain can be answered quickly without repeating the entire lookup process.

**Why Caching Is Used

DNS resolution can involve multiple servers (Local DNS → Root → TLD → Authoritative server). This process is time-consuming and increases network traffic.
Caching reduces:

**How DNS Caching Works

  1. A DNS server queries another server for a domain name.
  2. When it receives the response (IP address), it stores the mapping in its cache memory.
  3. The cached entry includes a TTL (Time-to-Live) value assigned by the authoritative DNS server.
  4. For subsequent requests: The server first checks its cache, if a valid (non-expired) entry exists, it returns that immediately, such a response is labeled “Non-authoritative”, indicating it came from cache, not from the authoritative server.

**Problems with DNS Caching

Although caching improves performance, it introduces a few challenges:

**TTL and Cache Maintenance

dns_caching_flow

Comparison of Iterative and Recursive Resolution

**Property **Iterative Resolution **Recursive Resolution
**Server Response Returns the best match or a referral Returns the requested mapping or an error message
**Query Propagation Each server that does not know the mapping sends the IP address of the next server Only the local server sends the query to the next server
**Server Load Higher load on servers since each server in the chain must be queried Lower load on servers since only the local server is queried
**Response Time Longer response time since multiple servers may need to be queried Shorter response time since only one or a few servers are queried
**Cache Usage Lower cache hit rate since referrals are returned instead of mappings Higher cache hit rate since mappings are returned directly
**Security Lower security since each server in the chain may potentially modify the response. Higher security since only the local server is trusted to return a valid response.

Address Resolution Failures and Troubleshooting

Address resolution can occasionally fail due to various issues, such as:

Common Troubleshooting Steps: