DNS Query (Lookup - Recursive - Iterative - Non-Recursive)
DNS Lookup Types
- forward lookup - given FQDN find IP Address
reverse/inverse lookup - given IP Address find FQDN
DNS Lookup Commands
DNS Query Resolver Methods
a lookup query can be answered/resolved in 1 of 3 different ways:
- recursive query
- iterative query
- non-recursive query
usually, a lookup query is sent to a DNS Resolver which handles all these cases
Type | Recursive Query | Iterative Query | Non-Recursive Query |
---|---|---|---|
Description | In a recursive query, a DNS client provides a hostname, and the DNS Resolver “must” provide an answer—it responds with either a relevant resource record, or an error message if it can't be found. The resolver starts a recursive query process, starting from the DNS Root Server, until it finds the Authoritative Name Server | In an iterative query, a DNS client provides a hostname, and the DNS Resolver returns the best answer it can. If the DNS resolver has the relevant DNS records in its cache, it returns them. If not, it refers the DNS client to the Root Server, or another Authoritative Name Server which is nearest to the required DNS zone. The DNS client must then repeat the query directly against the DNS server it was referred to. | A non-recursive query is a query in which the DNS Resolver already knows the answer. It either immediately returns a DNS record because it already stores it in local cache, or queries a DNS Name Server which is authoritative for the record, meaning it definitely holds the correct IP for that hostname. In both cases, there is no need for additional rounds of queries (like in recursive or iterative queries). Rather, a response is immediately returned to the client. |
Diagram |
, multiple selections available,