Service Discovery
Introduction
Network service discovery is a project under the NWAM series of projects. This project will integrate the framework and tools from the Apple "Bonjour" project to allow applications to advertise and discover network services using Multicast DNS on Solaris. Multicast DNS (mDNS) is an extension to the DNS protocol to perform DNS operations on the local-link using multicast. Multicast DNS supports DNS operations to discover and advertise network services on the network (as specified in the DNS-SD Internet draft).
DNS Service Discovery
DNS-SD by design has several strengths over other service discovery protocols. Foremost is the choice of leveraging a widely deployed protocol, namely DNS, in IP networks. It is easier to implement and support in network devices and software over other competing protocols given the wide adoption and experience surrounding DNS. DNS-SD doesn't propose a new security protocol but relies on existing security extensions available for DNS update. DNS-SD works with existing tools such as nslookup/dig to query for available services. The programming API available for developers to support DNS-SD is simple, is readily available on several platforms, and has matured as a stable API since Apple's first release of Bonjour in 2002.
Multicast DNS (mDNS)
Multicast DNS allows network devices on the same logical or physical link (local link) to perform standard DNS functions without unicast DNS server by using multicast. mDNS is compatible with DNS-SD and can be used to perform service discovery on the local link. mDNS also proposes the use of top-level domain ".local." for naming hosts on the local link only. Any other top-level domain can also be used for link local naming but must be user configured. Apple's Bonjour implementation, mDNSResponder, includes a mDNS daemon. As part of this project we plan on integrating mDNS in Solaris to allow service discovery and local link name resolution in networks without unicast DNS server.
Project Components
This section provides a high-level overview of the various components delivered by the project and how they all fit together. The following components will be integrated from Apple's mDNSResponder code:
- mDNSResponder daemon to perform DNS operations for service discovery. This daemon also functions over multicast to support mDNS.
- libdns_sd for applications to add support for DNS-SD and mDNS. This library allows services to register on startup with mDNSResponder and advertise the service on the network. Utilities or proxies can use the API to browse and register services.
- A CLI tool 'dns-sd' to browse and discover services.
Our project plans to add the following components in Solaris, in addition to the above that are included in mDNSResponder:
- Add a new SMF manifest for the mDNS daemon allowing administrators to manage mDNS service using SMF.
- A new nsswitch backend for mDNS to support link-local host resolution. Host resolution queries with names ending with ".local." domain and IPv4 link-local addresses can be resolved using mdns by modifying the nsswitch.conf file. Administrators can also use mDNS for other domains by modifying the nss_mdns default configuration. See mdnsd(1M).
The following block diagram provides a high-level picture of the interaction between various project components. Avahi proxy will be developed by the JDS Gnome team. Unless otherwise noted all components perform IPC through sockets API.
|~-------|
| Avahi |
| apps |
~---------
||
DBUS
|~---------| VV
|~-----------| |NSS mDNS | |~-----------|
| Client | | module | |Avahi proxy |
|~-----------| |~---------| |~-----------|
| libdns_sd | |libdns_sd | | libdns_sd |
|~-----------| |~---------| |~-----------|
|| || Sockets ||
VV VV VV
~--------------------------------------------------
mDNSResponder (UDP port 5353)
~--------------------------------------------------
||
Network
Status
Solaris support for advertising & discovering services via Multicast DNS was integrated in Nevada build 72. A new nsswitch 'mdns' backend was introduced to lookup hostname and IP addresses using link-local Multicast DNS queries. mDNS is managed via SMF (disabled by default) and should be administered using the following FMRI: svc:/network/dns/multicast:default For more information on mDNS please see mdnsd(1M) and to use mDNS as a source for hosts and ipnodes databases please see nsswitch.conf(4) and the /etc/nsswitch.dns file. If you find any problems please file bugs under solaris/network/dns. Please direct any questions to nwam-discuss at opensolaris dot org
Future Directions
The emphasis of the current project is to deliver a stable, interoperable network service discovery framework in Solaris. Future directions include enabling further Solaris network services, auto-discovery of naming services (NIS/LDAP servers) and making network clients aware of the discovered services on a network.