| mdnsd(8) | OpenBSD System Manager's Manual | mdnsd(8) |
| mdnsd | [-dvw] ifname [ifnames ...] |
MDNS is a way to perform DNS-like operations via multicast on the local link, there is no hierarchy or multiple domains as in conventional unicast DNS. MDNS provides a way for hosts to co-operate and maintain a cache name database which can be used to resolve local host names without the need of a central DNS server.
DNS-SD is a convention on some names used in MDNS to provide hosts with Service Discovery capabilities.
There are basically two roles in a MDNS environment, the Querier, and the Responder.
The Responder is the entity responsible for answering those queries, there should be only one responder per host. Both roles are performed by MDNS.
There are three basic types of MDNS question, in which mdnsd uses two of them.
Continuous Multicast Query is a more complex way of querying, the querier will send the same question multiple times, doubling the interval between each time and multiple answers and be received, it's used as a way for monitoring the Resource Records on the network. This question is mainly used by network browsing in DNS-SD, where a question for a type of service may enumerate one or more instances, for example, if browsing for the HTTP servers, there may be one or more servers (instances).
There are two type of Resource Records, Unique and Shared.
Unique records are the ones which there may be only one answer for it in the local name, the A, PTR and HINFO under the hostname.local name is an example of Unique record, it would be strange if two hosts would answer an address for the same foobar.local. All Unique records must be Probed to verify it's uniqueness, if a conflict is found, another name must be chosen (Unimplemented).
A Shared record is used for PTR records in DNS-SD, a host may have as many answers as necessary for a shared record, it's used only in network browsing, where there may be multiple instances of the same service. To access the MDNS services, a libmdns library will be provided in the near future, programs will then, be able to link with libmdns and publish its own services though MDNS. By now, only mdnsctl(8) is provided which is a command line interface to the daemon in the same fashion as ripctl(8) and ospfctl(8).
When mdnsd starts up, it probes for it's hostname, fetched from /etc/myname, on the network and if there isn't a conflict, it publishes an A and a PTR record for itself, both records will be under the .local domain, which is the MDNS single domain name. All the other domain names in /etc/myname will be stripped, therefore foo.bar.midearth becomes foo.local, which can be resolved through MDNS. If a conflict is found, read, there is another foo.local in the network, conflict resolution will take place (Unimplemented yet).
If -w was not specified, mdnsd will also publish a Workstation service, this service has no data itself, it's used to state that the host is up, it can be used for example, to browse every powered host on the local network.
mdnsd supports multiple interfaces, the interfaces used must be specified as the arguments. mdnsd must be started as root and upon start up it will drop privileges, change it's euid/egid to _mdnsd and chroot. Therefore make sure you have user and group _mdnsd created.
MDNS operations can be done with the mdnsctl(8) utility.
The options are as follows:
MDNS Draft, http://files.multicastdns.org/draft-cheshire-dnsext-multicastdns.txt, July 2010.
DNS-SD Draft, http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt, January 2011.
| February 6, 2011 | OpenBSD 4.9 |