View previous topic :: View next topic |
Author |
Message |
tobr Guru
Joined: 29 May 2006 Posts: 330
|
Posted: Wed Aug 29, 2007 10:09 pm Post subject: Zeroconf with Avahi |
|
|
Note: As the gentoo-wiki.com 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: http://gentoo-wiki.com/HOWTO_Zeroconf.
== 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):
Code: |
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
to
Code: |
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
|
or, if you also want IPv6 support, to
Code: |
hosts: files mdns_minimal [NOTFOUND=return] dns mdns
|
Now add the relevant daemons to the run levels:
Code: |
# rc-update add avahi-daemon default
|
== Start Avahi ==
To immediately make use of Avahi do the following as root:
Code: |
# /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 |
|
|
the_mgt Apprentice
Joined: 05 Aug 2005 Posts: 259 Location: Germany, near Hannover
|
|
Back to top |
|
|
|
|
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
|
|