Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Cannot resolve host names on local network

It is a local network with router, few Windows computers with shared drives and one Mac.

Windows shares appear correctly in SHARED and can be used without any problems, like iTunes and iPhoto libraries are on those shared drives and work properly, even if ip address of those computers would change.

BUT - if I am trying to use VNC and connect to hostname:port, it says that server is not specified. If I try to ping hostname it says Unknown host.
At the same time, similar ping from Windows computer work without any problems.

It could be possible that router does not support something standard and communicates with Windows using something windows-specific, but what confuses me is that I can see computer names resolved in the finder already! Also, as I said iTunes and iPhoto can work with shared files on dynamic ip's which would be not possible if host names would be not resolved.

Thanks.

Mac OS X (10.5.7)

Posted on May 13, 2009 4:52 PM

Reply
9 replies

May 18, 2009 7:12 PM in response to ron App

Domain Name Resolution for local IP addresses require a Local DNS server running on your network.

Bonjour names will resolve without a Local DNS server. So this is why iTunes and iPhoto works as they use bonjour technology.

A bonjour name ends in .local so in your macs sharing preferences you give the mac a name of imac its bonjour address is imac.local

Other than that you are best giving your devices fixed IP address and adding there hostnames to your hosts file.

the contents of /etc/hosts on your mac would look like



##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

so at the above that you could add for example

192.168.1.5 mypc
192.168.1.6 myprinter




Then you could ping 192.168.1.5 by

ping mypc

So would have to add these entries to each hosts file on every computer on your lan.

Or you could setup a local dns server and give each computer on your LAN a fully qualified domain name.

May 19, 2009 9:30 PM in response to Tim Haigh

Thank you for the answers.

Of course, I have DNS server (router) and Mac recognizes it as such, hence the question. Is router not a good DNS server? Windows machines are working OK with it, I can ping computers using their names. Could it be that routers commonly sold (like Dlink, Linksys, I have tried several of them with same result) are some kind of "windows routers" not really suitable for Mac?

Regarding bonjour, are those computer names shown in "SHARED" in finder, discovered by bonjour?
Then, it should be possible to say ping server.local and it should work, but it does not. Is there any way to let other applications (like vnc) to also use these bonjour names?

Regarding "fully qualified domain name" I am a bit lost. Computers are in some workgroup, that workgroup shows in Mac's network setup. Is that not enough?

Thanks.

Aug 2, 2009 9:49 AM in response to ron App

I just had this same issue: Windows machines resolve local hosts via DNS but my Mac did not.

The fix is simple; just add .local to the end of the hostname. So, instead of trying https://mynas/admin, you would use https://mynas.local/admin

Worked great for me. I really didn't want to go the route (pun intended) of using IP address reservations, static host entries, etc.

Aug 2, 2009 12:19 PM in response to Tim Haigh

Is it just me, or is this really dumb?

I mean, the Time Capsule is running a DHCP server... it has to dole out the IP addresses, and tracks the client ID. It's also running a DNS server, which hosts on the local network will use by default. So it has all the information it needs to automagically treat the client ID as a hostname... it just doesn't.

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 ID.