Unable to lookup host ‘my-imac.lan’ – Unknown host

Printing from old iMac running 10.4.11 to printer attached to new iMac running 10.5.7 was working fine for 9 months and now gives the message 'Unable to lookup host ‘my-imac.lan’ – Unknown host'. There is a wireless connection between the machines. It can see the printer which is in the printer list, I can exchange files between the two machines, but it won't print now.

I have just done an Archive and Restore on the old iMac but this has not changed anything.
Wireless printing from a MacBook running 10.5.7 is unaffected.

Any ideas from anyone?

iMac 20" 2.66Ghz, Mac OS X (10.5.7)

Posted on Jun 9, 2009 3:33 PM

Reply
11 replies

Jun 10, 2009 1:27 AM in response to JFGreen123

It is unusual to see that the 10.4 iMac is looking for 'my-imac.lan'. Normally a workgroup computer will have an extension of '.local'.

What you can do is open the Sharing tab on the iMac running 10.5.7 and look at the computer name. Under the name you will see some text showing the name other computers can use to access this machine. If it is showing something different to 'my-imac.lan' then I would go back to the 10.4 iMac, delete the current printer queue to the shared printer and add the printer queue again.

PaHu

Jun 10, 2009 4:38 AM in response to PAHU

Hi PAHU,

The new iMac address shows in the printer preferences as .local which is what I would expect - the .local part is greyed out implying that it is the correct default ending.

On the old iMac I have deleted and reinstalled several times but it always comes up with .lan ending. If I change the printer or machine name, it automatically updates across ont he old iMac.

My suspicion is that this problem co-incided with upgrading to the iMac with the printer attched to 10.5.7 in mid May. I think the upgraded system is sending the wrong ending to 10.4 machines, but the correct ending to 10.5 machines like my MacBook.

Jun 11, 2009 4:58 AM in response to JFGreen123

Well I don't believe it has anything to do with the 10.5.7 update. This evening I connected from 10.4.11 to a 10.5.7 shared USB printer and there was no mention of the .lan anywhere in the queue name or in the cups error log.

You mention that when you add the printer on the 10.4.11 iMac, "it always comes up with .lan ending." Can you describe where you see .lan. With my test today I could not even find a reference to .local with the printer queue that was added to the 10.4.11 client and the 10.5.7 sharing Mac.

PaHu

Jun 11, 2009 1:11 PM in response to PAHU

On the old iMac running 10.4.11, if I choose Printer Setup from the Print and Fax Preference, and then Name and Location in the Printer Setup Utility it gives the following:
Printer Name: Canon i850
Location: My-iMac
Queue Name: Canon_i850@My-iMac.lan
Host Name: My-iMac.lan

Every time I delete and then add the printer it comes up with these same details. Then when I try to print I get the Unknown host message found in the Subject of this discussion.

Jun 11, 2009 10:31 PM in response to JFGreen123

Thanks for the details. Did some more checking this arvo based on your info and found the following on my Tiger G4.

Queue Name: Canon_LPB@192.168.44.106
Host Name: 192.168.44.106

As you can probably tell, the IP address shown is the Mac Pro sharing the USB printer, and is running 10.5.7. No mention of a host name or any reference to the name shown in the Sharing pane.

By contrast, another 10.5 Mac connecting to the Mac Pro shows the Queue name as the printer@machine_name (no mention of .local) and the host name as "localhost".

So we need to work out where your Tiger Mac is getting the 10.5 hostname of "My-iMac.lan" I believe that your local hosts file is the likely candidate. If not, then it could be the router that connects the two Mac's together.

For a Mac to Mac local network, the Bonjour Computer Name is typically used to identify each Mac on the network. However, if there is a domain name server (DNS) on your network, then this can override the Bonjour name (which is set via the Sharing pane).

What you can do is open Terminal and type the following.

cd /etc "then press ENTER".

This will change your current working directory to the etc directory.

nano hosts "then press ENTER".

This will display the contents of the hosts file and I believe that this may have a reference to the .lan name that is causing the symptom.

If there is no reference to the .lan name then you can exit the nano editor by pressing Control X.

The next thing to try is pinging the name "My-iMac.lan". Open the Network Utility, located in Applications > Utilities, and select the Ping tab. In the address field enter "my-imac.lan" (without the "s) and set the ping count to 4. Now press Ping and see if you get a reply. If there is something associating this name to an IP address, then you should see the IP address in the top line, and if the IP address is currently in use, then you will see replies from that device.

Let me know how all that goes.

PaHu

Jun 12, 2009 11:28 AM in response to PAHU

The host file has no reference to .lan in it:
+127.0.0.1 localhost+
+255.255.255.255 broadcasthost+
+::1 localhost+
+fe80::1%lo0 localhost+

Pinging my-imac.lan on the new iMac works and gives the IP address 192.168.1.77
Pinging my-imac.lan on the old iMac gives no reply (hence the printing problem!)
Pinging 192.168.1.77 on the old iMac works and receives packets back.

Jun 12, 2009 9:50 PM in response to JFGreen123

Okay. We seem to be getting somewhere now. Can you confirm if .77 is the new iMac.

If it is, then the new iMac must have this .lan reference stored locally. You should check the hosts file on this machine. Also have a look at the NetBIOS name under the WINS section of the Network pane in System Preferences.

PaHu

Jun 13, 2009 2:42 AM in response to PAHU

Yes, .77 is the new iMac with the USB printer.

Running nano hosts on the new iMac does mention .lan
Under WINS it has the NetBIOS name JOHNS (the actual address of this machine is Johns-iMac, but I have been calling it my-iMac for the sake of the post). There is nothing else in the Workgroup or WINS Servers.
Under DNS it has DNS Server: 192.168.1.254 which is my wireless broadband router, and under Search Domains it say lan . Both of these are greyed out so can't be deleted or edited.

In the sharing preference it gives the computer name as Johns-iMac and the text below says Computers on your local network can access your computer at: Johns-iMac.local - which is how the MacBook prints to the USB printer, though the old iMac picks up .lan and doesn't!

Jun 14, 2009 3:06 PM in response to JFGreen123

Well it looks like you found the culprit. It looks like the router has allocated the lan extension to the Leopard iMac. As to why it has done this is the question. A local network typically does not have a search domain entry. So, I suggest you connect to the admin page for the wireless router to see if you can remove .lan as the search domain and just leave it blank. Then you will have to restart the Leopard iMac to see if the entry in hosts changes or disappears.

PaHu

Jun 27, 2009 7:22 PM in response to JFGreen123

You could try manually setting the domain name .lan into the network settings of the Tiger iMac. Or you could create an entry in your Tiger hosts file that resolves the IP address for the Leopard Mac, such as '192.168.1.77 Johns-iMac.lan'. This should work fine as long as the Leopard iMac IP address doesn't change.

PaHu

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.

Unable to lookup host ‘my-imac.lan’ – Unknown host

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