Referencing computers by their name between OS X and Windows operating systems

5,733

Solution 1

Install Bonjour for Windows on your Windows hosts (it's a part of the OS on Mac OS X already, no need to install there; for Windows, you can download it from Apple as a part of Bonjour Print Services). This way, each of the computers will "see" the others as hostname.local, where "hostname" is the name of that computer.

Solution 2

I am assuming you don't just want to ping the Windows machines, but connect to them.

I have enabled sharing to a network including many Windows computers (even including ME) without installing any special software (although Bonjour is a good idea).

Firstly you need to enable Windows Sharing (in System Preferences/Sharing/File Sharing). You also need to ensure all computers are using the same Workgroup (set in Network/Wi-Fi/Advanced/WINS). NOTE Different versions of windows use different default Workgroups - you should ensure these are all the same - preferably chose your own name.

Even after doing this (and restarting the windows machine if Workgroup is changed) it can take while for computers to discover each other. This is limitation of the SMB protocol.

You can connect to the Windows machines in Finder Connect to Server at smb://ComputerName (This doesn't make ping work)

Solution 3

You can just add .local to the server name. That would be: SERVER-1.local

So, your URL would be: http://SERVER-1.local/foo/bar/etc

Solution 4

Two ways I can think of:

  1. Provide a DNS server on your local network
  2. Assign static IPs to your Windows computers

Depending on your switch/router you may be able to read the DHCP clients table from it or reserve your IPs by MAC address.

Share:
5,733

Related videos on Youtube

Jed
Author by

Jed

Updated on September 18, 2022

Comments

  • Jed
    Jed over 1 year

    I just got an iMac and have connected it to my existing network (a Workgroup not a Domain) of computers that are all running Windows (XP, Server 08 R2, Win7).

    From the iMac, I can successfully PING all Windows machines by their IP Address. However, I am unable to PING the Windows computers (from the iMac) by their computer name.

    What do I need to install/configure/etc in order to be able to PING by computer names instead of IP Addresses?

    By the way, I have successfully setup my iMac's hosts file so that the computer names are known to the iMac. However, I don't prefer this solution since it requires that the Windows computers have a static IP Address.

    UPDATE

    In response to @Milliways -

    I'm not just wanting to PING the Windows machines from the iMac. What I'm really trying to solve here is, this...

    Some of the Windows machines are running a Web Server. Currently, I am able to browse those web sites from the iMac by opening up Safari/Chrome/etc and connecting to the URL of the local IP of the server - in other words, from the iMac, I can successfully connect to "http://192.168.1.10/foo/bar/etc".

    I am trying to figure out how to configure my iMac so the iMac can use the machine name in the URL instead of the IP - eg: "http://SERVER-1/foo/bar/etc".

    One thing I should note here is that on my iMac I have a Windows virtual machine (via Parallels). This virt can successfully connect to the Windows Web Servers that are on the network via the machine name. In other words, if I open a browser in the virtual machine, I can successfully connect to "http://SERVER-1/foo/bar/etc".

    I mention this virtual machine scenario because it reveals to me that there must be a missing/unconfigured mechanism on the iMac machine that is making NetBios to not work (as opposed to something that is missing/unconfigured on the Windows machines and/or my router).

  • Lèse majesté
    Lèse majesté about 12 years
    How does assigning static IPs allow you to reference computers by name?
  • user714403
    user714403 about 12 years
    @Lèsemajesté, If you set a static IP you can then edit your hosts file to act as sort of a poor man's DNS. For example, the following entry in your hosts file: 192.168.1.15 Media and provided you had a system with that IP on your network, you could access its resources by name vs using its IP. Names being easier to remember.
  • Lèse majesté
    Lèse majesté about 12 years
    You should probably include that in the answer, otherwise it's a little misleading. Setting static IPs is easy. Distributing & keeping a bunch of HOSTS files updated on a large network is the hard part.
  • Lèse majesté
    Lèse majesté about 12 years
    Does this allow Windows machines to connect to the OS X machines the same way?
  • Milliways
    Milliways about 12 years
    Provided the Mac has a NETBIOS name and at least one sharable folder. You can find in My Network places, but I find the command line easier e.g. NET USE X: "\\Computer Name\Shared Folder Name" NOTE it can take a few minutes and a few tries before SMB finds the Mac
  • Nevets
    Nevets about 2 years
    THIS!!! ^^^ I simply added .local to the host name and ping managed to resolve the hostname to the IP address (the requests timed out, but that's not my concern - previously it could not resolve the hostname to the IP). I also managed to create an RDP connection from my Mac to Windows 10 PC. Thank you!