When a user enter any name in its browser, like www.example.com , then that request is first forwarded to the preferred DNS , which in most of the cases is the DNS server of your local ISP. Think of a scenario where preferred DNS us unable to resolve DNS queries. Recursive Query provides us the solution of this problem and resolves our query with best answer.
1. Client enters the website address, like www.example.com.
2. Preferred DNS Server checks its local cache/database the IP address of www.example.com. If it finds, then client will be able to open the website. But if preferred DNS server has no information about its address, then recursive query will be performed.
3. Preferred DNS server will check it root hint file (cache.dns ) and will forward the request to the root DNS server. Here, your preferred DNS server will acts as a DNS client and will forward DNS queries to the Root DNS servers.
4. Root DNS server doesn't have any information about www.example.com domain . The only thing it knows is about a DNS Server that is authoritative for .COM domain. The root DNS server sends the IP address of DNS server responsible for .COM domain to the preferred DNS Server.
5. Preferred DNS Server sends the request to .COM DNS Server. Again, .COM DNS server doesn't know the IP address of www.exmaple.com web site, but knows the authoritative DNS server responsible for example.com domain.
6. .COM DNS server sends the IP address of exmaple.com domain to the preferred DNS Server.
7. Preferred DNS server send the request to example.com for the web site address, which in turn returns the address of web site to the preferred DNS Server.
8. Preferred DNS server sends that information to the client and at last, client is connected to the web server of www.example.com .
If recursive query is disabled, then each client will start sending iterative queries to the DNS server which will generate a lot of DNS queries traffic on the network. It is always recommended to enable recursive query on DNS Servers which will reduce the amount of network traffic generating from these queries and thereby, improving network performance.