First time setting up a Pi yesterday, I installed Raspberry Pi OS Lite 64 bit and filled in options in the Imager application to configure wifi out of the box, as well as setting the hostname and allowing ssh through keys only. To my delight, I could ssh into the Pi right off the bat with ssh [email protected]
from my Windows laptop. I understand this is due to the magic of something called mDNS.
Fast forward to this morning, and my laptop can no longer find the Pi hostname on the network:
❯ nslookup rubus.local
Server: homerouter.cpe
Address: 192.168.8.1
*** homerouter.cpe can't find rubus.local: Non-existent domain
(Of course I don't have output from when it worked in the beginning.)
ssh [email protected]
still works, so the network connection is fine - it's just the hostname that has vanished.
Reading and googling furiously, I found this thread and installed Bonjour Print Services for Windows v2.0.2 from Apple, which made no difference at all. I have also seen this thread, read man avahi-daemon.conf
and reviewed my Avahi config and status. LGTM.
How does this work from the first boot and then just stop working overnight?
Hardware, versions, config etc.:
My laptop is running Windows 10 Pro 21H1 build 19043.1526.
- Checked in
services.msc
that the Bonjour Service is running.
- Checked in
Raspberry Pi 3 Model B+
Running Raspberry Pi OS Lite 64 bit.
Avahi config (comments and empty sections removed):
[server] use-ipv4=yes use-ipv6=yes ratelimit-interval-usec=1000000 ratelimit-burst=1000 [wide-area] enable-wide-area=yes [publish] publish-hinfo=no publish-workstation=no
Avahi status:
pi@rubus:~ $ 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 Fri 2022-02-11 15:12:32 CET; 47min ago TriggeredBy: ● avahi-daemon.socket Main PID: 1294 (avahi-daemon) Status: "avahi-daemon 0.8 starting up." Tasks: 2 (limit: 780) CPU: 112ms CGroup: /system.slice/avahi-daemon.service ├─1294 avahi-daemon: running [rubus.local] └─1295 avahi-daemon: chroot helper Feb 11 15:12:32 rubus avahi-daemon[1294]: Joining mDNS multicast group on interface lo.IPv6 with address ::1. Feb 11 15:12:32 rubus avahi-daemon[1294]: New relevant interface lo.IPv6 for mDNS. Feb 11 15:12:32 rubus avahi-daemon[1294]: Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1. Feb 11 15:12:32 rubus avahi-daemon[1294]: New relevant interface lo.IPv4 for mDNS. Feb 11 15:12:32 rubus avahi-daemon[1294]: Network interface enumeration completed. Feb 11 15:12:32 rubus avahi-daemon[1294]: Registering new address record for fd48:3fe9:897a:9100:ff1f:9525:1d53:e2a5 on eth0.*. Feb 11 15:12:32 rubus avahi-daemon[1294]: Registering new address record for 192.168.8.110 on eth0.IPv4. Feb 11 15:12:32 rubus avahi-daemon[1294]: Registering new address record for ::1 on lo.*. Feb 11 15:12:32 rubus avahi-daemon[1294]: Registering new address record for 127.0.0.1 on lo.IPv4. Feb 11 15:12:33 rubus avahi-daemon[1294]: Server startup complete. Host name is rubus.local. Local service cookie is 994918085.
Router is a Huawei B525 4G.
- I have tried connecting the Pi both over wifi and LAN, no difference. I can ssh to the IP, but not the hostname.