sync: dns introduction
[skm-ma-ws1314.git] / dns-extensions.tex
1 \subsection{Extensions to the Domain Name System}\label{sec:dns}
2
3 In a distributed context, it is often not feasible to rely on a central,
4 authoritative DNS server, and there is usually no easy way to discover services.
5 The first problem is addressed with \term{Multicast DNS}, and since DNS is
6 basically a key-value store, it can also be used for service discovery, which is
7 achieved using \term{DNS-Based Service Discovery}. Both techniques were first
8 developed by Apple as part of the \term{Bonjour} project, and are now maintained
9 by the IETF Zeroconf working group.
10
11 \subsubsection{Multicast DNS}
12
13 \term{Multicast DNS}~\cite{rfc6762} (mDNS) describes an extension to the Domain
14 Name System that allows DNS resource records to be distributed on multiple hosts
15 in a network, therefore avoiding central authorities and enabling every host to
16 publish its own entries.
17
18 Software that supports resolution of mDNS records listens on the reserved
19 link-local multicast address \code{224.0.0.251} (for IPv4 queries) or
20 \code{FF02::FB} (for IPv6 queries) on UDP port 5353 for incoming queries.
21 Queries sent to those multicast address and port are standard DNS queries.
22 If a host receives a query and knows about the queried resource, it responds to the
23 querying host with a standard DNS response. The querying host can then simply
24 finish and use the result, or wait until other hosts respond to its query. The
25 latter is typically the case when a record can have multiple values, as it is
26 the case with \code{SRV} and \code{PTR} records.
27
28 Another feature of Multicast DNS is the reduction of traffic through
29 \term{Known-Answer Suppression}. It allows a querying host to specify already
30 known resources in its query when querying resources that could exist on more
31 than one host (e.~g., SRV records). The hosts matching those resources then do
32 not generate a response.
33
34 Finally, hosts may also send unsolicited responses. This can be used to notify
35 the network of new services available on a host.
36
37 \pages{1}
38
39 \subsubsection{DNS-Based Service Discovery}\label{sec:dnssd}
40
41 As another recent extension for the Domain Name System, \term{DNS-Based Service
42 Discovery (DNS-SD)}~\cite{rfc6763} uses DNS records of types
43 \code{SRV}~\cite{rfc2782} and \code{PTR} in a way that allows hosts to browse
44 for services in a domain. As an example, Figure~\ref{fig:dnssd} shows the
45 process of browsing for all XMPP clients in the domain \code{example.org}.
46 This is a two-step process, consisting of \term{Service Instance Enumeration}
47 and \term{Service Instance Resolution}.
48
49 \begin{figure}[htop]
50 \centering
51 \includegraphics[width=0.9\textwidth]{dnssd-mock.jpg}
52 \caption{DNS-SD: Service Instance Enumeration and Resolution
53 \todo[XMPP is a bad example here, use IPP]}
54 \label{fig:dnssd}
55 \end{figure}
56
57 \paragraph{Service Instance Enumeration} At first, to enumerate the available
58 services in a domain for a given protocol, a DNS-SD-enabled client queries
59 resources of type \code{PTR} of the form \code{\_service.\_proto.domain}. The
60 result of this query is then a list of \term{instance names} of the form
61 \code{name.\_service.\_proto.domain} which provide the specified service. For
62 example, in Figure~\ref{fig:dnssd}, by querying for
63 \code{\_ipp.\_tcp.\_example.org}, all printers supporting the IPP protocol in the
64 domain \code{example.org} are enumerated, and as a result, the instance names of
65 three hosts are returned.
66
67 \paragraph{Service Instance Resolution} As a second step, the returned instance
68 names are resolved as \code{SRV} records to retrieve the actual host names and
69 port numbers of a service. In the example, resolution of one instance name shows
70 that an IPP server is running at host \code{gutenberg.example.org} on port 5222.
71 Additionally, an optional \code{TXT} record with the same instance name can
72 contain further information about the service (e.~g., information about the
73 supported paper sizes).
74
75 Through the usage of \code{SRV} records, it is easily possible for a service to
76 inform clients about non-standard port numbers, and especially in connection
77 with Multicast DNS makes it easy to deploy decentralized systems for the
78 Internet of Things~\cite{Klauck:2012:BCC:2352852.2352881}.
79
80 \pages{1}
81 % vim: set ft=tex et ts=2 sw=2 :
This page took 0.145043 seconds and 5 git commands to generate.