Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 (192.168.235.18) but not the name (for the sake of diagnosing),

tracert 192.168.235.18 shows a single hop but no name resolution.

ping -a 192.168.235.18 pings successfully but shows no name

nbtstat -A 192.168.235.18 -> 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.

share|improve this question
    
Did you try --- nbtstat -A 192.168.235.18 –  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
add comment

1 Answer 1

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

or

nbtstat -A ipaddress

share|improve this answer
    
I edited the question. Hopefully, it's more clear now. –  Keith Bentrup Sep 21 '11 at 15:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.