= Avahi = '''Avahi''' is an implementation of Zeroconf and mDNS. The project began with Lennart Poettering's implementation of mDNS and DNS-SD. <> ---- == Installation == Most [[Linux]] distributions offer an `avahi` package. For [[BSD]] distributions, try `avahi-daemon`. For `systemd`-capable systems, [[Linux/Systemd|start and enable]] `avahi-daemon.service`. The daemon binary is named `avahi-daemon(8)`. ---- == Configuration == [[Linux/SystemdNetworkd|networkd]] has a competing mDNS implementation that will need to be disabled before `avahi` can be made to work. Alternatively, [[Linux/Systemd|disable]] `systemd-resolved.service` entirely. === Name Resolution === For Avahi to insert domain name resolution for discovered services, an additional dependency (commonly named `nss-mdns`) is required. Insert `mdns_minimal [NOTFOUND=return]` into `/etc/nsswitch.conf`, as below. {{{ hosts: files mymachines myhostname mdns_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns }}} === Firewalls === `avahi-daemon(8)` binds to port 5353. Firewalls such as [[Ufw|ufw]] or [[Awall|awall]] must be reconfigured to open it. ---- == Usage == === Advertising Services === `avahi-daemon(8)` uses all `/etc/avahi/services/*.service` files that are readable by the `avahi` user and group. These take the form of structured XML. For example, an FTP service: {{{ FTP _ftp._tcp 21 }}} === Discovery === In a terminal, use `avahi-browse(1)`. {{{ avahi-browse --all }}} Alternatively there is the graphical client `avahi-discover(1)`. ---- == See also == [[https://man.archlinux.org/man/extra/avahi/avahi-daemon.8.en|avahi-daemon(8)]] [[https://man.archlinux.org/man/extra/avahi/avahi-browse.1.en|avahi-browse(1)]] [[https://man.archlinux.org/man/extra/avahi/avahi-discover.1.en|avahi-discover(1)]] ---- CategoryRicottone