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.

Franziska Perryman on Tuesday, April 22, 2025 at 23:19

Every day, websites like dzhang.com lose valuable traffic opportunities. Don’t let yours be one of them. Our AI-powered traffic system is designed to increase exposure and bring highly targeted traffic to your site.

Claim your 4,000 free visitors to experience the benefits firsthand. Then, expand to plans offering up to 350,000 visitors per month. It’s time to achieve your website’s true traffic potential. Get started here: https://ow.ly/u9i050Vycwj

Lovie Friese on Wednesday, April 23, 2025 at 23:59

Your website, dzhang.com, has the potential to reach far more visitors than it currently does. Many sites overlook a thousand potential visitors every day. That’s where our automated traffic system makes a difference—delivering targeted visitors straight to your site.

Start with a complimentary 4,000-visitor boost to experience the benefits. Then, scale with packages offering up to 350K visitors monthly. Let’s enhance your traffic today. Get more info here: https://ow.ly/Euge50Vycxu

Vonnie Chick on Thursday, April 24, 2025 at 06:20

Is your dzhang.com website getting the traffic it deserves? Many websites overlook thousands of visitors daily due to not being optimized for reach. With our AI-powered traffic solution, you can reach a much larger audience.

To show you the impact, we’re offering a free trial that delivers 4,000 highly targeted visitors to your website. See the results firsthand, and then scale up to 350,000 visitors per month with our advanced packages. Let’s elevate your website’s traffic and turn visitors into opportunities. Get more info here: https://ow.ly/Euge50Vycxu

Add a comment

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

Comment: