Resolving IP addresses with Bonjour and mDNS

Wednesday, November 3, 2010


OS X uses this strange mDNS thing that I haven't studied much, but what I have gathered is that host and nslookup don't work for resolving hostnames over mDNS. The way to do this is to use dns-sd -G, like:

$ dns-sd -G v4 foobar.local

Tags: bonjour, dns, ip, mdns, resolve | Posted at 17:37 | Comments (4)


Comments

Max on Tuesday, June 3, 2014 at 04:33

Excelent! Note that you might want your command window 101 characters wide. Example output:

Timestamp A/R Flags if Hostname Address TTL

12:32:23.921 Add 2 12 unitname.local. 192.168.111.9 120

You will need to use CTRL+C to exit.

Tanesha Lundstrom on Tuesday, July 1, 2025 at 20:28

Boost your Dzhang website’s traffic with AI! Watch this to learn more: https://www.youtube.com/watch?v=0vQRdhaE2j8

Annette Zavala on Wednesday, July 2, 2025 at 17:13

Needing to energize your website visitors? Our smart technology attracts precise website traffic with keywords and regional data from countries to neighborhoods.
Looking for increased income, livelier pages, or expanded digital reach?
We craft it to your vision. Enjoy a 7-day free trial period with no contract. Start now:

https://cutt.ly/MrRRGFMv

Lorie Aylward on Wednesday, July 2, 2025 at 18:58

Struggling to get targeted leads to your Dzhang website? Watch this: https://www.youtube.com/watch?v=0vQRdhaE2j8

Add a comment

Name:
Email: (optional, not displayed to public)
URL: (do not fill this in — leave blank!)

Comment: