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.

Carmon Brehm on Saturday, June 14, 2025 at 03:15

Is your website dzhang.com failing to capture its true potential? With our automated traffic system, you can engage thousands of additional visitors daily—without any extra effort on your part.

Take advantage of our complimentary offer that delivers a 4,000-visitor boost so you can experience the impact. If you love the results, our plans offer up to 350K visitors per month. Let’s realize untapped potential for growth. Get more details here: https://cutt.ly/mrQWZMPb

Cameron Whitt on Saturday, June 14, 2025 at 21:21

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

Celinda Ullathorne on Sunday, June 15, 2025 at 20:16

Struggling with low website leads for Dzhang? This short video shows how our AI can boost your traffic: 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: