WalzoneInterview Prep
📞 Interviewing soon? Practice with a realistic AI mock phone interview — it calls you, then scores you. First 15 min FREE →

Computer Networking · Intermediate · question 36 of 100

What is the difference between the iterative and recursive query process in DNS resolution?

📕 Buy this interview preparation book: 100 Computer Networking questions & answers — PDF + EPUB for $5

DNS (Domain Name System) is a critical protocol used on the internet to resolve domain names into IP addresses. DNS resolution can be carried out through two methods- iterative and recursive resolution.

In recursive resolution, the DNS client sends a query to a DNS resolver, which then sends requests to other DNS servers until it gets a response. The resolver takes care of the entire process, and the client only receives the final result. Recursive resolution is typically used by end-user devices, such as laptops and smartphones, which do not have their own dedicated DNS servers.

On the other hand, iterative resolution requires the client to initiate the process by sending queries to DNS servers until it receives the final result. The client is responsible for the whole process, which involves querying each DNS server, analyzing the responses, and determining the next DNS server to query until it reaches the final resolution.

Here’s an example to illustrate the difference between iterative and recursive resolution:

Suppose a client wants to resolve the domain name www.example.com. In recursive resolution, the client sends a query to the resolver, which starts the resolution process. The resolver can then send requests to various DNS servers, such as root servers, top-level domain (TLD) servers, and authoritative servers until it receives the final IP address. The resolver then sends the IP address back to the client.

In iterative resolution, the client initiates the process by sending its query to a DNS server. If the queried DNS server is able to resolve the domain name, it responds with the IP address. If not, the server sends a referral response to the client, which contains the next DNS server to query. The client continues this process until it receives the final IP address.

In conclusion, iterative resolution requires more effort from the client in terms of querying and analyzing responses, whereas recursive resolution shifts that burden to the resolver. Both techniques have their strengths and weaknesses and are used in different scenarios depending on the requirements of the client and the characteristics of the DNS infrastructure.

Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic Computer Networking interview — then scores it.
📞 Practice Computer Networking — free 15 min
📕 Buy this interview preparation book: 100 Computer Networking questions & answers — PDF + EPUB for $5

All 100 Computer Networking questions · All topics