Thursday, March 19, 2015

Easy Mac Hacks: Solve Connection Issues by Clearing OS X DNS Cache [feedly]

Easy Mac Hacks: Solve Connection Issues by Clearing OS X DNS Cache
// Mac|Life - All Articles

Every Monday we show you how to do something quick and cool with Mac OS X. Sometimes it's a tutorial on a lesser-known feature, other times it's a trick that uses built-in functionality such as Terminal — either way, these simple tips can make life better and easier, and they don't require any special knowledge. All you need to do is follow the instructions!

You may occasionally get into a situation where the DNS on your Mac needs to be flushed from the system in order for a new server or some other DNS address change to be recognized by your computer. Usually you don't need to worry about this unless you're a systems/network administrator or if you're a web developer, but there may be other network issues that can be solved with a simple DNS cache flush. In those situations, you can use the command in this how-to without even having to restart your Mac.

With almost every iteration of OS X, the command has changed to flush the DNS cache. In this article, we'll show you how to clear the DNS cache in OS X Yosemite (10.10). The old "mDNSResponder" command no longer works since Yosemite has a new system that manages the DNS cache.

Reset MDNS Cache (Multicast DNS)

OS X utilizes two DNS cache systems; the first is a MDNS Cache (or Multicast DNS) that handles the zero configuration services on your local network. To reset the MDNS cache, open the Terminal (located in Aplications/Utilities) and type the following command, followed by the return key:

sudo discoveryutil mdnsflushcache

If you are prompted for a password, simply enter it, then press return again.

Reset UDNS Cache (Unicast DNS)

The second DNS cache is called UDNS (or Unicast DNS), which handles associations between the network addresses and the network endpoints. To reset this cache, open the Terminal, then enter the following command:

sudo discoveryutil udnsflushcaches

Again, you may be prompted for a password. If so, enter it, then press return.

Reset Both Caches at Once

If you wish to reset all DNS caches in OS X Yosemite at once, then simply join the commands together with a semicolon, then paste them into Terminal like this:

sudo discoveryutil mdnsflushcache; sudo discoveryutil udnsflushcaches

After you've typed the command on a single line, all you have to do is press enter to flush both cache systems in OS X.


Shared via my feedly reader

Sent from my iPhone

No comments:

Post a Comment