1 \subsection{Extensions to the Domain Name System
}\label{sec:dns
}
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
}
9 project
\footnote{\url{https://developer.apple.com/bonjour/
}}, and are now
10 maintained by the IETF Zeroconf working
11 group
\footnote{\url{http://zeroconf.org
}}.
13 \subsubsection{Multicast DNS
}
15 \term{Multicast DNS
} (mDNS)~
\cite{rfc6762
} describes an extension to the Domain
16 Name System that allows DNS resource records to be distributed on multiple hosts
17 in a network, therefore avoiding central authorities and enabling every host to
18 publish its own entries. For that purpose, a special domain, usually
19 named
\code{.local
}, is used.
21 Software that supports mDNS listens on the reserved
22 link-local multicast address
\code{224.0.0.251} (for IPv4 queries) or
23 \code{FF02::FB
} (for IPv6 queries) on UDP port
5353 for incoming queries.
24 Queries sent to those multicast address and port are standard DNS queries.
25 If a host receives a query and knows about the queried resource, it responds to the
26 querying host with a standard DNS response. The querying host can then simply
27 finish and use the result, or wait until other hosts respond to its query. The
28 latter is typically the case when a record can have multiple values, as it is
29 the case with
\code{SRV
} and
\code{PTR
} records.
31 Another feature of Multicast DNS is the reduction of traffic through
32 \term{Known-Answer Suppression
}. It allows a querying host to specify already
33 known resources in its query when querying resources that could exist on more
34 than one host (e.~g., SRV records). The hosts matching those resources then do
35 not generate a response, thus reducing the messages in the network and saving
36 bandwidth, which is usually a scarce resource in wireless networks.
38 \enlargethispage{2\baselineskip}
39 Finally, hosts may also send unsolicited responses. This can be used to notify
40 the network of new services available on a host.
42 \subsubsection{DNS-Based Service Discovery
}\label{sec:dnssd
}
44 As another recent extension for the Domain Name System,
\term{DNS-Based Service
45 Discovery (DNS-SD)
}~
\cite{rfc6763
} uses DNS records of types
46 SRV~
\cite{rfc2782
} and PTR in a way that allows hosts to browse
47 for services in a domain. This is a two-step process, consisting of
48 \term{Service Instance Enumeration
} and
\term{Service Instance Resolution
}.
50 %\todo{XMPP is a probably not the best example here, use IPP instead}
51 %\begin{subfigure} \end{subfigure} \begin{figure}[top] \centering
52 %\includegraphics[width=0.9\textwidth]{fig-dnssd-mock.jpg} \caption{DNS-SD:
53 %Service Instance Enumeration and Resolution} \label{fig:dnssd} \end{figure}
54 \paragraph{1. Service Instance Enumeration
} At first, to enumerate the available
55 services in a domain for a given protocol, a DNS-SD-enabled client queries
56 PTR resources of the form
\code{\_service.
\_proto.domain
}. The result of
57 this query is then a list of
\term{instance names
} of the form
58 \code{name.
\_service.
\_proto.domain
} which point to the hosts providing the
59 service. For example, by querying for
\code{\_ipp.
\_tcp.
\_example.org
}, the
60 instance names for all printers supporting the IPP protocol in the domain
61 \code{example.org
} are returned.
63 \paragraph{2. Service Instance Resolution
} As a second step, the returned instance
64 names are resolved as SRV records to retrieve the actual host names and
65 port numbers of a service. For example, resolution of one instance name shows
66 that an IPP server is running at host
\code{gutenberg.example.org
} on port
5222.
67 Additionally, an optional TXT record with the same instance name can
68 contain further information about the service (e.~g. information about the
69 supported paper sizes).
71 Through the usage of SRV records, it is easily possible for a service to
72 inform clients about non-standard port numbers, and especially in connection
73 with Multicast DNS, this makes it easy to deploy decentralized systems for the
74 Internet of Things.
\cite{Klauck:
2012:BCC:
2352852.2352881}
76 % vim: set ft=tex et ts=2 sw=2 :