Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have created a host entry. I recently needed to change the IP of the host entry, however some clients in the domain are still looking at the old ip of the host...

How can I cause a network wide refresh?

Am I correct to assume DNS entries are cached client side and a DNS flush per client might be required?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

This information is held in the DNS cache on the client. If the client has already resolved the name to IP address it is more efficient to pull the data from the cache than to query DNS each time.

On an individual workstation you would use the command ipconfig /flushdns to empty the cache and force fresh DNS lookups. The default time an entry will stay in the cache is 1 day. http://support.microsoft.com/kb/318803/en-us. It might be eaiser to have clients with the old IP address run the /flushdns command rather than rig something to clear the cache domain-wide.

share|improve this answer
1  
+1 - That's accurate. You could use something like "PSEXEC" and a list of computer names to perform such a "domain-wide DNS cache flush". (Alternatively, you could just use the "sc" command and remotely stop and restart the "DnsCache" service on all the computers, which would accomplish the same thing...) –  Evan Anderson Dec 22 '09 at 14:01

Just found this little vbscript:

'Author: Lair360
'Version: 16.6a
'Revision: 36 Build 16
'--------------------------------------------
On Error Resume Next 'This line will cancel the error and direct to the info.
Dim objShell 'This will maintain memory usage when "WS.script.Shell" is activated.
set objShell = createobject("wscript.shell")
objShell.run("%comspec% /k c: & ipconfig /flushdns")
'Results are given and cmd command-line has exit.
WScript.Quit
'End of VBScript command
'-------------------------------------------
WScript.Echo "DNS Caches are flushed!"
objShell = Nothing
'VBScript Ends

You can launch it on your workstations using GFI network scanner for example.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.