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


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.

Hilda Flinn on Sunday, January 19, 2025 at 04:22

Your website, dzhang.com, might be reaching so many more people! On average, sites like yours miss out on over a thousand potential visitors daily. That’s where our AI-powered traffic system helps—it’s designed to drive relevant visitors straight to your site.

Take the first step with a complimentary 4,000 targeted visitors to see the impact firsthand. Afterward, our plans provide up to 350K, helping your website grow its audience and engagement effortlessly. Get more information here: https://shorten.ee/0qVge

Latoya Edgell on Tuesday, January 21, 2025 at 16:08

Are you making the most of the potential of your dzhang.com website? Many sites lose thousands of visitors daily simply due to a lack of reach. With our AI-driven traffic solution, we can help you tap into this unrealized audience.

To prove the value, we’re offering a free trial that delivers four thousand highly targeted visitors to your site. Once you see the results, you can scale up with packages that provide up to 350K visitors per month. Let’s amplify your website traffic and turn more visitors into opportunities. Get more information here: https://shorten.so/L1T47

Add a comment

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

Comment: