Recently I came across avahi-daemon
and mdns
....
Do I need a mDNS client in my system to connect with mDNS server?
Or is there any other way to connect a computer without mDNS client to a mDNS server computer (hostname.local)?
Is it possible to ping from computer without mDNS service running.
1. What is mDNS?
To get the overall picture, you need to look at something named Zeroconf. The Zeroconf concepts were implemented first and fully by Apple, but Apple use the marketing name Bonjour (initially Rendezvous) for it. mDNS (multicast DNS) is part of this -- see below.
Apple uses Bonjour for...
...AirPrint (when iOS mobile clients are looking for an available printer in the LAN which they can use for "driverless printing"), or for
...CUPS printer shares to be published in the LAN, or for
...iTunes music library sharing on the LAN, and for
...many other services which should work without a central DNS server to be installed, configured and maintained.
Under Linux, these same concepts were implemented by the Avahi project.
Bonjour/Zeroconf has 3 major goals:
The complete technical Zeroconf concepts are specified in a series of RFCs, mainly:
One of the principal architects of Zeroconf was Stuart Cheshire. After writing down his thoughts about how to implement Apple's original ease of use AppleTalk Name-Binding Protocol over TCP/IP networking Stuart got hired by Apple to help implement the Zeroconf concept for Mac devices. He then also was a principal author of the above linked RFC documents.
Apple's Bonjour implementation is also available for Windows and Linux (although on Linux there is also an independent implementation named Avahi) as Open Source under the Apache License v2.0.
IANA runs a service names and ports registry, where developers who wish to define and develop new service types for their systems can reserve and register names for them.
2. Is it possible to make an mDNS query without an mdns service running?
Yes, it is.
Just run
to get a continuously updated list of service announcements from all nodes on your LAN and the services they offer. A more verbose output is listed by
The
-t
here also terminates the command automatically (and doesn't auto-update the list) after it can be assumed to have all currently active services discovered.You can browse for IPP-enabled (Internet Printing Protocol) printers like this:
The
-r
will "resolve" the found services and show a human readable name for them. The_ipp._tcp
is the (weird) name encoding for services you need to get used to if you study this topic in more details. In this case it is the precise syntax to be used for IPP services in the LAN. Example output for above command:You can also browse for services in a different domain, which exposes these to The Internet. One example domain were you may succeed with this (most of the time) is dns-sd.org:
I've copied part of this answer from the Bonjour tag info over at AskDifferent. However, most of this tag info article was written by me anyways, so I don't at all feel bad about it....