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 (6)


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.

Alphonse Maddox on Tuesday, December 9, 2025 at 14:55

Maximize your website’s potential with our AI-driven traffic service, providing targeted visitors for much less than paid ad platforms. Start now and see the impact.

https://ow.ly/H53R50XFOaY

Damion Serrano on Thursday, December 11, 2025 at 22:28

Our AI-powered service delivers high-intent visitors to your website, saving you money compared to traditional paid ads. Ready to enhance your online presence?

https://ow.ly/UVvP50XGmSa

Katharina Whitfeld on Friday, December 12, 2025 at 04:32

Boost your Dzhang Com website’s traffic with AI! Watch this to learn more: https://youtu.be/UEooLHpFYW0

Jesus Goldschmidt on Saturday, December 13, 2025 at 02:27

Grow your site’s audience with our AI-driven traffic service, significantly cheaper than paid ad platforms. Contact us to explore the benefits.

https://ow.ly/wgLc50XHtwH

Courtney Schiffman on Saturday, December 13, 2025 at 19:27

Boost your Dzhang Com website’s traffic with AI! Watch this to learn more: https://www.youtube.com/shorts/r4BbPCUYx9M

Add a comment

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

Comment: