MacOS – How does finder show a pc computer name but I can’t ping it

macosNetwork

I have a MBP running 10.6. This is my first mac.

In finder, it sees the windows 7 machines and windows home server just find. I can click on those computers and see their shares. If I open up terminal and try to ping the computer name, it doesn't resolve. I have had to add the computers to the host file. I don't understand why finder appears to associate the name with the correct server from the terminal doesn't. Can somebody explain it or explain how I can get the same behavior from terminal?

Best Answer

If a machine is found via Bonjour/multicast DNS, you may need to add a .local suffix to use the hostname in Terminal. If it was found via NetBIOS (either broadcast or WINS), you may need to use nmblookup to get an IP address:

rushlight:10120 Z$ nmblookup mress
querying mress on 10.0.204.255
10.0.204.14 mress<00>
10.0.204.14 mress<00>