Skip to main content

Disabling Avahi (mDNS Daemon) on Ubuntu

mDNS (multicast DNS) is the technology which allows you your computer, smart TV, smart phones to discover services on each other when they are connected to the same local network. Its part of the technology that enables you to play music/photos/videos on your TV from your smartphone over WiFi.

mDNS is one of the techniques for enabling Zero Configuration Networking


  • Apple's Zeroconf implementation is called Bonjour and uses mDNS
  • Ubuntu uses Avahi (wiki | home) as its mDNS daemon
  • Windows uses SSDP to implement UPnP
At times, while testing protocol stacks, you might want a quiet network - one without all the service discovery packets being sent every now and then. To achieve that, you will need to disable mDNS and service discovery daemons on all the computers connected to the network.

On Ubuntu 10.10 and up the following method seems to disable Avahi completely:
  1. Execute sudo gedit /etc/init/avahi-daemon.conf and change:
    start on (filesystem
    and started dbus)
    to
    start on (never
    and filesystem
    and started dbus)
  2. Execute sudo gedit /etc/default/avahi-daemon and change:
    AVAHI_DAEMON_DETECT_LOCAL=1
    to
    AVAHI_DAEMON_DETECT_LOCAL=0
On Windows, you can disable the SSDP Discovery Service from the Services Panel as shown here: Disable the SSDP Discovery service

Wireshark Capture: Note the SSDP (Green) and MDNS (Red) packets
sent out by Windows and Linux Hosts on the LAN 
References:

Comments