Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Recursive lookup

Direct answer

In a recursive lookup the resolver does the work for the client: it queries root, TLD and authoritative servers in turn (or uses its cache) and returns the final answer.

When to use this

Use it when a resolver is slow or fails, to follow the lookup from root to the authoritative server.

First 30 seconds

1. Recursive lookup: resolver queries root, TLD, then authoritative servers.

2. Clients ask resolvers recursively.

3. Caching speeds repeated lookups.

4. Failures at any delegation step break resolution.

5. +trace shows each step.

Operational verification

client → resolver → root → TLD → authoritative → answer

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE
Scope / prerequisiteUse it when a resolver is slow or fails, to follow the lookup from root to the authoritative server.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification & troubleshooting Narrow the fault

1. Record queried name/type and resolver.

2. Test reachability and UDP/TCP 53.

3. Query the recursive resolver.

4. Trace delegation/authority when needed.

Step 2 Recursion problems Narrow the fault
  • Resolver cannot reach root/TLD servers (outbound UDP/TCP 53 blocked) — configure forwarders or open the firewall.
  • EDNS fragmentation issues → set edns-udp-size 1232.
  • DNSSEC validation failures return SERVFAIL (dig +cd works).
  • Open recursion to the internet (amplification abuse) — restrict with ACLs.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points
  • A/AAAA map names to IPv4/IPv6; CNAME aliases one name; PTR is reverse lookup
  • Recursive and authoritative roles answer different questions
  • UDP 53 is common, while TCP 53 is required for some large replies and zone operations
  • NXDOMAIN, NODATA, SERVFAIL and timeout indicate different boundaries; TTL controls cache lifetime.
Key checks
  • dig <name> +trace — iterative path from root
  • dig @<resolver> <name> — recursive answer
ReferenceWhat it is1 section · depth on demand

Walk-through

1. Client asks its recursive resolver for www.example.com (RD flag set).

2. Resolver asks a root server → referral to .com servers.

3. Asks a .com server → referral to example.com name servers.

4. Asks the authoritative server → answer.

5. Caches the answer for its TTL and replies to the client (RA flag set).

dig +trace www.example.com shows each step.

ReferenceWhy it matters1 section · depth on demand

How it works

A client sends one recursive query to its resolver. If the answer is not cached, the resolver walks the tree itself: root servers → TLD servers (e.g. .com) → the domain's authoritative servers, following referrals until it gets the answer. It caches each step for its TTL and returns the final answer to the client.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

See the iterative walk the resolver performs

$ dig +trace www.example.com
.                 518400 IN NS a.root-servers.net.
com.              172800 IN NS a.gtld-servers.net.      ;; from a.root-servers.net
example.com.      172800 IN NS a.iana-servers.net.      ;; from a.gtld-servers.net
www.example.com.     300 IN A  192.0.2.80            ;; from a.iana-servers.net

+trace makes dig do the iteration itself; a normal dig @resolver sends one recursive query and shows only the final answer.

Flags and status codes that tell you where it failed

OutputMeaning
flags: qr rd raRecursion desired and available — resolver did the work
no ra flagServer is not recursive for you (authoritative-only or ACL)
status: NOERROR, empty answerName exists, no record of that type (NODATA)
status: NXDOMAINName does not exist (negatively cached for the zone's SOA minimum, RFC 2308)
status: SERVFAILResolver could not get a valid answer — unreachable authoritative servers or DNSSEC validation failure
status: REFUSEDResolver does not serve this client

Isolating the layer

1. dig @resolver name — what clients see.

2. dig @resolver name +cd — same with DNSSEC checking disabled; if this works and step 1 SERVFAILs, the zone's signatures are broken.

3. dig @authoritative name +norecurse — what the source of truth says.

4. Compare TTLs: an old answer still cached explains "fixed but still broken".

Cisco IOS as a client

ip name-server 192.0.2.53 192.0.2.54
ip domain lookup source-interface Loopback0

Resolvers must allow recursion only for internal clients; open recursive resolvers are used for amplification attacks.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 1034

Authoritative/upstream documentation reviewed for bounded claims in IP Services → DNS → Recursive lookup. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc1034.html · confidence 94%
Confirmation

Confirm action

Continue?