How do I get the machine name from an IP via Multicast DNS?

Posted by Adam on Server Fault See other posts from Server Fault or by Adam
Published on 2010-05-18T23:11:29Z Indexed on 2010/05/18 23:20 UTC
Read the original article Hit count: 224

Filed under:

I have a list of IP addresses on a network, and most of them support multicast DNS. I'd like to be able to resolve the server name instead of just having the IP address.

ping computer.local
64 bytes from 192.168.0.52: icmp_seq=1 ttl=64 time=5.510 ms
64 bytes from 192.168.0.52: icmp_seq=2 ttl=64 time=5.396 ms
64 bytes from 192.168.0.52: icmp_seq=3 ttl=64 time=5.273 ms

Works, but I'd like to be able to determine that name from the IP. Also the devices don't necessarily broadcast any services, but definitely do support mDNS broadcast. So looking through services won't work.

© Server Fault or respective owner

Related posts about mdns