12

I am a bit lost in the terminology. I wanted to start to use Bonjour. As the first step, I tried to find an easy way to use it. And I thought that I, probably, can call Bonjour from the command line to register and discover services.

When I asked other people how to do it, I was told about mDNS (which works for Mac and Linux but not Windows). People also told me that I can use "dns-sd" (which works on Windows). I was told that "dns-sd" is just an alias for mDNS.

But! Later I found out that DNS Service Discovery and Multicast DNS are two different things (which are compatible and work especially well when are used together but they do not require each other).

Moreover, it seems to me that mDNS and DNS-SD are two of three main components of Bonjour. Is it right? Can I use them without Bonjour? On my Windows 7 I have installed Bonjour and I was able to run "dns-sd" in the command line. But I am unable to run mDNS.

So, I am kind of confused at the moment. Can anybody, pleas, clarify the situation a bit?

Roman
  • 2,439
  • 9
  • 32
  • 32

1 Answers1

8

I just answered your previous question over here.

I think that answer covered the questions you asked here, but just in case:

Bonjour consists of 3 parts:
1. IPv4 (and IPv6) link-local addressing (169.254.0.0/16 addresses in IPv4).
2. Multicast name resolution (via the mDNS protocol). This allows hosts on an ad-hoc or isolated LAN to automatically map host names to IP addresses for each other by multicasting out DNS queries and responses amongst themselves, without needing a traditional unicast DNS server.
3. DNS Service Discovery, which allows you to discover the names and details of services of a given type. On a local network, DNS service discovery is typically done via mDNS as well, but via "Wide Area Bonjour" you can actually do DNS Service Discovery for an entire domain via a unicast DNS server.

The dns-sd tool lets you do all the queries/lookups necessary for parts 2 and 3, which I gave examples of in my answer to your other question.

I think part of your confusion is coming from the fact that there are command-line tools with the same names as the protocols. mDNS is the name of the multicast Domain Name Service protocol, but it's also the old name of a common command-line tool for sending mDNS protocol queries and receiving responses. "dns-sd" is the current name of the most common command-line tool for doing DNS service discovery, as well as for doing multicast name resolution lookups. Both of those command-line tools generally call APIs that are handled by the "mDNSResponder" background process / service / daemon.

Spiff
  • 2,496
  • 16
  • 17