Bug 4545 - Feature request: Samba 4 should support LLMNR
Summary: Feature request: Samba 4 should support LLMNR
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: samba4-qa@samba.org
: 4570 (view as bug list)
Depends on:
Reported: 2007-04-25 06:18 UTC by David Holder
Modified: 2015-08-29 22:26 UTC (History)
3 users (show)

See Also:

Wireshark trace of LLMNR (15.67 KB, application/vnd.tcpdump.pcap)
2015-05-21 15:15 UTC, David Holder
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Holder 2007-04-25 06:18:07 UTC
Samba4 does not support Link-local Multicast Name Resolution as defined in RFC 4795. Vista and Longhorn both use LLMNR for duplicate name detection and for name resolution in networks with and without other name resolution mechanisms (i.e. DNS). 
A overview of name resolution with LLMNR can be found at http://www.microsoft.com/technet/community/columns/cableguy/cg1106.mspx#EME.
Vista and Longhorn use this to resolve unqualified names and names ending in .local.
LLMNR can be observed on the wire when using Vista and Longhorn, during boots and when resolving a name (e.g. when mapping a share if the host does not have DNS configured).
LLMNR should be implemented in IPv4 and in IPv6.
Let me know if I can help. I can produce traces and test any attempts at an implementation.
Comment 1 Andrew Bartlett 2007-07-16 23:17:18 UTC
I think we should try and work with the Avahi project for this, as they want this feature, and we should be able to just be another published service for them. 
Comment 2 David Holder 2007-07-17 04:16:25 UTC
Good idea. They are hoping to add support for LLMNR this year. See http://avahi.org/wiki/GoogleSummerOfCode.
Comment 3 Matthias Dieter Wallnöfer 2008-05-22 05:25:05 UTC
Do we have some progress here?
Comment 4 Andrew Bartlett 2008-05-22 20:42:03 UTC
Avahi has a Google Summer of Code student tasked with implementing this.

After that, as this is just used for name resolution, we should just rely on the host being correctly configured to use mdns for name resolution/advertisement. 
Comment 5 Matthias Dieter Wallnöfer 2008-08-14 11:28:59 UTC
Mark this as "Feature request".
Comment 6 Andrew Bartlett 2009-03-26 16:45:15 UTC
Code to integrate with Avahi (but not in the way this bug wants) just landed in the source3 side of master.  This would be the starting point for Samba's side of the avahi integration.
Comment 7 Björn Jacke 2013-07-17 20:24:32 UTC
as this is a pure resolver issue that should be handled by nsswitch and avahi we should close this bug here. There is nothing samba can or should do. If one day Avahi gets a new maintainer and LLMNR will be finally end up in an upstream release then it will just work for smbclient and any other application that uses DNS. For the server side this is not used anyway.
Comment 8 Björn Jacke 2013-07-17 21:10:17 UTC
*** Bug 4570 has been marked as a duplicate of this bug. ***
Comment 9 Kaz Nishimura 2013-11-22 07:38:48 UTC
If you would be interested, I am now working on a stand-alone resolver implementation <https://sourceforge.net/p/xllmnrd/>.  Just FYI.
Comment 10 David Holder 2015-05-21 15:15:05 UTC
Created attachment 11080 [details]
Wireshark trace of LLMNR

This was created using two Windows Server 2012R2 nodes which were both configured with IPv6 addresses (link-local and global). There were not members of a domain.

To force LLMNR queries I used ping with the name of one or the other server or nodes that do not exist.
Comment 11 David Holder 2015-05-21 15:28:11 UTC
As discussed at SambaXP 2015 we are going to look again at adding LLMNR support to Samba. The plan had been to leave it to others to create an LLMNR NSS module. No suitable implementation has yet appeared.

Given that Samba will operate in environments where LLMNR might be necessary (particularly when Samba is embedded in NAS devices) it was decided that LLMNR needs to be added.

My previous comment (above) includes a Wireshark trace of LLMNR. Note I did this for IPv6-only, but of course LLMNR can also resolve IPv4 addresses.

There have been two attempts to implement LLMNR elsewhere that may be worth looking at:

1) An Avahi patch that has never made it into a released version, see http://www.avahi.org/ticket/339#no1.
2) xllmnrd see http://sourceforge.net/projects/xllmnrd/.

I have not tried either of the above.

Note that (2) only implements a responder for a Linux server. It does not implement the resolver side of LLMNR.
Comment 12 Jose M. Prieto 2015-08-29 22:26:10 UTC

FYI - I just submitted following bug with a contribution that implements a WSD and LLMNR server based on Samba4 code. You can take a look at:


Jose M. Prieto