liveBook · Manning

Recursive dns query

As explained in Acing the CCNA Exam: Volume 2 Advanced Networking and Security

A recursive DNS query requests that a DNS server return a definite answer or an error for the client rather than referring the client elsewhere.

A recursive DNS query asks a configured DNS server to return a definite result: an IP address or an error if the name cannot be resolved. The responding server, called a recursive resolver, performs additional resolution work on the client's behalf. section 3.1.4 section 3.3

A typical recursive resolution proceeds as follows:

  • A client such as PC1 sends a recursive query for mail.google.com to its configured DNS server, such as 8.8.8.8. section 3.1.4
  • The recursive resolver checks its cache and, if necessary, sends iterative queries to root, TLD, and authoritative DNS servers. section 3.1.4 section 3.3
  • The resolver follows referrals, receives the definitive response, and returns the answer or an error to the client. section 3.1.4 section 3.3
  • Caching reduces repeated queries; a Cisco router can cache responses while forwarding client queries to an upstream DNS server. section 3.2.2 section 3.3

Cisco IOS forwarding

Configure a router with ip dns server so it answers LAN clients, and configure an upstream server with ip name-server. In the illustrated exchange, PC1 sends a recursive query to R1; R1 sends a recursive query to 8.8.8.8, caches the response, and replies to PC1. Verify learned and manual mappings with show hosts. section 3.2.2

Figure 3.4 Recursive and iterative DNS requests resolve a domain name. In step 1, PC1 attempts to access mail.google.com. Steps 2 and 9 are a recursive DNS exchange between PC1 and the 8.8.8.8 DNS server. Steps 3 through 8 are iterative DNS exchanges between 8.8.8.8 and other DNS servers. Step 10 is an HTTPS exchange between PC1 and mail.google.com.

Trace the complete mail.google.com resolution: PC1 and 8.8.8.8 use a recursive exchange, while 8.8.8.8 uses iterative exchanges with DNS hierarchy servers. section 3.1.4

How Acing the CCNA Exam: Volume 2 Advanced Networking and Security covers it

How deep it goes
Traces client, resolver, root, TLD, and authoritative exchanges, including caching, but does not detail DNS packet internals.
Examples
Uses mail.google.com, PC1, 8.8.8.8, Cisco R1, and youtube.com to illustrate resolution, forwarding, caching, and verification.
What it assumes
Assumes basic DNS hierarchy knowledge and teaches recursive versus iterative lookup behavior from that foundation.
What you can do after
Operate/configure Cisco IOS DNS forwarding with ip dns server, ip name-server, and show hosts verification.
How it connects
Contrasts recursive queries with iterative queries and connects them to DNS caching, recursive resolvers, and authoritative DNS servers.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the CCNA Exam: Volume 2 Advanced Networking and Security. The section links point to the parts of the book it draws on.