Avahi

From ArchWiki
Revision as of 13:51, 2 May 2008 by Ivh (talk | contribs) (Using Avahi)
Jump to: navigation, search

Tango-document-new.pngThis article is a stub.Tango-document-new.png

Notes: please use the first argument of the template to provide more detailed indications. (Discuss in Talk:Avahi#)

Introduction

Avahi is a free Zeroconf (Zero Configuration Networking) implementation, including a system for multicast DNS/DNS-SD service discovery. It allows programs to publish and discover services and hosts running on a local network with no specific configuration. For example you can plug into a network and instantly find printers to print to, files to look at and people to talk to. It is licensed under the GNU Lesser General Public License (LGPL). (Source: Wikipedia)

Installation

To use avahi in Arch Linux, first:

# pacman -S avahi

then add it to your DAEMONS in /etc/rc.conf as avahi-daemon, somewhere after the dbus daemon.

You also need the capability module to be loaded, so add it to the MODULES array in the same file. That's it. (Note: kernel 2.6.24 has compatibility compiled into the kernel, no need to add the module to rc.conf)

Using Avahi

You can grab gshare from [community] and have shared files between the lan, with no configuration, no hours in samba hacking, no nothing - it just works.

Hostname resolution

Avahi also allows you to access computers using their hostnames. Note: you may need to install nss-mdns for this to work.

Suppose you have machines with names maple, fig and oak, all running avahi. Avahi can be set up so that you don't have to manage a /etc/hosts file for each computer. Instead you can simply use maple.local to access whatever services maple has. However by default, .local querying is disabled in Arch Linux. To enable it edit the file /etc/nsswitch.conf and change the line:

hosts: files dns

to

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

A small section of users in Ubuntu noticed a slowdown in DNS querying; it was attributed to this change. Whether it applies to Arch Linux too, is not known. (Reference: Ubuntu Bug 94940)

Avahi also has quite a few nifty utilities which can help you discover which services are being used on a network. The avahi-discover (Avahi Zeroconf Browser) shows the various services on your network. You can also browse SSH and VNC Servers using bssh and bvnc respectively.

There's a good list of software with Avahi support at their website: http://avahi.org/wiki/Avah4users

External Resources