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

5

1

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

Jed

Posted 2012-04-22T17:06:07.087

Reputation: 315

Answers

3

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.

Piskvor left the building

Posted 2012-04-22T17:06:07.087

Reputation: 2 277

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)

Milliways

Posted 2012-04-22T17:06:07.087

Reputation: 512

Does this allow Windows machines to connect to the OS X machines the same way? – Lèse majesté – 2012-04-24T21:46:33.947

1Provided 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 – Milliways – 2012-04-25T01:46:02.593

1

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.

Sarge

Posted 2012-04-22T17:06:07.087

Reputation: 717

How does assigning static IPs allow you to reference computers by name? – Lèse majesté – 2012-04-22T18:35:43.360

@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. – Sarge – 2012-04-24T00:32:47.070

1You 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é – 2012-04-24T07:23:09.870