I am trying to setup Zeroconf in a small LAN where machines of Debian 10, other Linux distributions and Windows 10 are cooperating with zero extra configuration with the following requirements:
- Hostname resolution with Multicast DNS (hostname.local should work)
- CUPS printing should be able to share printers and LAN machines being able to discover it via CUPS or Samba share
- In case of Avahi, advertised services should be browsable
I have done it in the past and it was a simple case of installing Avahi on Linux machines along NSS-mDNS packages and setting
Code: Select all
mdns_minimal [NOTFOUND=return]
Code: Select all
/etc/nsswitch.conf
Then everything worked as expected. This was at a time around Debian 6 and 7, it worked like a charm. Well not any more...
The resources I followed are the following:
https://wiki.debian.org/ZeroConf
https://wiki.debian.org/SystemPrinting
https://wiki.samba.org/index.php/User_Documentation
https://wiki.archlinux.org/index.php/Avahi
https://wiki.archlinux.org/index.php/CUPS
https://wiki.archlinux.org/index.php/Samba
https://wiki.archlinux.org/index.php/Sy ... olved#mDNS
First I tried to setup CUPS + Samba + Avahi on the machine that has the printer attached with USB. This machine has Arch Linux installed. I started the services:
Code: Select all
cups.service
avahi-daemon.service
smb.service
I started the nmb.service and suddenly Windows 10 machines start to resolve properly with or without .local suffix. Why? Samba nmbd is supposed to be a Netbios name service right? Well I guess thinks has changed somehow and although I never like things that work because ... reasons, I continued to setup the Samba shared printer with all Windows 10 machines. Well nope. The printer server is resolved but no entry in the Windows Network list. Where is it? Well ignoring the recommendations to enable SMBv1 (really?) I realized that modern Windows 10 clients need something called Web Service Discovery. Thankfully there is a Python script which implements just that for Linux host daemon: https://github.com/christgau/wsdd. That concludes my setup for Windows 10 clients, which only need to enable Network sharing and use the Samba shares via credentials. Not so Zeroconf but it is working and the LAN is small. For bigger deployments this does not scale.
Now on to the Debian 10/Linux machines. This is where I cannot make it to work by following the Wiki or manual instructions. On Debian 10 machines I installed the packages:
Code: Select all
avahi-daemon
libnss-mdns
I tried to check also the systemd-resolved solution for mDNS, recommended by the developers of Avahi as the next version of Zeroconf on systemd enabled Linux systems. You set the directive
Code: Select all
MulticastDNS=yes
Code: Select all
/etc/systemd/resolved.conf
/etc/systemd/resolved.conf.d/<your file here>.conf
Code: Select all
/etc/systemd/network/<your network interface configuration>.network
Code: Select all
getent hosts hostname.local
I would greatly appreciate any help and share any logs or configuration files. Thanks in advance.