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 am doing some work on some domain names. I'm updating them. By using dig I can query our nameserver and I can see that the correct name has been updated. However our office dns cache is still showing the old name. Yesterday I set the TTL down to 10 minutes, so I don't have to wait long. However is there any way to trick the office's dns cache to update? Any sneaky little trick I can do to make things easier?

UPDATE Let's assume I don't have access to the server, and can't restart it? Is there anything else I can do?

share|improve this question
    
What platform's your DNS server running on? UNIX, Linux, Windows..? –  RainyRat Jul 15 '09 at 13:14
    
What OS is the office's server running? That will make a difference in how you would go about flushing the cache. –  Bart B Jul 15 '09 at 13:14
add comment

4 Answers

up vote 11 down vote accepted

Assuming your DNS server is on a PC and not a router etc:

Linux cache flush:

/etc/init.d/nscd restart

Or for distros without nscd

/etc/init.d/named restart

Windows client cache flush for individual machines:

ipconfig /flushdns

Windows server cache flush for office server (thanks to ericmayo for the correction):

  1. Navigate to Administrator Tools
  2. expand the server object
  3. right click cached objects
  4. select clear cache

Mac (possibly?!):

dscacheutil -flushcache

If you have a web GUI etc for a router, there will be an option in there somewhere.

Cross platform cache flushing as above

About DNS and caching

share|improve this answer
    
ipconfig /flushdns does not flush the DNS cache of a Windows DNS server; it only flushes the client's cache. To flush a Windows DNS server cache, open DNS under Administrator Tools, expand the server object, right click cached objects and select clear cache. nscd is not on my distro. In that case, just killall named and restart it; usually /etc/rc.d/rc.bind start –  Kilo Jul 15 '09 at 14:06
    
For mac: dscacheutil -flushcache flushes the local cache in the operating system, not the bind name server. rndc flush will clear the bind name server on a mac which will affect all computers using that name server. –  Matt Connolly Apr 20 '12 at 0:21
add comment

If you are running BIND as a resolver for your office - ie. not forwarding to another a resolver.

Flush everything in the cache:

rndc flush

Flush a specific record:

rndc flushname example.com

If you are forwarding then you are at the mercy of the forwarder's cache.

share|improve this answer
add comment

With the Windows DNS just restarting the service flushes the cache. Worth a try on your office server.

JR

share|improve this answer
add comment

If your using Windows, you can use nltest.

  /DSREGDNS - Force registration of all DC-specific DNS records
  /DSDEREGDNS:<DnsHostName> - Deregister DC-specific DNS records for specified DC
      /DOM:<DnsDomainName> /DOMGUID:<DomainGuid> /DSAGUID:<DsaGuid>
  /DSQUERYDNS - Query the status of the last update for all DC-specific DNS records

And if your using WINS, nbtstat.

share|improve this answer
add comment

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.