Use it to separate client resolver configuration, transport, delegation, authoritative data and caching failures.
DNS (Domain Name System)
DNS resolves names through recursive resolvers, authoritative servers, caches and typed resource records.
client → resolver → recursion → authoritative → answer cached
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.
5. Compare TTL/cache, DNSSEC status and application behavior.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
ip name-server <dns-server>Primary Commands
Configuration and operational commands for this Topic.
ip name-server <dns-server>ReferenceSet the DNS server used for host name lookups.
Use when: Use at the DNS boundary after prerequisites have been verified.
Quick note: Operational guidance. IP reachability does not prove DNS; one cached answer does not prove authoritative data is correct.
Cisco IOS / IOS XE · mixedip domain lookupReferenceEnable DNS lookups of host names typed at the CLI (default on).
Use when: Use at the DNS boundary after prerequisites have been verified.
Quick note: Operational guidance. IP reachability does not prove DNS; one cached answer does not prove authoritative data is correct.
Cisco IOS / IOS XE · mixeddig <name> <type> +noall +answer +authority +additionalReferenceInspect DNS sections and TTL/RR data.
Linux · mixed · verifiesdig +trace <name> [type]ReferenceTrace iterative delegation from root toward authoritative servers.
Linux · mixed · verifiesdig +tcp <name> [type] @<server>ReferenceForce DNS over TCP to compare with UDP/truncation behavior.
Linux · mixed · verifiesdig +dnssec <name> <type> @<server>ReferenceRequest DNSSEC records/flags and inspect AD/RCODE/RRSIG context.
Linux · mixed · verifiesResolve-DnsName <name> -Type <type> -Server <server>ReferenceQuery a specific DNS server and inspect returned records/errors.
Windows PowerShell · mixed · verifiesresolvectl statusReferenceShows systemd-resolved DNS servers, domains and per-link resolver state.
Linux · mixed · verifiestcpdump -ni <iface> port 53ReferenceCapture DNS over UDP/TCP on an interface.
Linux · mixed · troubleshootsGet-DnsClientServerAddressVerifyDisplay configured DNS resolvers per interface.
Windows PowerShell · mixed · verifiesShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checking DNS from a client Verify boundary
dig www.example.com
dig www.example.com @10.0.0.53
dig www.example.com @ns1.example.com +norecurse
dig -x 192.0.2.10
nslookup www.example.com
ping www.example.com
dig shows the status of the lookup, the answer with its remaining time to live, and which server answered. Naming a server with @ tests that server; asking a domain's own server with +norecurse shows the current content of the zone, without any cache. -x performs a reverse lookup. nslookup is the equivalent on Windows. A ping by name on a Cisco device or a host shows whether the system itself can resolve.
On a client, check which resolver it actually uses: ipconfig /all or resolvectl status.
Known-good: the name resolves to the expected address through the resolver the client uses, and the domain's own servers give the same answer.
Step 2 Verification and output interpretation Verify boundary
Query the exact record type and compare recursive and authoritative answers when source-of-truth matters. Inspect answer data, TTL, response code and authority context rather than only whether a command printed an IP address. If a resolver returns stale or unexpected data, compare it with a direct authoritative query and account for cached TTL/negative responses. Verify A and AAAA independently where both exist. After name resolution is confirmed, test the actual transport/application separately using the returned address; DNS success and application success are distinct boundaries.
Step 3 Verification & troubleshooting Narrow the fault
Step 4 Branching troubleshooting Narrow the fault
Path: Networking → IP Services → DNS. Local intent: DNS: Resolver, Recursive lookup, Authoritative server, A record.
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.
Subtopics
Go one level deeper into this subject.
A resolver is the DNS client side — the stub resolver on a host and the recursive resolver it is configured to use (for example via DHCP) — that turns names into addresses and caches answers for their TTL.
Subtopic Recursive lookupIn 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.
Subtopic Authoritative serverAn authoritative DNS server holds the zone data for a domain and gives the final answer for names in it, with the AA flag set, instead of asking other servers.
Subtopic A recordAn A record maps a DNS name to an IPv4 address; resolvers return it for queries of type A.
Subtopic AAAA recordAn AAAA record maps a DNS name to an IPv6 address; dual-stack clients usually ask for both A and AAAA and prefer IPv6 when it works.
Subtopic CNAMEA CNAME record makes one name an alias for another (canonical) name; the resolver follows the chain and returns the target's A/AAAA records.
Subtopic PTRA PTR record maps an IP address back to a name (reverse DNS) in in-addr.arpa for IPv4 or ip6.arpa for IPv6; it is used by logging, mail servers and troubleshooting tools.
Start from the symptom
Prove the nearest boundary, branch on the observation, and repeat the original test after the minimum controlled change.
Symptom-first flow Name lookup fails while direct IP connectivity works 7 decision steps
First proof
Keep DNS separate from generic IP reachability: prove resolver selection, transport and answer semantics.
Useful read-only checks: show hosts · show ip route
Step 1 Direct IP baseline Observe → decide
Confirm the original destination is reachable by IP.
If healthy: IP path works independently of DNS.
If broken: If IP also fails, return to routing/path troubleshooting.
Step 2 Resolver identity Observe → decide
Confirm which DNS server the client is actually using.
If healthy: Client targets the intended resolver.
If broken: Correct DHCP/static resolver configuration.
Step 3 Resolver reachability Observe → decide
Prove IP and transport reachability to the resolver.
If healthy: Queries can reach the resolver and replies can return.
If broken: Investigate route/ACL/firewall before DNS record content.
Step 4 Query/response semantics Observe → decide
Inspect whether the response is NOERROR, NXDOMAIN, SERVFAIL or timeout.
If healthy: Response code matches the expected answer state.
If broken: Use the exact response class to choose authoritative/recursive next checks.
Step 5 Record path Observe → decide
Check A/AAAA/CNAME/PTR chain relevant to the original name.
If healthy: The intended record chain resolves.
If broken: Correct record/zone/delegation rather than network path.
Step 6 Cache/TTL boundary Observe → decide
Compare cached answer with authoritative/current expectation.
If healthy: Cache state and TTL are plausible.
If broken: Expire/flush only when cache evidence warrants it.
Step 7 Repeat the original name-based test Observe → decide
Use the same hostname/application request.
If healthy: Name-based application flow succeeds.
If broken: A successful lookup does not prove the application itself.
Proof limit
A passing step proves only that boundary; continue until the original symptom is explained and retested.
Recognize the symptom, then prove the boundary
Observed symptom → candidate boundary → discriminating check → original-test closure. A signature narrows the search; it never proves root cause by itself.
DNS returns SERVFAIL
A resolver answers but reports that it could not complete processing for the query.
resolver recursion/upstream · DNSSEC/validation · authoritative reachability · timeout/dependency
query the same resolver explicitly → compare authoritative/upstream path → check whether failure is name-specific
SERVFAIL is not NXDOMAIN and does not prove the requested name does not exist.
Repeat the original failing test after the minimum controlled change before calling recovery verified.DNS returns NXDOMAIN
The responding DNS authority/resolution chain reports the queried name does not exist.
wrong query/suffix · authoritative data · split-DNS/view boundary · stale negative cache
verify exact FQDN → query authoritative context where appropriate → compare another resolver/view
NXDOMAIN does not prove general DNS transport/connectivity is broken.
Repeat the original failing test after the minimum controlled change before calling recovery verified.DNS operational boundary
Boundary-first guidance: prove the nearest state before moving outward.
Fast answer
Separate name resolution from IP reachability and application behavior. A successful DNS answer proves resolution only.
Boundary chain
client resolver → configured resolver → recursive/authoritative answer → returned address → route/transport → application
Expected name returns the intended record and direct-IP/application tests agree with the resolved destination.
NXDOMAIN, SERVFAIL, timeout or an unexpected record is isolated before routing/application conclusions are made.
A DNS answer does not prove the destination is reachable, TCP/UDP is permitted, TLS succeeds or the application is healthy.
- 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.
nslookup <name>— resolutiondig <name> +trace— delegation pathshow hosts— cached names on IOSshow running-config | include name-server— device resolvers
ReferenceHow it works1 section · depth on demand
How DNS works
Who does what. A device sends its question to the resolver it has been configured with. The resolver finds the answer on the device's behalf — from its cache, or by asking the servers responsible for the name, starting from the root and following referrals — and returns it. The servers that hold a domain's actual records are its authoritative servers.
Records. DNS data consists of records, each with a type:
| Type | Holds |
|---|---|
| A / AAAA | An IPv4 / IPv6 address for a name |
| CNAME | An alias pointing to another name |
| MX | The mail servers for a domain |
| NS | The servers responsible for a domain |
| PTR | The name for an address (reverse lookup) |
| TXT | Free text, used for mail policies and verification |
Caching. Every record carries a time to live. Resolvers and clients keep answers for that long and do not ask again in between. A change therefore reaches users gradually, as cached copies expire — and a "name does not exist" answer is cached too.
Transport. Queries normally use UDP port 53. Answers too large for UDP are fetched again over TCP port 53, so both must be permitted.
Possible results of a lookup. An answer; "the name does not exist" (NXDOMAIN); the name exists but has no record of the requested type; a server failure (SERVFAIL); or no response at all.
On a Cisco device, DNS is needed only for the device's own lookups:
ip name-server 10.0.0.53
ip domain name example.com
ip domain lookup
A useful habit: when an application cannot connect, first separate the two steps — does the name resolve, and does the resulting address answer.
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
DNS concepts that explain real problems
RFC 1034 defines the DNS model behind every lookup. Names are made of labels of up to 63 octets, and a full name can be up to 255 octets. Comparisons ignore case, but the original case is kept. The name space is split into zones, and a parent delegates a subtree with NS records at the zone cut. Glue address records are needed when a name server's own name lies inside the delegated zone.
Roles (RFC 1034)
| Component | Function |
|---|---|
| Authoritative name server | Holds zone data and answers from it |
| Recursive server | Resolves on behalf of clients, using its cache |
| Stub resolver | The client library that relies on a recursive server |
| Cache | Keeps answers for their TTL |
Query types and header bits
| Mode | Behaviour |
|---|---|
| Iterative (non-recursive) | The server answers or refers; all servers must support it |
| Recursive | Requested with RD; offered with RA; optional for servers |
Caching rules (RFC 1034)
| Rule | Effect |
|---|---|
| The zone administrator sets the TTL | Changes take up to the old TTL to reach every cache |
| A TTL of 0 prohibits caching | Every query goes to the authoritative server |
| Authoritative data wins over cached data | A server never prefers its cache for its own zone |
| Negative caching uses the SOA | Lookups for missing names are cached as well |
| No other data at a CNAME node | Mixing a CNAME with other records breaks lookups |
host$ dig +norecurse @ns1.example.net www.example.net A
;; flags: qr aa; QUERY: 1, ANSWER: 1
host$ dig +trace www.example.net
host$ dig www.example.net A | grep -E "^www|Query time"
www.example.net. 287 IN A 192.0.2.40
R1(config)# ip name-server 10.20.0.53 10.20.0.54
R1(config)# ip domain lookup source-interface Loopback0
R1# show hosts summary
Troubleshooting by symptom
| Symptom | Where to look |
|---|---|
| Works for some users only | Different resolvers or cached answers; compare TTLs |
| A change isn't visible | The old TTL hasn't expired yet; negative caching |
| SERVFAIL | Broken delegation or missing glue; DNSSEC failures |
| NXDOMAIN for a name that exists | Wrong zone, typo, split-horizon view |
Before a planned change, lower the TTL by at least the current TTL. That way old answers have expired by the time the change is made.
Documented example, not captured output.
Concept and state model
A DNS query asks for a specific name, class and record type. A recursive resolver may answer from cache or follow delegations toward authoritative servers, while an authoritative server answers from the zone data it serves. Common records include A/AAAA for addresses, CNAME for aliases, MX for mail routing, PTR for reverse mapping and NS/SOA for zone authority. TTL controls how long positive data can remain cached; negative responses can also be cached according to DNS rules. CNAME changes the canonical name being resolved and may require additional lookups before an address is returned. DNS transport commonly uses UDP for ordinary queries and TCP where message size, transfer or fallback behavior requires it.
Operational boundaries and common misconceptions
A successful A or AAAA answer does not show the host responds, the service listens, routing works or TLS identity is valid. NXDOMAIN means the queried name does not exist according to the answering authority/cache; NOERROR with an empty answer has different semantics. A CNAME answer is not the final address result. Different clients can legitimately see different answers because of split DNS, cache state, geography or policy. Always preserve which resolver was queried and whether the result came from cache or authority when comparing observations.
ReferenceConfiguration & state1 section · depth on demand
Configuration model and design choices
Keep zone ownership and delegation explicit. Authoritative records should have intentional TTLs, and aliases should not create loops or hide conflicting ownership. When an application depends on both A and AAAA records, publish only addresses with valid service paths or understand how client address-selection/fallback behaves. Resolver configuration on clients should point to recursive resolvers appropriate for the environment rather than directly to arbitrary authoritative servers. Split-horizon/internal DNS designs should document which clients receive which answer set so identical names do not create accidental ambiguity.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IP Services → DNS. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.rfc-editor.org/rfc/rfc1034.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
DNS evidence chain
Configuration, operational state, counters and downstream proof remain separate.
| Boundary | Question | Evidence | Does not prove |
|---|---|---|---|
| Definition | What is configured or intended? | running configuration / controller policy | live operation |
| Local state | Is the feature active at the expected scope? | show hosts | remote success |
| Counters | Did controlled traffic or an event reach this stage? | scoped counters/timestamps | complete return path |
| Next boundary | What consumes or transports this state? | client stub → recursive resolver/cache → root/delegation → authoritative answer → cached response → application | application success |
DNS · reference boundaries
Compact technical reference for the most important state and interpretation boundaries.
| DNS concept | Reference meaning |
|---|---|
| Recursive resolver | Finds/caches answers for clients |
| Authoritative server | Publishes source data for a zone |
| TTL | Cache lifetime for an RRset |
| CNAME | Alias to another canonical name |
| NXDOMAIN | Name does not exist (not the same as empty answer) |