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 '18 at 5:31

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

  • 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 '18 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 '18 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.