|Skip Navigation Links|
|Exit Print View|
|System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP) Oracle Solaris 11 Express 11/10|
Two extensions to the DNS protocol are multicast DNS (mDNS) and DNS Service Discovery (DNS-SD). mDNS extends the Domain Name Service system to operate over link-local multicast. DNS-SD adds support needed to discover network services over DNS.
Multicast DNS (mDNS) provides a naming service system that is easy to set up and maintain, for computers on a local link. All participating network devices on the same local link perform standard DNS functions, using multicast DNS rather than unicast, and do not need a unicast DNS server. For administrators, the primary advantage of mDNS is that no unicast DNS server needs to be maintained on the local network. There is no need, for example, to update and maintain host names in files to resolve hostname to IP address for devices on the local link that are using mDNS.
Network services include printing, file transfer, music sharing, servers for photo, document and other file sharing, and services provided by other local devices. DNS service discovery support Oracle Solaris includes open source framework and tools from Apple to enable applications to advertise and discover network services, using DNS on the Oracle Solaris release.
For users, network service discovery makes computing easier by enabling users to browse for services on the network, rather than needing to find the service manually. Existing standards, and work done by other companies and groups, assure that cross-platform support is available.
Use the Service Management Facility (SMF) to administer the mDNS daemon. You can use SMF to start and stop the mDNS service.
For an overview of SMF, refer to Chapter 11, Managing Services (Overview), in System Administration Guide: Basic Administration. Also refer to the svcadm(1M) and svcs(1) man pages for more details.
Multicast DNS and Service Discovery are both installed by default in the “all” cluster, when installing the Oracle Solaris release. For other types of devices, for example, printers, music, video, and communication devices, many already have mDNS installed.
In addition to being installed, mDNS must be enabled, and must be included in the /etc/nsswitch.conf file. See nsswitch.conf(4)
For the Oracle Solaris release, as root, or as a user with appropriate privileges, enable mDNS on each computer that will participate in mDNS.
# svcadm enable svc:/network/dns/multicast:default
Enabling mDNS this way persists through upgrades and reboots. For more information, see svcadm(1M).
# /etc/nsswitch.conf hosts: files dns mdns ipnodes: files dns mdns
For an example of the form such a file should take, see /etc/nswitch.conf.dns.
The dns-sd command is intended primarily for interactive use, mainly because its command line arguments and its output format can change over time, which makes invoking it from a shell script unpredictable and risky. Additionally, the asynchronous nature of DNS Service Discovery does not easily lend itself to script-oriented programming.
For complete dns-sd information, see the man page for dns-sd (1M) and to incorporate DNS service in applications, see the libdns_sd (3DNS_SD) man page.
EXAMPLES of the dns-sd command
Advertising a printing service
The following command advertises the existence of LPR printing service on port 515 on “My Test” machine, so that it will be available to DNS-SD compatible printing clients:
dns-sd -R "My Test" _printer._tcp. . 515 pdl=application/postscript
For this registration to be useful, the LPR service should be available on port 515.
Advertising a web page
The following command advertises a web page being served by an HTTP server on port 80 on My Test machine. The web page will appear on the Bonjour list in Safari and other DNS-SD compatible Web clients:
dns-sd -R "My Test" _http._tcp . 80 path=/path-to-page.html