cache dns on windows 7

Posted on 2014-04-21
Last Modified: 2014-05-02
we have a program that loses connection with the sql server. when I do a display dns on the windows 7 machine, the dns record im looking for doesn't show up. when I disable the dns services, and I do a display, it shows up. how can I fix this issue so that I don't have to disable dns on the windows 7 machine.
Question by:ttrbrtsn
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 40012814
Do you have internal DNS servers setup and reachable on your internal network? Are the DNS Settings correct on all of the servers configured for use?

What are you doing to view the dns cache on the Windows 7 machine?

You can try and add a static entry in the "Hosts" file. This is located in c:\windows\system\32\drivers\etc"

You will need to open the hosts file with Notepad (ran as administrator) and then edit the file and then save your changes. What the hosts file will do is be checked first when trying to resolve hostname to IP address in a DNS lookup. If no result is found in the HOST file then the DNS Servers will be checked.

Hope this helps

Author Comment

ID: 40012841
i want to avoid editing 600 host files. it must be something with windows 7.

i typed in ipconfig /displaydns

Expert Comment

ID: 40012880
I don't blame you there. what happens when you do a NSLookup against all of your DNS Servers? Do they all provide you with the correct IP addresses?

Author Comment

ID: 40020441
when i type in NSLOOKUP on my workstation, i only get one result. just shows me the DC

Accepted Solution

BigPapaGotti earned 500 total points
ID: 40020595
You can specify different DNS  by typing the IP address after the name you want to lookup. Say for instance I want to lookup the "" on the DNS server with the IP Address of The command below would do that:


Do that for each DNS server you have in your environment. For example each DNS server for,,,


We want to make sure that they all return the same IP address

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Query Computer names and description using dns 14 39
SBS Server 2011 does not recognize a PC as being Online 8 68
analyzing possible malicious link 8 26
NSLOOKUP Question 7 25
If you have a multi-homed DNS setup in windows, you can have issues with connectivity to the server that hosts the DNS services (or even member servers of your domain if this same DNS server is a DC). This is because windows registers all of its IPs…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (, affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question