Zeroconf
From Wikipedia, the free encyclopedia
The five layer TCP/IP model |
5. Application layer |
DHCP • DNS • FTP • HTTP • IMAP4 • IRC • NNTP • XMPP • MIME • POP3 • SIP • SMTP • SNMP • SSH • TELNET • BGP • RPC • RTP • RTCP • TLS/SSL • SDP • SOAP • L2TP • PPTP • … |
4. Transport layer |
3. Network layer |
2. Data link layer |
ATM • DTM • Ethernet • FDDI • Frame Relay • GPRS • PPP • ARP • RARP • … |
1. Physical layer |
Ethernet physical layer • ISDN • Modems • PLC • SONET/SDH • G.709 • Wi-Fi • … |
Zeroconf or Zero Configuration Networking is a set of techniques that automatically create a usable IP network without configuration or special servers. This allows inexpert users to connect computers, networked printers, and other items together and expect them to work automatically. Without Zeroconf or something similar, a knowledgeable user must either set up special servers, like DHCP and DNS, or set up each computer's network settings by hand, which is a tedious task, and is challenging for non-technical people.
Zeroconf currently solves three problems :
- Choose numeric network addresses for networked items
- Figure out which computer has a certain name
- Figure out where to get services, like printing (service discovery)
Contents |
[edit] Choosing addresses
Both IPv4 and IPv6 have standard ways of choosing IP addresses without help. By RFC 3927, IPv4 uses the 169.254.* (link-local) set of addresses. For IPv6, see RFC 2462.
The technique for IPv4 is called IPv4 Link-Local (IPV4LL) in the RFC, however Microsoft refers to this as Automatic Private IP Addressing (APIPA) or Internet Protocol Automatic Configuration (IPAC).
[edit] Name resolution
There are two very similar ways of figuring out which networked item has a certain name. Apple Computer's Multicast DNS (mDNS) is in use, and is published freely, though not by a standardization body. Microsoft's Link-local Multicast Name Resolution (LLMNR) is little used, but has been published as informational RFC 4795.
The two protocols have minor differences. mDNS allows a network device to choose a domain name in the ".local" namespace and announce it using a special multicast IP address. This introduces special semantics for the .local namespace,[1] which is considered a problem by some members of the IETF.[2] The current LLMNR draft allows a network device to choose any domain name, which is considered a security risk by some members of the IETF.[3] mDNS is compatible with DNS-SD as described in the next section, while LLMNR is not.[4]
[edit] Service discovery
[edit] Apple's protocol: Multicast DNS/DNS-SD
Multicast DNS (mDNS) is a protocol that uses similar APIs to the unicast DNS system but implemented differently. Each computer on the LAN stores its own list of DNS records (e.g. A, MX, PTR, SRV, etc) and when a mDNS client wants to know the IP address of a PC given its name, the PC with the corresponding A record replies with its IP address. The mDNS multicast address is 224.0.0.251.
DNS based Service Discovery (DNS-SD) is the other half of Apple's lightweight solution, built on top of the tested and robust Domain Name System. It is used in Apple products, many network printers and a considerable number of third party products and applications on various operating systems. It is considered simpler and easier to implement than Microsoft's competing technology, SSDP, because it uses DNS rather than HTTP. It uses DNS SRV (RFC 2782), TXT, and PTR records to advertise Service Instance Names. The hosts offering the different services publish details of available services like instance, service type, domain name and optional configuration parameters. Service types are given informally on a first-come basis. A service type registry is maintained and published by DNS-SD.org.
Many Mac OS X networking clients, such as the Safari browser and the iChat instant messaging software, use DNS-SD to locate nearby servers. On Windows, many instant messaging and VoIP clients such as Gizmo support DNS-SD. On Linux, many Linux distributions already include DNS-SD functionality.
mDNS/DNS-SD was pioneered by Apple Computer employee Stuart Cheshire in the company's move from AppleTalk to IP.
[edit] Microsoft's protocol: uPNP SSDP
Simple Service Discovery Protocol (SSDP) is a UPnP protocol, used in Windows XP and several brands of network equipment. Despite its name, it is considered complex and requires more effort to implement than DNS-SD. SSDP uses HTTP notification announcements that give a service-type URI and a Unique Service Name (USN). Service types are regulated by the Universal Plug and Play Steering Committee.
SSDP is supported in many SOHO firewall appliances, where host computers behind it may pierce holes for applications. It is also used in media center systems, where media exchange between host computers and the media center are facilitated using SSDP.
[edit] Efforts toward an IETF standard protocol
Service Location Protocol (SLP), the only protocol for service discovery to have reached the IETF RFC status, is usually ignored by large vendors, except Hewlett-Packard's network printers, Novell, Sun Microsystems, and Apple Computer. SLP is described in RFC 2608; it is not yet an IETF Standard or Draft Standard, although implementations are available for both Solaris and Linux.
[edit] Standardization
RFC 3927, a standard for choosing addresses for networked items, was published in March 2005 by the Zeroconf IETF working group, which included individuals from Apple, Sun, and Microsoft.[5]
LLMNR was submitted for official adoption in the DNSEXT IETF working group, however failed to win enough votes and thus has been published as informational RFC only: RFC 4795.[6] Following the failure of LLMNR to become an Internet standard Apple was asked by the IETF to submit the mDNS/DNS-SD specs for publishing as informational RFC as well, given that mDNS/DNS-SD is used much more widely than LLMNR.
RFC 2608, the SLP standard for figuring out where to get services, was published by the SVRLOC IETF working group.[7]
[edit] Major Implementations
[edit] Apple Bonjour
The most widely adopted Zeroconf solution is Bonjour (formerly Rendezvous) from Apple Computer, which uses multicast DNS and DNS Service Discovery. Apple changed its preferred Zeroconf technology from SLP to mDNS and DNS-SD between Mac OS 10.1 and 10.2, though SLP continues to be supported by Mac OS.
Apple's mDNSResponder has interfaces for C and Java[8] and is available on BSD, Mac OS X, Linux, other POSIX based operating systems and Windows. The Windows downloads are available from Apple's website.[9]
[edit] Avahi
Avahi is a Zeroconf implementation for Linux and BSDs. It implements IPv4LL, mDNS and DNS-SD. It is part of most Linux distributions, and is installed by default on e.g. Ubuntu version 6.10. If run in conjunction with nss-mdns it also offers host name resolution.[10]
Avahi also implements binary compatibility libraries that emulate Bonjour and and the historic mDNS implementation Howl, so software made to use those implementations can also utilize Avahi through the emulation interfaces.
[edit] Windows CE 5.0
Windows CE 5.0 includes Microsoft's own implementation of LLMNR.
[edit] Link-Local IPv4 Addresses
There are some implementations available:
- Windows and Mac OS have both supported link-local addresses since 1998. Apple released its open-source implementation in the Darwin bootp package.
- Avahi contains a high-quality implementation of IPv4LL in the avahi-autoipd tool.
- zcip (Zero-Conf IP)
- BusyBox embeds a simple IPv4LL implementation
- Stablebox, a fork from Busybox, offers a slightly modified IPv4LL implementation named llad.
- zeroconf, a package based on Simple IPv4LL, a shorter implementation by Arthur van Hoff.[11]
The above implementations are all stand-alone daemons or plugins for DHCP clients that only deal with link-local IP addresses. Another approach is to modify existing DHCP clients:
- Elvis Pfützenreuter has written a patch] for the uDHCP client/server.[12]
Neither of these implementations addresses kernel issues like the broadcasting of ARP replies[13] or closing of existing network connections.
[edit] References
- Erik Guttman (2001). "Autoconfiguration for IP Networking: Enabling Local Communication". IEEE Internet Computing 5 (3): 81-86.
- ^ http://www1.ietf.org/mail-archive/web/ietf/current/msg37126.html
- ^ http://www1.ietf.org/mail-archive/web/ietf/current/msg37773.html
- ^ http://www1.ietf.org/mail-archive/web/ietf/current/msg37740.html
- ^ More details on the differences
- ^ http://www.ietf.org/html.charters/OLD/zeroconf-charter.html
- ^ http://www.ietf.org/html.charters/dnsext-charter.html
- ^ http://www.ietf.org/html.charters/OLD/svrloc-charter.html
- ^ http://www.macdevcenter.com/pub/a/mac/2004/08/31/osx_java.html
- ^ http://www.apple.com/support/downloads/bonjourforwindows.html
- ^ http://0pointer.de/lennart/projects/nss-mdns
- ^ http://www.zeroconf.org/AVH-IPv4LL.c
- ^ http://udhcp.busybox.net/lists/udhcp/2005-May/000124.html
- ^ http://www.science.uva.nl/research/air/wiki/LinkLocalARPMeasurements
[edit] See also
[edit] External links
- JmDNS, a pure Java implementation of mDNS/DNS-SD
- pyZeroConf, a pure Python implementation of mDNS/DNS-SD
- Multicast DNS Specification
- DNS-Based Service Discovery Specification
- Zeroconf.org - Stuart Cheshire's page, including expired internet drafts.
- dns-sd.org DNS based Service Discovery
- multicastdns.org Multicast DNS
- "Understanding Zeroconf and Multicast DNS", December 2002 article, very slightly outdated, on the O'Reilly Network.
- AIR Wiki : ZeroconfTechnologies
- Charter of the DNSEXT working group, which coordinates LLMNR standardization
- Explanation of .local addresses, which are used with mDNS but not yet standardized by IANA
- RFC 2608, Service Location Protocol, Version 2
- Zero Configuration Networking: The Definitive Guide, by Daniel Steinberg and Stuart Cheshire, O'Reilly
- Zeroconf tech talk by Stuart Cheshire to Google engineers.