liveBook · Manning

DNS server

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

A DNS server is a service that answers domain-name queries by returning corresponding network records or consulting other DNS servers.

A DNS server resolves domain-name queries into network records, commonly returning an IP address. A device checks its DNS cache first; without a matching entry, it sends a query to its configured DNS server on port 53. DNS commonly uses UDP and can also use TCP. section 3.1.2 section 3.3

Cisco IOS devices can operate as DNS clients, servers, or both. As a client, the router uses ip domain lookup and ip name-server to resolve names; lookup is enabled by default, and up to six name servers can be configured. As a server, ip dns server lets the router answer hosts’ queries, forward unresolved queries to configured name servers, and cache responses. section 3.2.1 section 3.2.2

Useful Cisco IOS DNS configuration and verification commands include:

  • ip dns server enables the router to respond to client DNS queries. section 3.2.2
  • ip name-server 8.8.8.8 configures an upstream DNS server; multiple servers provide alternatives when one fails. section 3.2.1
  • ip domain name jeremysitlab.com sets the default domain appended to short hostnames. section 3.2.2
  • ip host pc2.jeremysitlab.com 10.0.0.12 creates a manual hostname-to-address mapping. section 3.2.2
  • show hosts displays dynamically learned and manually configured mappings, including cached records. section 3.2.2 section 3.3

Router-based name resolution

Before configuration, R1 cannot resolve google.com and reports an unavailable domain server. After ip name-server 8.8.8.8 is configured, R1 resolves the name and successfully completes an ICMP ping. With ip dns server enabled, a LAN host can query R1; R1 forwards unresolved queries to 8.8.8.8, caches the response, and answers later queries locally. Manual mappings similarly allow PC1 to ping pc2 by hostname.

Figure 3.7 R1 is a DNS server for hosts in its connected LAN. (1) PC1 queries R1 to resolve the domain name youtube.com. (2) R1 can’t resolve the name itself, so R1 queries 8.8.8.8. (3) 8.8.8.8 responds to R1, informing it of youtube.com’s IP address, and then (4) R1 responds to PC1. In step 5, PC1 communicates with youtube.com via HTTPS.

Trace the recursive query path from a LAN client to the Cisco IOS DNS server, upstream resolver, cached response, and final HTTPS connection. section 3.2.2

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

How deep it goes
Explains cache behavior, recursive forwarding, IOS commands, defaults, verification, and manual mappings, but stops short of DNS server internals.
Examples
Uses browser resolution, google.com and youtube.com queries, Cisco IOS ping output, cached mappings, and manual PC1-to-PC2 hostname resolution.
What it assumes
Assumes basic IP networking and hostname use while teaching DNS query flow, caching, Cisco IOS roles, and required commands.
What you can do after
Configure Cisco IOS as a DNS client or server, set upstream resolvers and mappings, and verify hostname resolution with show hosts and ping.
How it connects
Connects DNS servers with DNS clients, DNS caches, recursive resolvers, DHCP, HTTPS, and DNS record types.

Also explained in

Compare how 2 books explain DNS server →

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.