DNS Cache and Hosts File
Also: DNS cachehosts fileipconfig /displaydnsipconfig /flushdns
Hosts cache DNS answers locally for the record's TTL, so repeat lookups need no query; ipconfig /displaydns shows the Windows cache and ipconfig /flushdns clears it. A local hosts file provides static name-to-address mappings that are consulted before DNS.
NetworkChuck0
Not taught as a topic in NetworkChuck Free CCNA. Mentioned fewer than twice, if at all.
Jeremy's IT Lab2
- Day 38 DNS
DNS Cache and Hosts FileDevices cache DNS answers to avoid repeat queries; on Windows use ipconfig /displaydns and /flushdns, and on IOS use show hosts. The hosts file is a static name-to-IP list that predates DNS.
9:37Moving on, let me introduce the DNS cache. Devices will save the DNS server’s responses to a local DNS cache. This means they don’t have to query the server every single time they want to access a particular destination.
Said 14× - Day 38 Lab DNS
15:37…it to 10.0.0.1 and the pings succeed. Okay then if we were to go on to task 3 and 4, here we would edit a PC hosts file, remember I showed you in the lecture video what a PC hosts file
Said 2×
Related terms
Flashcards that test it
Jeremy's IT LabWhich two Windows commands display the PC's configured DNS server?
ipconfig /all and nslookup. Plain ipconfig doesn't show it, and ipconfig /displaydns shows the cache, not the server.
Jeremy's IT LabWhich Windows commands view and clear the DNS cache?
ipconfig /displaydns to view it; ipconfig /flushdns to clear it.
Jeremy's IT LabA host with no DNS cache entry browses to a web server over HTTP. Which devices does it open a TCP connection with?
Only the web server. The DNS query uses UDP, and the default gateway only forwards traffic.