I found How can I disable LLMNR in systemd-resolved? useful for demonstrating how to disable LLMNR in systemd-networkd. However, ubuntu 18.04 uses netplan to configure the network rather than systemd-networkd (which manages it instead). So this solution doesn't work.

How netplan works is it directly manipulates the /run/systemd/network/*.network files using the keys in the /etc/netplan/*.yaml files (please see documentation on netplan.io site). According to netplan, you can set the relevant keys in the yaml file in netplan to configure hosts the way you would have had you used systemd-networkd instead (via /etc/systemd/network/). But I see no keys to control the LLMNR setting per interface.

How can I continue using netplan to configure my network (ala systemd-networkd), and have this value in the run files generated by netplan to properly control this setting?

What doesn't work:

  • Setting LLMNR=no to /etc/systemd/resolved.conf (this is a global setting, running systemd-resolve --status still shows LLMNR setting: yes)
  • Managing /var/run/systemd/network/*.network files after netplan has (they're dynamically created, so my changes are obliterated on reboot, service restart, etc)
  • (FYI: I'm managing several hundred hosts by generating the netplan yaml config on a control server, so high-maintenance configuration tasks that require lots of detailed specific information about a single host is less useful than a single setting I can apply across a hundred hosts).
    – Mercury00
    Jun 21, 2018 at 5:31

2 Answers 2


To disable LLMNR, add the following to /etc/systemd/resolved.conf:

  • 2
    This doesn't actually work. 1) that only changes the global setting, not the per-interface setting which is still on by default, and 2) that's not a netplan file.
    – Mercury00
    Jun 21, 2018 at 5:00
  • Note: my question specifically asks how to fix this in 1) a way that works, and 2) not this way.
    – Mercury00
    Sep 25, 2018 at 18:02

One solution has been proposed by Ryan Harper here:


You can create a .network file which will disable LLMNR on any interface like the following.




That will apply to any network interface, you can modify the [Match] section to pick interfaces you choose. The systemd-resolve --status output will show that LLMNR setting is applied to the interfaces as well.

In my own tests however, this didn't work as well with static addresses already using the [Match] section.

  • Don't do this - LLMNR is disabled but all IPs are gone as personally experienced and as reported by others in bugs.launchpad.net/netplan/+bug/1777523/comments/6, and if it's a remote server you may lose access to it May 13, 2021 at 10:51
  • That was my comment. I'm the one who did that. And that wasn't because llmnr was disabled, it was because the file was misnamed. I did find another way to disable llmnr, it's just very inconvenient, and it doesn't make ips disappear. See this comment for the update about that: bugs.launchpad.net/netplan/+bug/1777523/comments/8
    – Mercury00
    May 13, 2021 at 16:14
  • thanks for heads up; please consider updating the answer. May 14, 2021 at 8:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .