You are not logged in.

#1 2019-03-08 15:05:21

carbolymer
Member
Registered: 2012-04-25
Posts: 32

NetworkManager: mDNS not being enabled by default

After system boot, NetworkManager is not enabling mdns for any connection (eth0 is connected):

$ resolvectl mdns                                                 
Global: yes
Link 7 (br-d29235c7c508): no
Link 6 (docker0): no
Link 5 (vmnet8): no
Link 4 (vmnet1): no
Link 3 (wlan0): no
Link 2 (eth0): no

To enable mdns I need to restart NetworkManager, disconnect manually eth0 and connect to it again. Then mdns is enabled:

15:43:59 [root:/etc/NetworkManager] # resolvectl mdns
Global: yes
Link 7 (br-d29235c7c508): no
Link 6 (docker0): no
Link 5 (vmnet8): no
Link 4 (vmnet1): no
Link 3 (wlan0): no
Link 2 (eth0): resolve

mdns is enabled in configuration:

15:44:29 [root:/etc/NetworkManager] # grep -R -i mdns *
conf.d/mdns.conf:connection.mdns=1
15:46:28 [root:/etc/NetworkManager] # cat conf.d/mdns.conf
[connection]
connection.mdns=1

15:46:36 [root:/etc/NetworkManager] # grep -R -i mdns /var/run/NetworkManager 
15:46:44 [root:/etc/NetworkManager] 1 # cat NetworkManager.conf 
[main]
plugins=keyfile
dns=systemd-resolved

## HTTP-based connectivity check
#[connectivity]
#uri=http://nmcheck.gnome.org/check_network_status.txt
#interval=100
15:50:05 [root:/etc/systemd] # cat resolved.conf 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
#DNS=
#FallbackDNS=1.1.1.1 9.9.9.10 8.8.8.8 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888
#Domains=
#LLMNR=yes
MulticastDNS=yes
#DNSSEC=allow-downgrade
#DNSOverTLS=no
#Cache=yes
#DNSStubListener=yes
#ReadEtcHosts=yes

I've configured mDNS accordingly to the https://wiki.archlinux.org/index.php/Sy … olved#mDNS . I have also avahi installed but disabled, I've also removed mdns entries from nsswitch.conf

I'm not sure what is wrong. Any ideas if this is incorrect configuration or a bug?

Offline

#2 2019-03-09 14:01:35

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 7,195

Re: NetworkManager: mDNS not being enabled by default

mDNS will only be activated for the connection if both the systemd-resolved's global setting (MulticastDNS= in resolved.conf(5)) and the network manager's per-connection setting is enabled.

What is the content of resolved.conf ?

Last edited by Lone_Wolf (2019-03-09 14:01:52)


Multi-init booting with apg Openrc and systemd coexisting
Automounting : not needed, i prefer pmount
Aur helpers : makepkg + my own local repo === rarely need them

Offline

#3 2019-03-15 09:00:06

carbolymer
Member
Registered: 2012-04-25
Posts: 32

Re: NetworkManager: mDNS not being enabled by default

That might be a bit unreadable, but it's already posted in the first post.

15:50:05 [root:/etc/systemd] # cat resolved.conf 
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
#DNS=
#FallbackDNS=1.1.1.1 9.9.9.10 8.8.8.8 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888
#Domains=
#LLMNR=yes
MulticastDNS=yes
#DNSSEC=allow-downgrade
#DNSOverTLS=no
#Cache=yes
#DNSStubListener=yes
#ReadEtcHosts=yes

Offline

#4 2019-07-11 21:38:44

lenhuppe
Member
From: New Hampshire
Registered: 2018-12-10
Posts: 57

Re: NetworkManager: mDNS not being enabled by default

Lone_Wolf wrote:

mDNS will only be activated for the connection if both the systemd-resolved's global setting (MulticastDNS= in resolved.conf(5)) and the network manager's per-connection setting is enabled.

What is the content of resolved.conf ?

I recently tried switching from systemd-networkd to NetworkManager and had almost the same issue as OP. If I ever figure it out I will post my findings.

Last edited by lenhuppe (2019-08-05 17:46:08)

Offline

Board footer

Powered by FluxBB