Firstable, I looked up to several Q/A, i can ensure that the following points are fullfiled:

  • IGMP snooping isn't filtered by switch/router.

  • Bonjour services (mDNSResponder.exe) is granted and allowed on the firewall as well as UDP port 5353 (windows side).

  • Avahi config is correct (plus use of ipv6 is disabled) as well as nssitch.conf needed modifications have been done

    hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

  • Avahi-daemon is running as well as bonjour services.

  • windows side ipv6 is disabled on active network interface, also avahi-daemon is configured not to use ipv6: use-ipv6=no.

Issue with Pi's mDNS

After a while the hostname .local corresponding to the raspberry pi isn't resolved anymore after issuing a ping pi.local from windows, note that on startup it responded perfectly, and a restart of avahi-daemon will fix it temporary before the issue starts again.

Just after the mdns resolve fail I executed the following on the rasp avahi-resolve -n pi.local it shows it ipv6 (fe80::xxaa:yybb:zzde:ee) which is weird because as I mentionned I have disabled ipv6 in avahi configs, right just after i reexecute the same command this time i get ipv4 as an answer


also ping seems to respond again.


  • Running Linux pi 4.4.38-v7+ #938

  • Using Bonjour Print Services for Windows v2.0.2: https://support.apple.com/kb/DL999, and it's running as service.

  • Disabling ipv6 only the return of avahi-resolve -n pi.local command gives instead of ipv6 but issue remains.

Nothing in /var/log/messages concerning Avahi.

Any thoughts about the root of the problem ?

syslog after a while from restarting avahi-daemon and sending resolve command above:

18:21:47 pi systemd[1]: Stopping Avahi mDNS/DNS-SD Stack...

18:21:47 pi avahi-daemon[427]: Got SIGTERM, quitting.

18:21:47 pi avahi-daemon[427]: Leaving mDNS multicast group on
interface wlan0.IPv4 with address

18:21:47 pi avahi-daemon[427]: avahi-daemon 0.6.31 exiting. 
18:21:47 pi systemd[1]: Starting Avahi mDNS/DNS-SD Stack...

18:21:47 pi avahi-daemon[1143]: Process 427 died: No such process;
trying to remove PID file. (/var/run/avahi-daemon//pid)

18:21:47 pi avahi-daemon[1143]: Found user 'avahi' (UID 105) and group
'avahi' (GID 110).

18:21:47 pi avahi-daemon[1143]: Successfully dropped root privileges.

18:21:47 pi avahi-daemon[1143]: avahi-daemon 0.6.31 starting up.

18:21:47 pi avahi-daemon[1143]: Successfully called chroot(). 
18:21:47 pi avahi-daemon[1143]: Successfully dropped remaining
18:21:47 pi avahi-daemon[1143]: Loading service file

18:21:47 pi avahi-daemon[1143]: Loading service file

18:21:47 pi avahi-daemon[1143]: Joining mDNS multicast group on
interface wlan0.IPv4 with address

18:21:47 pi avahi-daemon[1143]: New relevant interface wlan0.IPv4 for

18:21:47 pi avahi-daemon[1143]: Network interface enumeration

18:21:47 pi avahi-daemon[1143]: Registering new address record for
fe80::f2f:3b5b:ab5b:35c1 on wlan0.*.

18:21:47 pi avahi-daemon[1143]: Registering new address record for on wlan0.IPv4.

18:21:47 pi avahi-daemon[1143]: Registering HINFO record with values

18:21:47 pi systemd[1]: Started Avahi mDNS/DNS-SD Stack.

18:21:48 pi avahi-daemon[1143]: Server startup complete. Host name is
pi.local. Local service cookie is 2501181696. 

18:21:49 pi avahi-daemon[1143]: Service "pi"
(/services/udisks.service) successfully established.
18:21:49 pi avahi-daemon[1143]: Service "pi"
(/services/multiple.service) successfully established.
  • yes sorry for that. your's is correct. also try adding search local in your /etc/resolv.conf file. – Shan-Desai Mar 7 '17 at 17:49
  • @Shan-Desai ifconfig shows always ipv6 address even after the command do i need to reboot or sysctl -p ? – mdns Mar 7 '17 at 17:51
  • reboot sounds good enough you can actually remove the ipv6 module temporarily by doing sudo modprobe -r ipv6 and do sudo ifconfig wlan0 down && sudo ifconfig wlan0 up – Shan-Desai Mar 7 '17 at 17:53
  • @Shan-Desai i can't modprobe: FATAL: Module ipv6 is in use – mdns Mar 7 '17 at 18:04
  • Check the answer and a reboot is must. – Shan-Desai Mar 7 '17 at 18:08

Here is my two bits on the query:

You are doing things right.

  1. Editing/Checking your /etc/nsswitch.conf

  2. Try adding search local in your /etc/resolv.conf file

  3. You can put search-ipv6=no in your /etc/avahi/avahi-daemon.conf

  4. You can also add the IP address of your Pi to your avahi/hosts file viz.

    sudo nano /etc/avahi/hosts
    #inside the file pi.local
  5. disabling ipv6 on the interface in /etc/sysctl.conf by adding the following line:

  6. Finally, a reboot is necessary.

  • 1) done, 2) i don't know how neither if it is necessary or it wouldn't slow down the resolution more, 3) is already not using ipv6 on config (see my question edit btw it's use-ipv6=no not search-ipv6=no) 4) What the point of using avahi then if ip is static? 7)already done – mdns Mar 7 '17 at 18:16
  • @mdns usually adding the ip and name in host is useful when your do not want to send out discovery packets on the wireless channel. It also can be useful for tools like ssh. However hosts thing is rather user defined. – Shan-Desai Mar 7 '17 at 18:19
  • How do I know what the X will be 192.168.1.x ? i can take any ip in the range 2-253 – mdns Mar 7 '17 at 18:20
  • hosts file is usually for machines which do not use avahi for static mapping. not all machines tend to use zeroconf/avahi on them. Also in terms of resolution you can try playing with ratelimit-burst and ratelimit-interval-usec in avahi-daemon.conf file. but beware, that more packets on the wireless network might cause congestion with increasing number of network devices. – Shan-Desai Mar 7 '17 at 18:28

Is your Pi connected wirelessly? In my case it was wlan0 power management that caused same issue. You can check that by running iwconfig.

$ iwconfig
wlan0     IEEE 802.11  ESSID: (...)
          Power Management:on

I discovered that when I realized I don't have to restart avahi-daemon, despite it looked like it was helping. It was enough to just ssh into the box to wake up wlan and get mdns packets through.

I ended up adding iwconfig wlan0 power off to my /etc/rc.local and that resolved the problem permanently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.