A DNS cache temporarily stores name-to-IP-address mappings. When a device needs to resolve a URL, it checks the cache first; a matching entry completes resolution without contacting a DNS server. Operating systems and applications such as web browsers may maintain separate caches. section 3.1.2
Name resolution uses the cache in this sequence:
- The device checks for a matching cached name-to-IP mapping. section 3.1.2
- On a cache hit, the device uses the stored address and sends no new DNS query. section 3.1.2
- On a cache miss, the device sends a query to its configured DNS server, then stores the successful mapping. section 3.1.2
- Caching can occur throughout recursive and iterative resolution, reducing the number of DNS queries required. section 3.1.4
Inspecting a Windows DNS cache
Run `ipconfig /displaydns` to display cached records. An entry for `www.google.com` shows the record name, record type, time to live, and cached A-record address `142.250.196.100`. section 3.1.2
A Cisco router configured with `ip dns server` can cache answers for clients in its LAN. If R1 forwards a query to an external server such as 8.8.8.8, it can answer later clients from its cached mapping; `show hosts` displays dynamically learned temporary entries alongside permanent manual mappings. section 3.2.2
C:\Users\jmcdo> ipconfig /displaydns
. . .
www.google.com
----------------------------------------
Record Name . . . . . : www.google.com
Record Type . . . . . : 1
Time To Live . . . . : 267
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . : 142.250.196.100
. . .
Use the annotated DNS-cache listing to identify a cached hostname, record type, lifetime value, and address. section 3.1.2

