Cannot resolve host names on local network

I appreciate how Apple only wants you to use Apple devices, but unfortunately, the real world is often more complex. In this instance, I need AFP connection to a QNAP server. It used to be ok but suddenly it's decided not to work (probably because I changed my router).


  • Windows 11 PC: ping [server name] : absolutely no issues (as always)
  • Macbook pro: ping [server name]: "sorry what's a DNS?"
  • Macbook pro: ping [IP Address]: no problem


Unfortunately I'm not an expert in unix/linux or indeed networking in general. I've tried a few things:

  • Googling it (obviously)
  • Rebooting the mac
  • "Forgetting the wifi connection" and recreating it
  • Checking that router is fine and DNS is obviously enabled
  • Checking the Mac knows the IP address of the router


Is there any solution to this that doesn't require arcane commands to be typed into a terminal window? Perhaps some sort of "flush" command that resets network settings?


I guess manually creating entries into a hosts file or something may probably work? But that sounds like a bit of a hack and an inelegant workaround.


Any help anyone could offer would be much appreciated!

MacBook Pro (M2 Pro, 2023)

Posted on May 18, 2024 5:01 AM

Reply
5 replies

May 18, 2024 7:01 AM in response to Willstar77

Willstar77 wrote:

It used to be ok but suddenly it's decided not to work (probably because I changed my router).

Your guess is probably correct.


"sorry what's a DNS?"

Good question!

Is there any solution to this that doesn't require arcane commands to be typed into a terminal window? Perhaps some sort of "flush" command that resets network settings?

Probably not.

I guess manually creating entries into a hosts file or something may probably work? But that sounds like a bit of a hack and an inelegant workaround.

That's probably why some systems are working. They've already been hacked.

Any help anyone could offer would be much appreciated!


DNS is really complicated. Apple devices try to make it easier to deal with. But since you've already stated that an Apple-only solution is off the table, then you have to learn DNS if you want all the different devices to seamlessly communicate. Perhaps your old router already had an Apple-compatible DNS system and the new one lacks that feature. Doesn't matter. Now it's your problem to solve.


There are many different solutions. Don't discount the inelegant hacks. They are quick and easy. Maybe they break when you get a new router. But there is a tradeoff between a 5 minute hack and however long it takes you to learn all about how your devices have already been configured, how your router works, how various DNS systems work.


My recommendation is as follows:

1) Go into your router admin and assign a fixed IP address for each device. Chances are, your router will also have a feature to allow you to give meaningful names to these devices. It should already have made some guesses. Hopefully that will help you identify which devices are which. You do this in the DHCP settings. Don't pick an IP address at random. Just configure them all to use the IP addresses that they already have. Should be fairly easy.

2) Go to all of your devices and add entries in their various "hosts" files to identify those now-permanent IP addresses with meaningful names.

3) There is no step 3. You're done.


There are more difficult, but more elegant options available. But don't get me wrong, they aren't perfect and will undoubtedly cause some funky problems at random points in the future. What I've described above is simple and failure-proof.

May 20, 2024 5:17 AM in response to Willstar77

Willstar77 wrote:

I do find it interesting that we use the terminology "Apple-compatible" when it seems that Apple is "incompatible with defined standards".

Actually you've got that backwards.


Traditionally, DNS works by means of a central server that associates the names of devices with their IP addresses. No such server exists for most home networks. Apple prefers to use Multicast DNS (trade name "Bonjour") to make devices discoverable by name on home networks. Multicast DNS is most definitely a "defined standard", but it is unusual for any devices other than Apple devices to implement it. Other devices prefer to use the non-standard WINS system from Microsoft.

It's just disappointing that "It just works" isn't really true anymore.

Giving me an early start to my ASC bingo game today, eh?

May 20, 2024 4:51 AM in response to etresoft

Thanks for taking the time to reply, much appreciated.


Just confirming though that I was being sarcastic, not helpful I know, when I wrote "sorry what's a DNS?" - I know what a DNS is and how I've never experienced any issues with any other operating system.


Looks like I'll have to edit the hosts file then, or just use the detected AFP service instead.


I do find it interesting that we use the terminology "Apple-compatible" when it seems that Apple is "incompatible with defined standards".


It's just disappointing that "It just works" isn't really true anymore.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Cannot resolve host names on local network

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.