You are not logged in.
I am unable to get mDNS to work reliably. I have a number of hosts and mDNS is perfect for finding them.
What I have found is that when mDNS breaks I can get it work again by disconnecting my switch from the router.
Unfortunately if I get my networkd config wrong and break mDNS it often remains broken after reverting the changes.
I am sure that its a configuration issue. Bellow is my networkd config file which I came up with today.
I am reluctant to reboot for fear of mDNS breaking again.
wired.network
****************
[Match]
Name=en*
Name=eth*
[Network]
MulticastDNS=yes
DHCP=ipv4
[DHCPv4]
UseDomains=yesI tried setting up avahi but I may have done it wrong because it broke samba. Upon reverting the changes samba was still broken.
Therefore I am here seeking guidance. I am looking over the networkd docs but I am not a networking guru.
Is anyone here using mDNS or some other method to locate local hosts by name?
Last edited by lenhuppe (2022-02-19 03:47:22)
Offline
Are you using systemd-resolved or avahi for mDNS? What did you do to break samba? You just keep saying "changes" that you make and revert, but you never tell us what those changes are.
Offline
What I have found is that when mDNS breaks I can get it work again by disconnecting my switch from the router.
I tried setting up avahi but I may have done it wrong because it broke samba. Upon reverting the changes samba was still broken.
Those effects sound like a DNS / mDNS conflict regarding the ".local" TLD.
mDNS only works if there is no other ".local" domain in this network.
Offline
Are you using systemd-resolved or avahi for mDNS? What did you do to break samba? You just keep saying "changes" that you make and revert, but you never tell us what those changes are.
I am using systemd-resolved and I was making changes to my wired.network file. Sometimes I would make a change that broke the network, and reverting the change did not always get me back.
I am doing this because I changed ISP and the configuration I had does not work with the new router. I was trying both a direct connection to the new router and using my Netgate as a router.
The network was working and routing to the Internet ok but mDNS was broken until I disconnected the router. I did try enabling avahi but the instructions I followed did not say anything about disabling mDNS in systemd-resolved.
The issue was that I was using the router domain and it was conflicting with mDNS.
Offline
lenhuppe wrote:What I have found is that when mDNS breaks I can get it work again by disconnecting my switch from the router.
lenhuppe wrote:I tried setting up avahi but I may have done it wrong because it broke samba. Upon reverting the changes samba was still broken.
Those effects sound like a DNS / mDNS conflict regarding the ".local" TLD.
mDNS only works if there is no other ".local" domain in this network.
That was it ... I made two changes to my network configuration. First I removed the UseDomains=yes from my wired.network file. Second I edited my hosts file and changed host_name.localdomain to host_name.local.
wired.network
****************
# ethernet / tethering config
[Match]
Name=en*
Name=eth*
[Network]
MulticastDNS=yes
DHCP=ipv4hosts
*******
# Static table lookup for hostnames.
# See hosts(5) for details.
# localhost config
::1 localhost
127.0.0.1 localhost
127.0.1.1 lurch lurch.local Many thanks
Last edited by lenhuppe (2022-02-19 03:46:54)
Offline