HomeWindowsXP and Vista: Display entries in Windows DNS cache

XP and Vista: Display entries in Windows DNS cache

DNS search results are cached on local systems to prevent a lookup every time the search is required. Sometimes during troubleshooting it is helpful to see the contents of the DNS client cache. This recipe describes the process of viewing the Windows DNS cache.


To view the DNS cache on the local system, type the following command from a command prompt:

ipconfig /displaydns | more

The | more is optional and will pause the output after each screenful which may be helpful since the DNS cache can get large and the output format uses several lines per record.

A sample output from this command is shown below. The first is an address lookup for the host laptop.tech-recipes.com. The Record Name and A (Host) Record lines show the request and answer. The Time To Live field shows the number of seconds before this entry expires. The second example shows the reverse lookup (PTR) results for the same host.

laptop.tech-recipes.com
----------------------------------------
Record Name . . . . . : laptop.tech-recipes.com
Record Type . . . . . : 1
Time To Live . . . . : 45025
Data Length . . . . . : 4
Section . . . . . . . : Answer
A (Host) Record . . . : 192.168.1.5

5.1.168.192.in-addr.arpa
----------------------------------------
Record Name . . . . . : 5.1.168.192.in-addr.arpa.
Record Type . . . . . : 12
Time To Live . . . . : 45025
Data Length . . . . . : 4
Section . . . . . . . : Answer
PTR Record . . . . . : laptop.tech-recipes.com

Quinn McHenry
Quinn McHenry
Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!