Difference between revisions of "Zero Configuration Networking"
| Line 1: | Line 1: | ||
| + | = Zero Configuration Networking (Zeroconf) = | ||
| + | |||
| + | == Introduction == | ||
| + | |||
[http://developer.apple.com/library/mac/#qa/qa2004/qa1357.html Apple Technical Q&A QA1357] | [http://developer.apple.com/library/mac/#qa/qa2004/qa1357.html Apple Technical Q&A QA1357] | ||
[[Category:Howto]] | [[Category:Howto]] | ||
Zero Configuration Networking, also called Zeroconf or [[wikipedia:Bonjour_(software)|Bonjour]] ([http://developer.apple.com/softwarelicensing/agreements/bonjour.html Apple's trademark] for their Zero Configuration Networking implementation) is a suite of related technologies that allow networked devices to interoperate on a local network without requiring explicit configuration. | Zero Configuration Networking, also called Zeroconf or [[wikipedia:Bonjour_(software)|Bonjour]] ([http://developer.apple.com/softwarelicensing/agreements/bonjour.html Apple's trademark] for their Zero Configuration Networking implementation) is a suite of related technologies that allow networked devices to interoperate on a local network without requiring explicit configuration. | ||
| + | |||
| + | === Requirements === | ||
Zero Configuration Networking requires the following things to operate: | Zero Configuration Networking requires the following things to operate: | ||
# A valid IP address, obtained either by: | # A valid IP address, obtained either by: | ||
| − | ## Static | + | ## Static assignment |
## DHCP | ## DHCP | ||
## Link-local Addressing (part of Zero Configuration Networking) | ## Link-local Addressing (part of Zero Configuration Networking) | ||
| Line 13: | Line 19: | ||
## DNS | ## DNS | ||
## multicast DNS (mDNS -- part of Zero Configuration Networking) | ## multicast DNS (mDNS -- part of Zero Configuration Networking) | ||
| + | |||
| + | === Service Discovery === | ||
On top of this, Zero Configuration Networking also provides a means to discover what services are available on each device. This is something that is provided exclusively by Zero Configuration Networking and is called Zeroconf Service Discovery. | On top of this, Zero Configuration Networking also provides a means to discover what services are available on each device. This is something that is provided exclusively by Zero Configuration Networking and is called Zeroconf Service Discovery. | ||
| + | |||
| + | == Configuration == | ||
=== Link-local Addresses === | === Link-local Addresses === | ||
Revision as of 08:21, 6 November 2010
Contents |
Zero Configuration Networking (Zeroconf)
Introduction
Zero Configuration Networking, also called Zeroconf or Bonjour (Apple's trademark for their Zero Configuration Networking implementation) is a suite of related technologies that allow networked devices to interoperate on a local network without requiring explicit configuration.
Requirements
Zero Configuration Networking requires the following things to operate:
- A valid IP address, obtained either by:
- Static assignment
- DHCP
- Link-local Addressing (part of Zero Configuration Networking)
- A means to address other devices by name, provided either by:
- DNS
- multicast DNS (mDNS -- part of Zero Configuration Networking)
Service Discovery
On top of this, Zero Configuration Networking also provides a means to discover what services are available on each device. This is something that is provided exclusively by Zero Configuration Networking and is called Zeroconf Service Discovery.
Configuration
Link-local Addresses
To use link-local addressing, first set up the proper routes:
route add default dev eth0 metric 99 route add -net 169.254.0.0 netmask 255.255.0.0 dev eth0 metric 99
Then, use avahi-autoipd to discover a valid link-local IP address:
/usr/sbin/avahi-autoipd --daemonize --syslog --wait eth0
mDNS
receiving mDNS
emerge nss-mdns
Set up multicast route:
route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
/etc/nsswitch.conf:
hosts: files mdns_minimal [NOTFOUND=return] dns mdns
Test:
ninja1 ~ # ping daniel-pc.local PING daniel-pc.local (10.0.1.11) 56(84) bytes of data. 64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=1 ttl=128 time=3.73 ms 64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=2 ttl=128 time=0.905 ms 64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=3 ttl=128 time=0.922 ms 64 bytes from Daniel-PC.local (10.0.1.11): icmp_req=4 ttl=128 time=0.827 ms
Sending mDNS/DNS-sd
rc-update add avahi-daemon default rc
Service Discovery
Get a list of services on the LAN:
ninja1 ~ # avahi-browse -ac