Avahi / mDNS not working

I am having issues getting my servers to talk to each other via mDNS / Avahi.

I have two servers, an Ubuntu Server and a Raspberry PI.

user@WORKCOM9001~ ()$ sudo service avahi-daemon status
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
     Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-07-01 21:54:45 PDT; 4min 6s ago
TriggeredBy: ● avahi-daemon.socket
   Main PID: 1101 (avahi-daemon)
     Status: "avahi-daemon 0.7 starting up."
      Tasks: 2 (limit: 18921)
     Memory: 2.5M
     CGroup: /system.slice/avahi-daemon.service
             ├─1101 avahi-daemon: running [WORKCOM9001.local]
             └─1160 avahi-daemon: chroot helper

And on my Raspberry PI I get:

pi@raspberrypi2:~ $ sudo service avahi-daemon status
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-07-01 18:36:47 PDT; 3h 21min ago
 Main PID: 276 (avahi-daemon)
   Status: "avahi-daemon 0.7 starting up."
   Memory: 956.0K
   CGroup: /system.slice/avahi-daemon.service
           ├─276 avahi-daemon: running [raspberrypi2.local]
           └─287 avahi-daemon: chroot helper

I can ping and SSH into each one from the other with IP address (i.e. ssh [email protected]) works but with hostname + .local it does not.

But avahi-browse does not show either device from the other. (i.e. from my server):

+ wlp61s0 IPv6 EPSON XP-830 Series                           _uscan._tcp          local
+ wlp61s0 IPv4 EPSON XP-830 Series                           _uscan._tcp          local
+ wlp61s0 IPv6 EPSON XP-830 Series                           _privet._tcp         local
+ wlp61s0 IPv4 EPSON XP-830 Series                           _privet._tcp         local
+ wlp61s0 IPv6 EPSON XP-830 Series                           Secure Internet Printer local
+ wlp61s0 IPv4 EPSON XP-830 Series                           Secure Internet Printer local
+ wlp61s0 IPv6 EPSON XP-830 Series                           Internet Printer     local
+ wlp61s0 IPv4 EPSON XP-830 Series                           Internet Printer     local
+ wlp61s0 IPv6 EPSON XP-830 Series                           _scanner._tcp        local
+ wlp61s0 IPv4 EPSON XP-830 Series                           _scanner._tcp        local
+ wlp61s0 IPv6 EPSON XP-830 Series                           Microsoft Windows Network local
+ wlp61s0 IPv4 EPSON XP-830 Series                           Microsoft Windows Network local
+ wlp61s0 IPv6 EPSON XP-830 Series                           Web Site             local
+ wlp61s0 IPv4 EPSON XP-830 Series                           Web Site             local
+ wlp61s0 IPv6 EPSON XP-830 Series                           PDL Printer          local
+ wlp61s0 IPv4 EPSON XP-830 Series                           PDL Printer          local
+ wlp61s0 IPv6 EPSON XP-830 Series                           UNIX Printer         local
+ wlp61s0 IPv4 EPSON XP-830 Series                           UNIX Printer         local
+ wlp61s0 IPv6 5c:1d:d9:8f:a4:05@fe80::5e1d:d9ff:fe8f:a405   _apple-mobdev2._tcp  local
+ wlp61s0 IPv4 5c:1d:d9:8f:a4:05@fe80::5e1d:d9ff:fe8f:a405   _apple-mobdev2._tcp  local
+ wlp61s0 IPv4 Chromecast-Ultra-a41f56bb802c5975b2ecb845394ab75d _googlecast._tcp     local
+ wlp61s0 IPv4 a41f56bb-802c-5975-b2ec-b845394ab75d          _googlezone._tcp     local

And from the Raspberry Pi:

+  wlan0 IPv6 EPSON XP-830 Series                           Internet Printer     local
+  wlan0 IPv4 EPSON XP-830 Series                           Internet Printer     local
+  wlan0 IPv6 EPSON XP-830 Series                           Secure Internet Printer local
+  wlan0 IPv4 EPSON XP-830 Series                           Secure Internet Printer local
+  wlan0 IPv4 5c:1d:d9:8f:a4:05@fe80::5e1d:d9ff:fe8f:a405   _apple-mobdev2._tcp  local
+  wlan0 IPv6 5c:1d:d9:8f:a4:05@fe80::5e1d:d9ff:fe8f:a405   _apple-mobdev2._tcp  local
+  wlan0 IPv6 EPSON XP-830 Series                           _privet._tcp         local
+  wlan0 IPv4 EPSON XP-830 Series                           _privet._tcp         local
+  wlan0 IPv4 a41f56bb-802c-5975-b2ec-b845394ab75d          _googlezone._tcp     local
+  wlan0 IPv4 EPSON XP-830 Series                           UNIX Printer         local
+  wlan0 IPv4 EPSON XP-830 Series                           PDL Printer          local
+  wlan0 IPv4 EPSON XP-830 Series                           Web Site             local
+  wlan0 IPv4 EPSON XP-830 Series                           Microsoft Windows Network local
+  wlan0 IPv4 EPSON XP-830 Series                           _scanner._tcp        local
+  wlan0 IPv4 EPSON XP-830 Series                           _uscan._tcp          local
+  wlan0 IPv6 EPSON XP-830 Series                           UNIX Printer         local
+  wlan0 IPv6 EPSON XP-830 Series                           PDL Printer          local
+  wlan0 IPv6 EPSON XP-830 Series                           Web Site             local
+  wlan0 IPv6 EPSON XP-830 Series                           Microsoft Windows Network local
+  wlan0 IPv6 EPSON XP-830 Series                           _scanner._tcp        local
+  wlan0 IPv6 EPSON XP-830 Series                           _uscan._tcp          local
+  wlan0 IPv4 Chromecast-Ultra-a41f56bb802c5975b2ecb845394ab75d _googlecast._tcp     local

Can anyone help me with this?

Thank you


Solution 1:

Devices need to be addressed as name.local
Working LAN setup

  • LAN: 2 * Mac, 1 * network attached printer, 2 * VM (Ubuntu 20.04), 1 * pi
  • Ubuntu VMs and pi are running avahi-daemon as a service
$ sudo service avahi-daemon status
● avahi-daemon.service - Avahi mDNS/DNS-SD Stack
     Loaded: loaded (/lib/systemd/system/avahi-daemon.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-07-02 12:00:59 UTC; 7h left
TriggeredBy: ● avahi-daemon.socket
   Main PID: 784 (avahi-daemon)
     Status: "avahi-daemon 0.7 starting up."
      Tasks: 2 (limit: 1069)
     Memory: 1.3M
     CGroup: /system.slice/avahi-daemon.service
             ├─784 avahi-daemon: running [mcs-ui.local]
             └─828 avahi-daemon: chroot helper
  • all machines can reach each other as name.local and ping printer.local
  • avahi-browse is only installed on one VM and does not list all devices on LAN