Google
 
  • Print

Author Topic: Mac's Dns Flush  (Read 230 times)

0 Members and 1 Guest are viewing this topic.

MC73

  • Administrator
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 501
  • Karma: 41
  • Gender: Male
  • The Official DA
    • Cuyler Games
Mac's Dns Flush
« on: May 17, 2012, 03:24:49 PM »
The DNS FLUSH has changed a bit under Lion.


In 10.6, and prior, the method was to issue

dscachutil -flushcache

from a Terminal prompt.

This no longer works, as I learned trying to flush an Address record I knew had changed (because I changed it myself on one of my domains). The new record had propagated on the Internet, and dig was getting the proper response from various external servers. But anything using the local resolver cache kept getting the old IP address, even after "flushing" with the old command.

I tracked it down by doing a dump of the local cache into system.log

sudo killall -INFO mDNSResponder

before and after using the old flush command. The old record remained in the cache, along with lots of others.

I dragged out my 10.6.8 external disk and booted from it. When you issue the old command (dscacheutil -flushcache) under 10.6, the following line is logged to system.log:
Oct 16 10:37:54 helios mDNSResponder[12]: SIGHUP: Purge cache

and of course the cache is flushed.

Using the old command under 10.7, there is no "Purge cache" being logged, and the cache remains intact.

What works under 10.7 is:
sudo killall -HUP mDNSResponder

That logs the purge, and flushes the cache.
Thank You Guest for reading my post & Thanks for being a part of CG.

  • Print