[OSX] Connecting to local PC by name


Recommended Posts

Say I have two machines both running XP, one called Aadvark and one called Bear.

I can ping Bear from Aadvark by simply doing "ping bear" in a command window. I could also connect to eg a HTTP server on Aadvark by connecting to http://aadvark in Firefox.

I would like to do this on OSX, but I can't find any way to enable it (without adding an entry to /etc/hosts)

Is it possible?

Thanks!

Link to comment
https://www.neowin.net/forum/topic/647857-osx-connecting-to-local-pc-by-name/
Share on other sites

on the menu bar, there is an option " Connect to Server " forget what menu its in

type SMB:\\Computername\

should connect fine after that

( i am assuming you want to connect to a Share for Computer-Computer File Transfer )

  Hell-In-A-Handbasket said:
on the menu bar, there is an option " Connect to Server " forget what menu its in

type SMB:\\Computername\

should connect fine after that

( i am assuming you want to connect to a Share for Computer-Computer File Transfer )

Actually, shouldn't that be...

smb://COMPUTERNAME/?

I've been doing it that way for years without flaw. :)

i always mess up the \\ - //'s

but now that im in front of my laptop i can do the SS of what its suposed to look like

post-36462-1215581068_thumb.jpg

just change the death2000 to whatever the other computers name is, the C$ is the directory you want to connect to ( should not need it )

you may have to Add the IP of the box your connecting from to the Firewall if its not working

Edited by Hell-In-A-Handbasket

Hello all, thanks for the tips but I think I did not explain myself very well.

I know I can connect to the share via the name, that is not a problem. What I want to do is connect to eg HTTP servers, or ping the machine based on this same name.

You can do this in Windows, but I have not found a way to enable it in OSX.

See pic (I have connected to 'Storage' on Hive, but I still cannot ping the machine by it's name)

post-35185-1215585912_thumb.jpg

I could ask why you'd want to... I can already tell you it'd be around <1MS over wired and 15MS over wireless, but I wont.

Doing it by IP in terminal is easy

$asphyxia8489-asphyxiabook Ping 192.168.0.3

Doing it by hostname should be the same

$asphyxia8489-asphyixabook Ping Server

just to note, I've never done it by host name, infact I never use hostnames at all, Static IPs FTW

  Vegetunks said:
I could ask why you'd want to... I can already tell you it'd be around <1MS over wired and 15MS over wireless, but I wont.

Doing it by IP in terminal is easy

$asphyxia8489-asphyxiabook Ping 192.168.0.3

Doing it by hostname should be the same

$asphyxia8489-asphyixabook Ping Server

just to note, I've never done it by host name, infact I never use hostnames at all, Static IPs FTW

He is asking the question though, and I don't think he is actually wanting ping results to be honest.

Plus why would you use IP addresses when you can use computer names, or a host file that points to the IP address (though he is not wanting to do this).

is netbios installed / enabled in your ip stack on the windows machine.

windows may automatically resolve the IP from the name

OffRoadAAron - regardless if you use hostnames or IP's, the Hostname gets resolved to an IP address imo, using the IP just makes the translation quicker

Actually trying IP Direct might be a good way just to check out connectivity versus a resolving problem.

Give that a try. For example.

smb://10.0.0.0/

If that works, there is a problem in resolving, not in connecting. :p

  Hell-In-A-Handbasket said:
OffRoadAAron - regardless if you use hostnames or IP's, the Hostname gets resolved to an IP address imo, using the IP just makes the translation quicker

yet this is still not what he is asking! its really not quicker, I mean the computer looks at the host file first and then puts it out to the web, it might be slightly faster than looking netbois styles the first time you make that connection, but after that its in your arp and the computer knows where the machine is anyways.

i already know that the hostname gets resolved to an IP address thats a given.

I can ping the other PCs on my network using their host names from my MacBook Pro (running Mac OS X 10.5.4), the PCs are running Windows XP Professional with Service Pack 3. The router I am using is a Linksys WRT300N v1 with DD-WRT v24 final release, all IP addresses on the network are assigned by MAC address through DHCP/DNSMasq.

$ ping dell-opgx100
PING dell-opgx100 (192.168.1.103): 56 data bytes
64 bytes from 192.168.1.103: icmp_seq=0 ttl=128 time=0.839 ms
64 bytes from 192.168.1.103: icmp_seq=1 ttl=128 time=1.466 ms
64 bytes from 192.168.1.103: icmp_seq=2 ttl=128 time=1.394 ms

$ ping dell-dim3000
PING dell-dim3000 (192.168.1.101): 56 data bytes
64 bytes from 192.168.1.101: icmp_seq=0 ttl=64 time=7.069 ms
64 bytes from 192.168.1.101: icmp_seq=1 ttl=64 time=2.644 ms
64 bytes from 192.168.1.101: icmp_seq=2 ttl=64 time=1.334 ms

Problem solved! Quite embarassingly simple really!

The solution is to ping/connect to computername.local rather than just computername.

I have no idea why or how this is different - nor can I find where this .local domain comes from.

post-35185-1215621082.png

See the difference there? :D

  offroadaaron said:
I guess you could configured WINS in the networks settings to whatever workgroup and stuff and see if that helps, though i've never had to.

Indeed, I have tried that, from what I can see it makes no difference.

  Vegetunks said:
just to note, I've never done it by host name, infact I never use hostnames at all, Static IPs FTW

Yes, but what if you do not have the static IPs memorized? For example if you are working at an unfamiliar office, or at your friends house?

  offroadaaron said:
He is asking the question though, and I don't think he is actually wanting ping results to be honest.

Plus why would you use IP addresses when you can use computer names, or a host file that points to the IP address (though he is not wanting to do this).

Exactly. The problem with the hosts file is that this is laptop I use on other networks than my own, so I cannot rely on the entries being correct.

And yeah I want to use this for much more than pinging! :p

  Hell-In-A-Handbasket said:
is netbios installed / enabled in your ip stack on the windows machine.

windows may automatically resolve the IP from the name

Yes, unfortunately it already is.

  Cara said:
Actually trying IP Direct might be a good way just to check out connectivity versus a resolving problem.

Give that a try. For example.

smb://10.0.0.0/

If that works, there is a problem in resolving, not in connecting. :p

Yes, that does work, as indeed does smb://pcname/ but that is not the problem. Try pinging the machine with the name name you used in the smb:// string.

  Menge said:
i usually have trouble having my MacBook resolve other Windows computers' names on my network. my bookmarks are, in fact, static IP addresses that they receive instead of their names. turns out it's more reliable.

Not if a machine has to change addresses!

  offroadaaron said:
yet this is still not what he is asking! its really not quicker, I mean the computer looks at the host file first and then puts it out to the web, it might be slightly faster than looking netbois styles the first time you make that connection, but after that its in your arp and the computer knows where the machine is anyways.

i already know that the hostname gets resolved to an IP address thats a given.

Thanks you're right.

  Cadium said:
I can ping the other PCs on my network using their host names from my MacBook Pro (running Mac OS X 10.5.4), the PCs are running Windows XP Professional with Service Pack 3. The router I am using is a Linksys WRT300N v1 with DD-WRT v24 final release, all IP addresses on the network are assigned by MAC address through DHCP/DNSMasq.

$ ping dell-opgx100
PING dell-opgx100 (192.168.1.103): 56 data bytes
64 bytes from 192.168.1.103: icmp_seq=0 ttl=128 time=0.839 ms
64 bytes from 192.168.1.103: icmp_seq=1 ttl=128 time=1.466 ms
64 bytes from 192.168.1.103: icmp_seq=2 ttl=128 time=1.394 ms

$ ping dell-dim3000
PING dell-dim3000 (192.168.1.101): 56 data bytes
64 bytes from 192.168.1.101: icmp_seq=0 ttl=64 time=7.069 ms
64 bytes from 192.168.1.101: icmp_seq=1 ttl=64 time=2.644 ms
64 bytes from 192.168.1.101: icmp_seq=2 ttl=64 time=1.334 ms

That's interesting. Do you have a Windows domain setup? Or is it a normal workgroup?

  hornett said:
Yes, that does work, as indeed does smb://pcname/ but that is not the problem. Try pinging the machine with the name name you used in the smb:// string.

Works fine for me actually... For example

smb://Dell755/

and

ping Dell755

Both work. :)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.