I have a script on my XP machine that needs to contact my OSX machine by ip address. The OSX machine uses DHCP, and the ip address changes daily. However, it has a static computer name and netbios name (the same) that I assume could be resolved to the ip address somehow for the script to use.

So I'm looking (guessing) for command(s) that might reveal the ip address of the OSX machine from the XP machine using (at most) the OSX static computer name.

What I've tried:

ping my_osx_comp_name -> not found

ping my_osx_comp_name.local -> not found

arp -a shows an ip address for the OSX machine but not a name.

If I assume for the moment that I had the current dynamic ip address ( but not the name (for the sake of diagnosing),

tracert shows a single hop but no name resolution.

ping -a pings successfully but shows no name

nbtstat -A -> host not found

I did make sure that they are in the same workgroup "WORKGROUP". They are also on the same LAN with the same default gateway and subnet mask.

What else can I do or might I have wrong? Do I need a WINS server?

Like I said, I'm guessing at solutions. I'm not that familiar with NETBIOS, WINS, etc.

  • Did you try --- nbtstat -A – bryan Sep 21 '11 at 16:16
  • Does the OSX machine HAVE to use DHCP? I've set up my computers at home to have static IPs, and anyone who comes and connects to the wifi gets assigned one from DHCP. – Rob Sep 21 '11 at 16:19
  • @bryan - yes, you may have seen the question before my typo fix (netstat->nbtstat). – Keith Bentrup Sep 21 '11 at 16:28
  • @rob - yes, i must use dhcp. i can not edit the router's settings. – Keith Bentrup Sep 21 '11 at 16:28

Paragraph 2 is a little confusing.

Can you please clarify what you have and what you are looking for.

If you have the computer name you can ping it to get the ip address -

ping computername

If you have the ip address you can use the following to get the name -

ping -a ipaddress


nbtstat -A ipaddress

  • I edited the question. Hopefully, it's more clear now. – Keith Bentrup Sep 21 '11 at 15:49

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.