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: 2023-03-02 08:29 UTC (History)
4 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
Comment 13 Stefan Metzmacher 2022-02-11 10:18:16 UTC
See also https://bugs.launchpad.net/bugs/1831441 and https://salsa.debian.org/grantma/wsdd
Comment 14 Louis 2022-02-11 12:14:54 UTC
See also. 

and its source :  https://github.com/Netgear/wsdd2 

just had a small look over its code and with few small changes it builds fine. 
i have a wssd2 for bullseye build currently. 

also, we should keep an eye on that is not conflicting with systemd.

systemd as of version 229 does have LLMNR support in it. 
Comment 15 Louis 2022-02-11 12:18:41 UTC
(In reply to Louis from comment #14)
to be added, the setup of Matthew Grant and wssd is way more up2date for debian on salsa then the one i showed from netgear/wssd2
Comment 17 Frank K 2023-03-02 06:27:03 UTC
Here is the “side stream” I think the originator of the code used in netgear where I have added an issue cross referencing this bug report:


This bug report has been open since 2007. I have using wssd code for several years (not that that matters lol) but I think it is pretty good.

I think the ietf issues are long gone? 2015? This code works with I think windows 7-11, and it is a great quality of life enhancement for M$ seeing shares on the net. There might be some pushback in which case make it optional in the first release….. 

Thanks to whole Samba your all of their great work over the years!
Comment 18 Björn Jacke 2023-03-02 07:56:19 UTC
closing this (again) as there is no requirement to implement this in Samba. LLMNR can happily live in external implementations (client and server wise) as it did over the last years already.