MDNSD(8)

NAME
mdnsd - multicast DNS resolver

SYNOPSIS
mdnsd [-46DflmN] [-h hostname] [-p inport] [-P outport] [-r relayport] -i intface [server...]

DESCRIPTION
mdnsd serves as multicast DNS resolver. The program should be invoked on every node which speaks multicast DNS.

mdnsd will receive unicast DNS queries and forward the queries toward link-local multicast DNS address on intface, if the query is within “local.” domain. Whenever a reply comes back against the multicast queries, mdnsd will forward the reply to the original querier. mdnsd can also relay queries to unicast DNS server(s), if the query is outside of “local.” domain.

mdnsd will reply to multicast DNS queries from other nodes, to advertise mapping between the name of the local node and the addresses of the local node.

Therefore, if two or more nodes on the same link are running mdnsd, they can resolve their addresses without having to configure unicast DNS servers. Users just need to know the FQDN name for the neighboring node.

-4

-6  Controls the address family to use for DNS transport. By default mdnsd will listen to all the available address families.

-D  Enable trace messages for debugging.

-f  Run in foreground mode. Do not daemonize on invocation.

-h hostname
    hostname specifies local hostname that mdnsd will serve against incoming unicast/multicast queries. If ommitted, result from gethostname(3) will be used. hostname must be an FQDN, terminated by dot.

-i intface
    intface specifies outgoing interface for multicast queries. The flag is mandatory.

-l  Advertise scoped addresses against queries from IPv6 link-local address, or loopback address. Care must be taken if you enable it, scoped address and DNS are not really compatible.

-m  Be compatible with “mediator” DNS cache daemon. Redistribution of “mediator” code is (still) restricted, hence -m flag is not very useful for most of users. Do not send questions about this :-)

-N  Transmit ICMPv6 node information queries, instead of multicast DNS queries, for resolving names on the adjacent link. With the option, it is highly possible for mdnsd to respond with link-local addresses in DNS packet. Experimental. mdnsd must be invoked under root privilege to use this option.

-p inport
    mdnsd listens to UDP port inport for incoming DNS unicast queries, or unicast replies. By default, inport will be 53. -p is for debugging purposes only.

-P outport
    mdnsd accepts/transmits UDP multicast queries/replies to UDP port outport. By default, outport will be 5353. -P is for debugging purposes only ( for running two daemons on a single node).

-r relayport
    mdnsd relays unicast queries to port relayport. By default, relayport will be 53. This option is useful when mdnsd listens on the default DNS port on a node that runs a DNS caching server listening on a different port.

server
    Specify unicast DNS servers we may want to try sending queries. Users can list multiple DNS servers. server has to be numeric IPv4/v6 addresses.

mdnsd will generate status dump file on signal SIGUSR1.

FILES
/var/run/mdnsd.dump
    Status dump file.

EXAMPLES
First, run mdnsd on UDP port 53 (standard DNS UDP port). You need to be root to issue bind(2) on privileged port.

    # mdnsd -6 -i wi0

Then, configure resolv.conf(5) to resolve IP addresses from names using mdnsd. Notice the presense of “itojun.org.local.” and “local.” From the speficiation, we can only resolve names using multicast DNS, iff names are under local. domain.

    search itojun.org itojun.org.local local
    nameserver ::1

If you would like to contact unicast DNS servers as well, you may want to specify them on the command line. DNS queries will be sent to unicast servers, if the DNS name is outside of local.

    # mdnsd -6 -i wi0 3ffe:501:4819::42

Here is the sequence of events which would happen on a multicast name resolution:

•   An application on node A queries AAAA record of “b.local.”. The query is transmitted toward the address configured in /etc/resolv.conf, which is the loopback address.

•   The query reaches mdnsd on node A.

•   mdnsd on node A relays the query out to the ethernet interface, as multicast packet.

•   mdnsd on node B receives the packet, and finds out that it is asking for “b.local.”.

•   mdnsd on node B responds to node A, with the list of IPv6 addresses assigned to node B.

•   mdnsd on node A gets the reply from node B.

•   mdnsd on node A relays the response back to the application.

SEE ALSO
Levon Esibov, Bernard Aboba, Dave Thaler, July 2001, Multicast DNS, internet draft, draft-ietf-dnsext-mdns-03.txt, work in progress material.

HISTORY
The mdnsd command first appeared in WIDE/KAME IPv6 protocol stack kit.

BUGS
Specification conformance is still very low. Some of (or most of) the features are not implemented yet.

Since there is no standard IPv6 multicast address assigned for multicast DNS, we use linklocal all-node multicast address at this moment.

mdnsd is too aggressive when sending queries. For example, if you specify unicast DNS servers by server argument, mdnsd will transmit DNS queries every time a client asks mdnsd about the record. Instead, mdnsd should add some delay between subsequent transmissions, and implement cache mechanisms (both positive and negative).

mdnsd requires interface intface to be available and in IFF_UP state, on invocation. This may be too much to ask for laptop usage.

-N may not be very useful, as DNS responses will contain link-local addresses.

With -N mdnsd sends ICMPv6 node information queries to link-local all node multicast address (ff02::1). We should be using NI group address (ff02::2:xxxx:xxxx) instead, however, it is not useful right now due to deployment issues.

mdnsd relays EDNS0 pseudo RR from a original querier, while it should decide EDNS0 independently from the querier. Imagine cases where the original querier supports EDNS0, while multicast/unicast nameservers (which are the destination of the relayed packet) do not.

mdnsd uses “local.” instead of “local.arpa.” for mDNS suffix, to interoperate with Apple Rendezvous implementation in MacOS 10.2.

The latest mDNS/LLMNR spec does not recommend the use of domain suffix to switch between mDNS/LLMNR and DNS lookup.