I have list of computers on my "Shared" sidebar, however I don't have their IP addresses.

My router has their IP addresses, however there is no computer-name <> IP address mapping.

How do I find the mapping of computer-name <> IP address?


You can use a tool like Bonjour Browser or dns-sd(1) to browse services, find the hosts publishing those services, and find the IP addresses of those hosts.

With dns-sd, it might go something like this:

  1. Find hosts sharing files via the Apple Filing Protocol (AFP):

    dns-sd -B _afpovertcp._tcp local

    This will give you a list of AFP file services on your local network. You'll have to Ctrl-C out of dns-sd to get back to the shell prompt.

  2. After picking the name of an AFP service from the list, you can find out the .local hostname of the host providing that service like this:

    dns-sd -L MyOtherMac _afpovertcp._tcp local

    Again, Ctrl-C out of it after you get your answer.

  3. Resolve the "hostname.local" style mDNS host name to a set of IP addresses:

    dns-sd -G v4v6 MyOtherMac.local

    Again, Ctrl-C out of it after you get your answer.

| improve this answer | |
  • 1
    thanks. what about finding windows/netbios mapping ? – Don Ch Jul 1 '12 at 16:11
  • Sorry I am very bad in regular expression.. can you give me some hints to do this with a script and repeat it for each computer on my network? – nkint Oct 14 '14 at 23:11

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.