2

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 pi@192.168.1.80) 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

Startec
  • 1,795
  • 5
  • 21
  • 31
  • There's really not much to go on - I suspect icmp packets are being dropped by the pi or server. Can you ssh between pi and server (or vice versa). Are you using names or LAN IP addresses in ping? – Rob Raymond Jul 02 '20 at 01:56
  • I realize this is sparse on details but I do not know what else to provide. I did update the question as yes, I can SSH from each server to the other using LAN IP addresses. – Startec Jul 02 '20 at 02:59
  • it's not ping icmp packet loss as IP address works. Are you using ".local" to qualify a name? for example `ping pi3-netmgr.local` where `pi3-netmgr` is name being broadcast by avahi – Rob Raymond Jul 02 '20 at 04:10

2 Answers2

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
Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
Rob Raymond
  • 376
  • 2
  • 12
  • I tried to clarify my question with all input. – Startec Jul 02 '20 at 05:04
  • I don't know if this is the answer - on ubuntu VMs I install two packages (not on pi) `sudo apt get-install avahi-daemon avahi-autoipd`. The gateway in all cases is my ISP router which shows DHCP leases with names except Ubuntu VMs. The VMs have two IPs, one static one from DHCP – Rob Raymond Jul 02 '20 at 05:35
0

Installing sudo apt-get install avahi-autoipd did the trick for me.

avahi-autoipd is primarily intended to be used in ad-hoc networks which lack a DHCP server.

spazm
  • 103
  • 4
Sv4n3
  • 1
  • 1
  • This is a typo. Should be `sudo apt-get install avahi-autoipd` – Dave Mar 28 '22 at 18:50
  • I edited the typo and added a link to the docs. @Sv4n3, did you install this on the pi? Seems like it wouldn't be necessary if the machines already have dhcp connections. – spazm Jun 27 '22 at 01:12