I have just had my broadband upgraded to FTTC which means my router has had to change. Previously I was using a Thomson TG585v7 ADSL thingy provided by my ISP. One nice thing about that router was that it would act as a local DNS and allow me to find my other machines on the network by using <hostname>.lan instead of IP addresses.

I've now switched to a Linksys WRT320N ethernet router which connects to my fibre modem, and which I've updated to the latest firmware (1.0.04). I have 2 machines on the network which I regularly want to connect to each other; one is running Windows 7 and the other is running OS X Lion.

The problem I'm having is that I'm unable to connect to my Win7 machine from the OS X machine using the Win7 machine's name. However, I'm able to ping the OS X machine from my Win7 machine using the hostname.


It is very unusual for one of these routers to act as a local DNS server, but that is a really nice feature. Short of setting up a new DNS server (I checked your manual and you indeed so not have this feature for your new router), the simplest thing to do really is to give them static IP addresses, and add entries to the HOSTS file for each.

It is fast, easy and effective.

The other way, and I am not a Mac expert, would be to ask a new question about how to enable NetBIOS name service (It has to do with enabling Samba).

  • I've set up an entry in /etc/hosts on my Mac to point to my Win7 machine for now, but I was hoping I wouldn't have to go this route. The Mac is a laptop so if I'm roaming and connect to another network I have to remember to kill anything that tries to automatically connect to my Win7 machine. I'm also not a fan of setting up static addresses because that also means using a static DNS (on Windows at least)
    – alimbada
    Jul 28 '11 at 13:06
  • @alimbada Then I would consider this question closed, and ask the other one about setting up a Mac to use NetBIOS (should be separate). You need either that, HOSTS, or to set up your own DNS server. There are no other options.
    – KCotreau
    Jul 28 '11 at 13:16
  • Fair enough. Also, I should have mentioned I already checked on NetBIOS and it's already enabled, running and on the same workgroup as my Win7 machine so that doesn't seem to help. Looks like static IP and hosts file it is for now.
    – alimbada
    Jul 28 '11 at 13:21
  • Try one more thing then: Disable both firewalls and check it that way. They could be blocking NetBIOS.
    – KCotreau
    Jul 28 '11 at 13:32

There are basically two name based access methods used in many home environments.

  1. A router as your WRT320N or TG585v7 uses a dedicated domain such as lan to provide by-name access to every computer that picked up a DHCP lease at the router. The router usually also propagates lan as a search domain to the clients (will show up as domain lan or search lan in the /etc/resolv.conf file of your Mac client for example), so that you don't even need to use the .lan prefix when using other computers host names.

  2. Multicast DNS is a server-less method, highly used by Apple but also implemented in Linux (avahi) and Windows. It allows you to access other hosts by the domain .local. Instead of asking a configured name server, when trying to resolve a .local hostname your computer simply broadcasts the request in the local network and some computer might reply with "hey, thats my name, here, thats my IP address"

The latter often works out of the box (if you have multiple Mac's on the network you can definitely use that method to address them, thats also the way they "discover" each other so you can use file sharing etc. through Finder). In your case, mDNS is probably what makes it possible for you to resolve your Macs name from the Windows machine. Your windows however does not seem to reply to mDNS requests (probably firewalled? Can' really help here, don't use Windows anywhere)

If you want the first (more controlled method) you need to check your routers firmware on how to enable that feature. If your routers firmware doesn't support that feature you might want to try using OpenWRT instead of the stock firmware.

  • Yeah, I already tried all those variations from my Mac - .lan, .local and without the suffix too. I keep getting `ping: cannot resolve <host>: Unknown host
    – alimbada
    Jul 28 '11 at 13:01
  • I don't know how good the windows support for the whole zeroconf thing is. Maybe it can only resolve others names, but doesn't provide it itself. For a more solid solution you probably want to go the DNS server way, i.e. try to enable that on your router
    – barbaz
    Jul 28 '11 at 13:06
  • I think I'll eventually be going the OpenWRT/dd-wrt route. That was the main reason I bought this particular router in the first place.
    – alimbada
    Jul 28 '11 at 13:27
  • I can only recommend that. dnsmasq (the daemon used for DHCP and DNS on OpenWRT systems) will provide you with your hostnames by default. If possible stay away from dd-wrt and choose OpenWRT if the device is sufficiently supported.
    – barbaz
    Jul 28 '11 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.