Definition of Iterative Query in Network Encyclopedia.
What is Iterative Query?
Iterative Query is a DNS query in which a name server contacts a second name server to perform a name lookup.
How Iterative Query works?
In a typical Internet name lookup (for example, www.alpine.expedia.com), a resolver sends a recursive query to a locally accessible name server such as a name server maintained by your local Internet service provider (ISP).
If the local name server cannot resolve the name because it is outside of its zone of authority and it is configured as a forwarder, the server performs an iterative query to a root name server, which responds with the IP address of a name server whose zone of authority includes the desired top-level domain (.com).
The local name server then performs an iterative query with this top-level name server, which responds with the IP address of a second-level name server whose zone of authority includes the desired second-level domain (expedia.com).
The local name server contacts this second-level name server and resolves the fully qualified domain name (FQDN) into its IP address or returns an error if the query cannot be resolved.
Difference between iterative and recursive DNS query
A recursive query is a query in which the DNS server, who received your query will do all the job of fetching the answer, and giving it back to you. During this process, the DNS server might also query other DNS server’s on the internet on your behalf, for the answer.
In an iterative query, the name server, will not go and fetch the complete answer for your query but will give back a referral to other DNS server’s, which might have the answer.