Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Zeroconf with Avahi
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message

Joined: 29 May 2006
Posts: 330

PostPosted: Wed Aug 29, 2007 10:09 pm    Post subject: Zeroconf with Avahi Reply with quote

Note: As the captchas seem broken I'll add this here. If somebody has an account there I would appreciate it if they put the article in there, too. Thanks.

EDIT: Captcha was only broken with firefox/konqueror. Added the article now with dillo:

== Introduction ==

Zeroconf provides a simple way to network several computers without DHCP/DNS servers. It is a set of techniques to assign an IP address, provide name resolution and service discovery. It is most useful for ad-hoc networks (LAN-Party, Meeting, WLAN, Bluetooth, etc).

== Summary ==

In this HOWTO we'll use the Avahi implementation of the protocols. We'll set up automatic IP address configuration and name resolution.

== Requirements ==

The following packages are needed:

* net-dns/avahi
* sys-auth/nss-mdns

The following use flags should be set:

* avahi
* dbus
* autoipd (only for net-dns/avahi, to build the avahi-autoipd program)

== Configuration ==

There is not much configuration needed but as the documentation is sparse you need to know where to look. First edit /etc/conf.d/net (replace eth0 with your interface):

 modules=( "autoipd" )
 config_eth0=( "autoipd" )
 # If you want to try DHCP before getting an IP address with avahi use the following (useful for laptops in different environments):
 config_eth0=( "dhcp" )
 fallback_eth0=( "autoipd" )

If you use the second configuration you may want to reduce the timeout for the DHCP client. Therefor see /etc/dhcp/dhclient.conf.sample for dhclient.

Now you need to edit the file /etc/nsswitch.conf:
Change the following

 hosts:       files dns


 hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

or, if you also want IPv6 support, to

 hosts:          files mdns_minimal [NOTFOUND=return] dns mdns

Now add the relevant daemons to the run levels:

  # rc-update add avahi-daemon default

== Start Avahi ==

To immediately make use of Avahi do the following as root:


  # /etc/init.d/net.eth0 restart
  # /etc/init.d/avahi-daemon start

Now you should have a 169.254.* IP address (try ifconfig). Try to ping <yourhostname>.local to see if name resolution for the .local domain works.

== TODO ==

This article is a bit short and could use some improvements:

* add info about service discovery
* different implementations (mDNSresponder,dns-sd) and their (dis)advantages
* solving problems with unicast .local domains
* ...
Please add [SOLVED] to your message title if your problem is solved.

Death to all blobs!
Back to top
View user's profile Send private message

Joined: 05 Aug 2005
Posts: 259
Location: Germany, near Hannover

PostPosted: Wed Jan 14, 2009 7:43 am    Post subject: Reply with quote

Added to (ZeroConf article died in wikis server outage)
Feel free to add anything missing. Thanks for your thread here!!
Citadel Groupware | Avahi Howto
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum