Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /data/sites/web/remonpelnl/www/wp-content/themes/remonpel_nl__child__twentyfourteen/functions.php on line 32
Duplicate Network Name, IP-Address already in use, slow DNS resolution, erratic Bonjour discovery, Dead-slow Safari 8, one simple solution – Remons TechNotes

Duplicate Network Name, IP-Address already in use, slow DNS resolution, erratic Bonjour discovery, Dead-slow Safari 8, one simple solution

Update: as announced and expected, Apple has replaced DiscoveryD with mDNSResponder in 10.10.4. For those of you running 10.0.4, this article no longer applies. In case you’re stuck on 10.10.0, .1, .2 or .3, read on :)

A long long title, but accurately descriptive :P Poor English? Perhaps, but it does say what is to be said;

If you have experienced one of the following issues, then you should read on;

  • Your computer’s name is already in use, your computer has been renamed to iMac (2)
  • Your IP address is already in use (even when you’re the only one at home)
  • Opening a website in Safari takes “forever”
  • You cannot find your (other) computer on the network (even though you’re sure it’s turned on)

All these troubles might (with 99% certainty) be caused by one single piece of software;

com.apple.discoveryd

What does it do?

Well in effect, it is the replacement of the old mDNSResponder. It handles look-up of domainnames, bonjour services etc. It’s an essential piece of networking software. Without it, your machine will not be able to find https://remonpel.nl and that would be BAD, no?

Why was it replaced?

Well, I cannot answer that, but Apple decided to do so. It could have something to do with the fact that mDNSResponder is old. In any case, Apple has rewritten the software from scratch and called it DiscoveryD. Rewriting software from scratch is a major NO-NO in developer-land (for an interesting read; Joel on Software). Much better would have been to port the old C code to C++ and go from there. (Or maybe Apple should have chosen C# or Objective-C which are languages a-lot-more-often used by Apple, C++ hardly is). Apple chose to rewrite and with that, a lot of stuff is broken/incompatible.

Why is replacing bad?

Well, mostly because mDNSResponder has been around a long, long time and as Apple made it 100% open-source, a lot of 3rd party software and devices (routers, to name one device-group) have incorporated mDNSResonder. They know not about DiscoveryD and that’s why stuff’s broken.

Can we go back?

Yes! We can!

You can get the old mDNSResponder software from one of your older Macs (running 10.9 Mavericks) or by browsing your Time Machine backup of yesteryears.

This article explains it best; Why DNS in OS X 10.10 is broken, and what you can do to fix it.

TL;DR

unload your com.apple.discoveryd and com.apple.discoveryd_helper daemons
load the com.apple.mDNSResponder and com.aple.mDNSResponderHelper
reboot

Done.

Which files to get (from a backup, or a live 10.9 machine)?

  • usr/sbin/mDNSResponder
  • usr/sbin/mDNSResponderHelper
  • System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
  • System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist

Where to copy them to?

  • same locations (on the problem-computer, of-course) :P

How to switch to the “old” mDNSResponder?

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd_helper.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist

and reboot your computer

How to switch back to the “new” DiscoveryD?

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.mDNSResponderHelper.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd_helper.plist

and reboot your computer

Anything else we need to know?

  • You might need to do this in Single-User mode (cmds just before boot); I didn’t have to.
  • As far as I can tell I agree with ArsTechnica; no downsides as of yet. When I find some, you’ll read it here.
  • Use at your own risk; just because it works perfectly and flawlessly for me, does not mean it will for you, always have a backup ready.

Archive:

Since mDNSResponder is open-source I THINK I am allowed to offer the files here, but just in case; if anyone feels I am NOT allowed, leave a message and I’ll remove this at earliest opportunity.

This package contains a script to install, uninstall, activate and deactivate the mDNSResponder and the 4 files needed from OSX 10.9.


Source: Why DNS in OS X 10.10 is broken, and what you can do to fix it

Author: Remon Pel

WebDeveloper though not WebDesigner

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Confidental Infomation
stop spam mail