Is there a command or anything in Windows that let me view the list of the domain names that are currently resolved by the system?
Something similar to the arp
command but for domain names.
Thanks.
EDIT:
I've been doing some testing with the command given by Matt, and I noticed that domain names that have a low refresh time and/or retry time, are not showed in the list given by ipconfig
.
For example, google.com
doesn't appear in my list, but according to the the dns responce it should be cached:
google.com
primary name server = ns1.google.com
responsible mail addr = dns-admin.google.com
serial = 2009052800
refresh = 7200 (2 hours)
retry = 1800 (30 mins)
expire = 1209600 (14 days)
default TTL = 300 (5 mins)
Whereas serverfault.com
, which has higher refresh and retry times, does appear on the list given by ipconfig.
serverfault.com
primary name server = ns21.domaincontrol.com
responsible mail addr = dns.jomax.net
serial = 2009031400
refresh = 28800 (8 hours)
retry = 7200 (2 hours)
expire = 604800 (7 days)
default TTL = 86400 (1 day)
The following is another domain which is never shown by ipconfig
, even though it has a high TTL:
minijuegostop.com.mx
primary name server = ns1.theplanet.com
responsible mail addr = support.minijuegostop.com.mx
serial = 2008122302
refresh = 900 (15 mins)
retry = 900 (15 mins)
expire = 1209600 (14 days)
default TTL = 86400 (1 day)
Apparently Windows decide not to cache some domains, and the refresh and retry times has something to do with it. Either that or Internet Explorer maintains its own domain name list. But I dont think so because as soon as I open a new webpage, the domain name of that page is shown by the ipconfig command; unless it has a low refresh or retry time, in which case it's not shown in the list.
Does anyone know what could be the problem or whether it's possible to show a complete list of cached domain names? (becasue apparently the list given by ipconfig
is not complete)
ipconfig /displaydns
Run the following commands in order:
This (or something very similar) is what you should see, unless something (probably malware) is messing with your DNS resolution:
Regarding your edited question regarding some DNS entries with a low TTL missing from the cache, check out this google search which will explain all:
http://www.google.com/search?q=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DNSCache\Parameters++site%3Amicrosoft.com
The value that controls how long a record is cached for is the TTL (Time to live), not the retry or refresh. The default TTL for Google according to what you posted is 5 minutes, but a specific record can have a much lower TTL. In my testing the TTL for A records associated with www.google.com records tend to between 30-60 seconds. If you aren't hitting Google and then immediately checking the cache, it is possible the record has expired too fast for you to notice. Try doing a ping www.google.com and then running ipconfig /displaydns immediately.