[Dnsmasq-discuss] Multicast dns

Simon Kelley simon at thekelleys.org.uk
Mon Apr 23 13:54:46 BST 2007


Tom Fanning wrote:
> <snip>
> 
>> What behaviour is needed? If the problem can be solved by having the
>> DNS server return "No such domain" for anything that ends in .local, 
>> then such behaviour is already available: adding
>>
>> local=/local/
>>
>> to /etc/dnsmasq.conf will do it.
>>
>> Other special-case behaviour for a domain is easy to implement, but
>> only if we know what is needed.
> 
> Hi Simon
> 
> No. I wanted to go the other way with this.
> 
> I was actually hoping dnsmasq could be extended to reply properly to these
> multicast DNS lookups that Ubuntu seems to be making - dnsmasq here appears
> to ignore them and the query just times out. (It may be that I've just not
> configured something right but I couldn't spot anything obvious)
> 
> My thinking here is now that Ubuntu is making such inroads into desktop
> Linux use that it would be nice to support its out-of-the-box behaviour.
> (Yes I'm aware that Ubuntu (arguably) shouldn't make the assumption that
> .local names should be looked up through multicast DNS, but I think it's
> more likely that this will get fixed here than in Ubuntu.)
> 
> The packet trace I linked to is complete and shows a series of three
> lookups.
> 
> This site has lots of details on multicast DNS
> http://www.multicastdns.org/
> 

OK, my understanding (which might be wrong) is this:

Ubuntu have enabled mdns by default, which means that DNS queries for
the .local domain are being sent to the well-known multicast address
associated with mDNS, and port 5353. Since dnsmasq is not listening on
these ports, it never sees the queries.

Tom has been bitten because he is already using .local for private
domain names (Why didn't the mDNS people pick .mdns instead, this clash
seems rather easily predictable?)

The idea in mDNS is that there is not a "DNS server" everything on the
network listens to the multicasts, and when it sees a request for an
address in knows, it replies, otherwise it keeps quiet.

Thus to find "myprinter.local" in the DNS, you don't need to configure
DNS at all, you just plug in a printer which knows its name is
"myprinter", when is see an mDNS request for "myprinter.local" it replies.


It would be possible to make dnsmasq listen for muticast DNS queries
quite easily, but the question, then, is what should it respond to and
what should it forward? Doing the same as for "ordinary" DNS and
attempting at answer every query completely defeats the distributed
nature of mDNS, but it would solve Tom's immediate problem.

On the other hand, just editing /etc/nsswitch.conf to remove the mDNS
resolver would do the same thing.

Hmm, difficult.


Cheers,

Simon





More information about the Dnsmasq-discuss mailing list