]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bind9/doc/arm/Bv9ARM.ch01.html
merge fix for boot-time hang on centos' xen
[FreeBSD/FreeBSD.git] / contrib / bind9 / doc / arm / Bv9ARM.ch01.html
1 <!--
2  - Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC")
3  - Copyright (C) 2000-2003 Internet Software Consortium.
4  - 
5  - Permission to use, copy, modify, and distribute this software for any
6  - purpose with or without fee is hereby granted, provided that the above
7  - copyright notice and this permission notice appear in all copies.
8  - 
9  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  - PERFORMANCE OF THIS SOFTWARE.
16 -->
17 <!-- $Id: Bv9ARM.ch01.html,v 1.12.2.2.8.20 2008/01/19 01:52:13 marka Exp $ -->
18 <html>
19 <head>
20 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
21 <title>Chapter 1. Introduction</title>
22 <meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
23 <link rel="start" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
24 <link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
25 <link rel="prev" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
26 <link rel="next" href="Bv9ARM.ch02.html" title="Chapter 2. BIND Resource Requirements">
27 </head>
28 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
29 <div class="navheader">
30 <table width="100%" summary="Navigation header">
31 <tr><th colspan="3" align="center">Chapter 1. Introduction </th></tr>
32 <tr>
33 <td width="20%" align="left">
34 <a accesskey="p" href="Bv9ARM.html">Prev</a> </td>
35 <th width="60%" align="center"> </th>
36 <td width="20%" align="right"> <a accesskey="n" href="Bv9ARM.ch02.html">Next</a>
37 </td>
38 </tr>
39 </table>
40 <hr>
41 </div>
42 <div class="chapter" lang="en">
43 <div class="titlepage"><div><div><h2 class="title">
44 <a name="Bv9ARM.ch01"></a>Chapter 1. Introduction </h2></div></div></div>
45 <div class="toc">
46 <p><b>Table of Contents</b></p>
47 <dl>
48 <dt><span class="sect1"><a href="Bv9ARM.ch01.html#id2563879">Scope of Document</a></span></dt>
49 <dt><span class="sect1"><a href="Bv9ARM.ch01.html#id2564246">Organization of This Document</a></span></dt>
50 <dt><span class="sect1"><a href="Bv9ARM.ch01.html#id2564317">Conventions Used in This Document</a></span></dt>
51 <dt><span class="sect1"><a href="Bv9ARM.ch01.html#id2563142">The Domain Name System (<acronym class="acronym">DNS</acronym>)</a></span></dt>
52 <dd><dl>
53 <dt><span class="sect2"><a href="Bv9ARM.ch01.html#id2563162">DNS Fundamentals</a></span></dt>
54 <dt><span class="sect2"><a href="Bv9ARM.ch01.html#id2563197">Domains and Domain Names</a></span></dt>
55 <dt><span class="sect2"><a href="Bv9ARM.ch01.html#id2565057">Zones</a></span></dt>
56 <dt><span class="sect2"><a href="Bv9ARM.ch01.html#id2565131">Authoritative Name Servers</a></span></dt>
57 <dt><span class="sect2"><a href="Bv9ARM.ch01.html#id2565223">Caching Name Servers</a></span></dt>
58 <dt><span class="sect2"><a href="Bv9ARM.ch01.html#id2565281">Name Servers in Multiple Roles</a></span></dt>
59 </dl></dd>
60 </dl>
61 </div>
62 <p>The Internet Domain Name System (<acronym class="acronym">DNS</acronym>) consists of the syntax
63   to specify the names of entities in the Internet in a hierarchical
64   manner, the rules used for delegating authority over names, and the
65   system implementation that actually maps names to Internet
66   addresses.  <acronym class="acronym">DNS</acronym> data is maintained in a group of distributed
67   hierarchical databases.</p>
68 <div class="sect1" lang="en">
69 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
70 <a name="id2563879"></a>Scope of Document</h2></div></div></div>
71 <p>The Berkeley Internet Name Domain (<acronym class="acronym">BIND</acronym>) implements a
72     domain name server for a number of operating systems. This
73     document provides basic information about the installation and
74     care of the Internet Software Consortium (<acronym class="acronym">ISC</acronym>)
75     <acronym class="acronym">BIND</acronym> version 9 software package for system
76     administrators.</p>
77 <p>This version of the manual corresponds to BIND version 9.3.</p>
78 </div>
79 <div class="sect1" lang="en">
80 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
81 <a name="id2564246"></a>Organization of This Document</h2></div></div></div>
82 <p>In this document, <span class="emphasis"><em>Section 1</em></span> introduces
83     the basic <acronym class="acronym">DNS</acronym> and <acronym class="acronym">BIND</acronym> concepts. <span class="emphasis"><em>Section 2</em></span>
84     describes resource requirements for running <acronym class="acronym">BIND</acronym> in various
85     environments. Information in <span class="emphasis"><em>Section 3</em></span> is
86     <span class="emphasis"><em>task-oriented</em></span> in its presentation and is
87     organized functionally, to aid in the process of installing the
88     <acronym class="acronym">BIND</acronym> 9 software. The task-oriented section is followed by
89     <span class="emphasis"><em>Section 4</em></span>, which contains more advanced
90     concepts that the system administrator may need for implementing
91     certain options. <span class="emphasis"><em>Section 5</em></span>
92     describes the <acronym class="acronym">BIND</acronym> 9 lightweight
93     resolver.  The contents of <span class="emphasis"><em>Section 6</em></span> are
94     organized as in a reference manual to aid in the ongoing
95     maintenance of the software. <span class="emphasis"><em>Section 7
96     </em></span>addresses security considerations, and
97     <span class="emphasis"><em>Section 8</em></span> contains troubleshooting help. The
98     main body of the document is followed by several
99     <span class="emphasis"><em>appendices</em></span> which contain useful reference
100     information, such as a <span class="emphasis"><em>bibliography</em></span> and
101     historic information related to <acronym class="acronym">BIND</acronym> and the Domain Name
102     System.</p>
103 </div>
104 <div class="sect1" lang="en">
105 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
106 <a name="id2564317"></a>Conventions Used in This Document</h2></div></div></div>
107 <p>In this document, we use the following general typographic
108     conventions:</p>
109 <div class="informaltable"><table border="1">
110 <colgroup>
111 <col>
112 <col>
113 </colgroup>
114 <tbody>
115 <tr>
116 <td>
117 <p><span class="emphasis"><em>To
118 describe:</em></span></p>
119 </td>
120 <td>
121 <p><span class="emphasis"><em>We use the style:</em></span></p>
122 </td>
123 </tr>
124 <tr>
125 <td>
126 <p>a pathname, filename, URL, hostname,
127 mailing list name, or new term or concept</p>
128 </td>
129 <td><p><code class="filename">Fixed width</code></p></td>
130 </tr>
131 <tr>
132 <td><p>literal user
133 input</p></td>
134 <td><p><strong class="userinput"><code>Fixed Width Bold</code></strong></p></td>
135 </tr>
136 <tr>
137 <td><p>program output</p></td>
138 <td><p><code class="computeroutput">Fixed Width</code></p></td>
139 </tr>
140 </tbody>
141 </table></div>
142 <p>The following conventions are used in descriptions of the
143 <acronym class="acronym">BIND</acronym> configuration file:</p>
144 <div class="informaltable"><table border="1">
145 <colgroup>
146 <col>
147 <col>
148 </colgroup>
149 <tbody>
150 <tr>
151 <td><p><span class="emphasis"><em>To
152 describe:</em></span></p></td>
153 <td><p><span class="emphasis"><em>We use the style:</em></span></p></td>
154 </tr>
155 <tr>
156 <td><p>keywords</p></td>
157 <td><p><code class="literal">Fixed Width</code></p></td>
158 </tr>
159 <tr>
160 <td><p>variables</p></td>
161 <td><p><code class="varname">Fixed Width</code></p></td>
162 </tr>
163 <tr>
164 <td><p>Optional input</p></td>
165 <td><p>[<span class="optional">Text is enclosed in square brackets</span>]</p></td>
166 </tr>
167 </tbody>
168 </table></div>
169 </div>
170 <div class="sect1" lang="en">
171 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
172 <a name="id2563142"></a>The Domain Name System (<acronym class="acronym">DNS</acronym>)</h2></div></div></div>
173 <p>The purpose of this document is to explain the installation
174 and upkeep of the <acronym class="acronym">BIND</acronym> (Berkeley Internet Name Domain) software package, and we
175 begin by reviewing the fundamentals of the Domain Name System
176 (<acronym class="acronym">DNS</acronym>) as they relate to <acronym class="acronym">BIND</acronym>.
177 </p>
178 <div class="sect2" lang="en">
179 <div class="titlepage"><div><div><h3 class="title">
180 <a name="id2563162"></a>DNS Fundamentals</h3></div></div></div>
181 <p>The Domain Name System (DNS) is the hierarchical, distributed
182 database.  It stores information for mapping Internet host names to IP
183 addresses and vice versa, mail routing information, and other data
184 used by Internet applications.</p>
185 <p>Clients look up information in the DNS by calling a
186 <span class="emphasis"><em>resolver</em></span> library, which sends queries to one or
187 more <span class="emphasis"><em>name servers</em></span> and interprets the responses.
188 The <acronym class="acronym">BIND</acronym> 9 software distribution contains a
189 name server, <span><strong class="command">named</strong></span>, and two resolver
190 libraries, <span><strong class="command">liblwres</strong></span> and <span><strong class="command">libbind</strong></span>.
191 </p>
192 </div>
193 <div class="sect2" lang="en">
194 <div class="titlepage"><div><div><h3 class="title">
195 <a name="id2563197"></a>Domains and Domain Names</h3></div></div></div>
196 <p>The data stored in the DNS is identified by <span class="emphasis"><em>domain
197 names</em></span> that are organized as a tree according to
198 organizational or administrative boundaries. Each node of the tree,
199 called a <span class="emphasis"><em>domain</em></span>, is given a label. The domain name of the
200 node is the concatenation of all the labels on the path from the
201 node to the <span class="emphasis"><em>root</em></span> node.  This is represented
202 in written form as a string of labels listed from right to left and
203 separated by dots. A label need only be unique within its parent
204 domain.</p>
205 <p>For example, a domain name for a host at the
206 company <span class="emphasis"><em>Example, Inc.</em></span> could be
207 <code class="literal">mail.example.com</code>,
208 where <code class="literal">com</code> is the
209 top level domain to which
210 <code class="literal">ourhost.example.com</code> belongs,
211 <code class="literal">example</code> is
212 a subdomain of <code class="literal">com</code>, and
213 <code class="literal">ourhost</code> is the
214 name of the host.</p>
215 <p>For administrative purposes, the name space is partitioned into
216 areas called <span class="emphasis"><em>zones</em></span>, each starting at a node and
217 extending down to the leaf nodes or to nodes where other zones start.
218 The data for each zone is stored in a <span class="emphasis"><em>name
219 server</em></span>, which answers queries about the zone using the
220 <span class="emphasis"><em>DNS protocol</em></span>.
221 </p>
222 <p>The data associated with each domain name is stored in the
223 form of <span class="emphasis"><em>resource records</em></span> (<acronym class="acronym">RR</acronym>s).
224 Some of the supported resource record types are described in
225 <a href="Bv9ARM.ch06.html#types_of_resource_records_and_when_to_use_them" title="Types of Resource Records and When to Use Them">the section called &#8220;Types of Resource Records and When to Use Them&#8221;</a>.</p>
226 <p>For more detailed information about the design of the DNS and
227 the DNS protocol, please refer to the standards documents listed in
228 <a href="Bv9ARM.ch09.html#rfcs" title="Request for Comments (RFCs)">the section called &#8220;Request for Comments (RFCs)&#8221;</a>.</p>
229 </div>
230 <div class="sect2" lang="en">
231 <div class="titlepage"><div><div><h3 class="title">
232 <a name="id2565057"></a>Zones</h3></div></div></div>
233 <p>To properly operate a name server, it is important to understand
234 the difference between a <span class="emphasis"><em>zone</em></span>
235 and a <span class="emphasis"><em>domain</em></span>.</p>
236 <p>As we stated previously, a zone is a point of delegation in
237 the <acronym class="acronym">DNS</acronym> tree. A zone consists of
238 those contiguous parts of the domain
239 tree for which a name server has complete information and over which
240 it has authority. It contains all domain names from a certain point
241 downward in the domain tree except those which are delegated to
242 other zones. A delegation point is marked by one or more
243 <span class="emphasis"><em>NS records</em></span> in the
244 parent zone, which should be matched by equivalent NS records at
245 the root of the delegated zone.</p>
246 <p>For instance, consider the <code class="literal">example.com</code>
247 domain which includes names
248 such as <code class="literal">host.aaa.example.com</code> and
249 <code class="literal">host.bbb.example.com</code> even though
250 the <code class="literal">example.com</code> zone includes
251 only delegations for the <code class="literal">aaa.example.com</code> and
252 <code class="literal">bbb.example.com</code> zones.  A zone can map
253 exactly to a single domain, but could also include only part of a
254 domain, the rest of which could be delegated to other
255 name servers. Every name in the <acronym class="acronym">DNS</acronym> tree is a
256 <span class="emphasis"><em>domain</em></span>, even if it is
257 <span class="emphasis"><em>terminal</em></span>, that is, has no
258 <span class="emphasis"><em>subdomains</em></span>.  Every subdomain is a domain and
259 every domain except the root is also a subdomain. The terminology is
260 not intuitive and we suggest that you read RFCs 1033, 1034 and 1035 to
261 gain a complete understanding of this difficult and subtle
262 topic.</p>
263 <p>Though <acronym class="acronym">BIND</acronym> is called a "domain name server",
264 it deals primarily in terms of zones. The master and slave
265 declarations in the <code class="filename">named.conf</code> file specify
266 zones, not domains. When you ask some other site if it is willing to
267 be a slave server for your <span class="emphasis"><em>domain</em></span>, you are
268 actually asking for slave service for some collection of zones.</p>
269 </div>
270 <div class="sect2" lang="en">
271 <div class="titlepage"><div><div><h3 class="title">
272 <a name="id2565131"></a>Authoritative Name Servers</h3></div></div></div>
273 <p>Each zone is served by at least
274 one <span class="emphasis"><em>authoritative name server</em></span>,
275 which contains the complete data for the zone.
276 To make the DNS tolerant of server and network failures,
277 most zones have two or more authoritative servers.
278 </p>
279 <p>Responses from authoritative servers have the "authoritative
280 answer" (AA) bit set in the response packets.  This makes them 
281 easy to identify when debugging DNS configurations using tools like
282 <span><strong class="command">dig</strong></span> (<a href="Bv9ARM.ch03.html#diagnostic_tools" title="Diagnostic Tools">the section called &#8220;Diagnostic Tools&#8221;</a>).</p>
283 <div class="sect3" lang="en">
284 <div class="titlepage"><div><div><h4 class="title">
285 <a name="id2565154"></a>The Primary Master</h4></div></div></div>
286 <p>
287 The authoritative server where the master copy of the zone data is maintained is
288 called the <span class="emphasis"><em>primary master</em></span> server, or simply the
289 <span class="emphasis"><em>primary</em></span>.  It loads the zone contents from some
290 local file edited by humans or perhaps generated mechanically from
291 some other local file which is edited by humans.  This file is called
292 the <span class="emphasis"><em>zone file</em></span> or <span class="emphasis"><em>master file</em></span>.</p>
293 </div>
294 <div class="sect3" lang="en">
295 <div class="titlepage"><div><div><h4 class="title">
296 <a name="id2565175"></a>Slave Servers</h4></div></div></div>
297 <p>The other authoritative servers, the <span class="emphasis"><em>slave</em></span>
298 servers (also known as <span class="emphasis"><em>secondary</em></span> servers) load
299 the zone contents from another server using a replication process
300 known as a <span class="emphasis"><em>zone transfer</em></span>.  Typically the data are
301 transferred directly from the primary master, but it is also possible
302 to transfer it from another slave.  In other words, a slave server
303 may itself act as a master to a subordinate slave server.</p>
304 </div>
305 <div class="sect3" lang="en">
306 <div class="titlepage"><div><div><h4 class="title">
307 <a name="id2565194"></a>Stealth Servers</h4></div></div></div>
308 <p>Usually all of the zone's authoritative servers are listed in 
309 NS records in the parent zone.  These NS records constitute
310 a <span class="emphasis"><em>delegation</em></span> of the zone from the parent.
311 The authoritative servers are also listed in the zone file itself,
312 at the <span class="emphasis"><em>top level</em></span> or <span class="emphasis"><em>apex</em></span>
313 of the zone.  You can list servers in the zone's top-level NS
314 records that are not in the parent's NS delegation, but you cannot
315 list servers in the parent's delegation that are not present at
316 the zone's top level.</p>
317 <p>A <span class="emphasis"><em>stealth server</em></span> is a server that is
318 authoritative for a zone but is not listed in that zone's NS
319 records.  Stealth servers can be used for keeping a local copy of a
320 zone to speed up access to the zone's records or to make sure that the
321 zone is available even if all the "official" servers for the zone are
322 inaccessible.</p>
323 <p>A configuration where the primary master server itself is a
324 stealth server is often referred to as a "hidden primary"
325 configuration.  One use for this configuration is when the primary master
326 is behind a firewall and therefore unable to communicate directly
327 with the outside world.</p>
328 </div>
329 </div>
330 <div class="sect2" lang="en">
331 <div class="titlepage"><div><div><h3 class="title">
332 <a name="id2565223"></a>Caching Name Servers</h3></div></div></div>
333 <p>The resolver libraries provided by most operating systems are 
334 <span class="emphasis"><em>stub resolvers</em></span>, meaning that they are not capable of
335 performing the full DNS resolution process by themselves by talking
336 directly to the authoritative servers.  Instead, they rely on a local
337 name server to perform the resolution on their behalf.  Such a server
338 is called a <span class="emphasis"><em>recursive</em></span> name server; it performs
339 <span class="emphasis"><em>recursive lookups</em></span> for local clients.</p>
340 <p>To improve performance, recursive servers cache the results of
341 the lookups they perform.  Since the processes of recursion and
342 caching are intimately connected, the terms
343 <span class="emphasis"><em>recursive server</em></span> and
344 <span class="emphasis"><em>caching server</em></span> are often used synonymously.</p>
345 <p>The length of time for which a record may be retained in
346 the cache of a caching name server is controlled by the 
347 Time To Live (TTL) field associated with each resource record.
348 </p>
349 <div class="sect3" lang="en">
350 <div class="titlepage"><div><div><h4 class="title">
351 <a name="id2565255"></a>Forwarding</h4></div></div></div>
352 <p>Even a caching name server does not necessarily perform
353 the complete recursive lookup itself.  Instead, it can
354 <span class="emphasis"><em>forward</em></span> some or all of the queries
355 that it cannot satisfy from its cache to another caching name server,
356 commonly referred to as a <span class="emphasis"><em>forwarder</em></span>.
357 </p>
358 <p>There may be one or more forwarders,
359 and they are queried in turn until the list is exhausted or an answer
360 is found. Forwarders are typically used when you do not
361 wish all the servers at a given site to interact directly with the rest of
362 the Internet servers. A typical scenario would involve a number
363 of internal <acronym class="acronym">DNS</acronym> servers and an Internet firewall. Servers unable
364 to pass packets through the firewall would forward to the server
365 that can do it, and that server would query the Internet <acronym class="acronym">DNS</acronym> servers
366 on the internal server's behalf. An added benefit of using the forwarding
367 feature is that the central machine develops a much more complete
368 cache of information that all the clients can take advantage
369 of.</p>
370 </div>
371 </div>
372 <div class="sect2" lang="en">
373 <div class="titlepage"><div><div><h3 class="title">
374 <a name="id2565281"></a>Name Servers in Multiple Roles</h3></div></div></div>
375 <p>The <acronym class="acronym">BIND</acronym> name server can simultaneously act as
376 a master for some zones, a slave for other zones, and as a caching
377 (recursive) server for a set of local clients.</p>
378 <p>However, since the functions of authoritative name service
379 and caching/recursive name service are logically separate, it is
380 often advantageous to run them on separate server machines.
381
382 A server that only provides authoritative name service
383 (an <span class="emphasis"><em>authoritative-only</em></span> server) can run with
384 recursion disabled, improving reliability and security.
385
386 A server that is not authoritative for any zones and only provides
387 recursive service to local
388 clients (a <span class="emphasis"><em>caching-only</em></span> server)
389 does not need to be reachable from the Internet at large and can
390 be placed inside a firewall.</p>
391 </div>
392 </div>
393 </div>
394 <div class="navfooter">
395 <hr>
396 <table width="100%" summary="Navigation footer">
397 <tr>
398 <td width="40%" align="left">
399 <a accesskey="p" href="Bv9ARM.html">Prev</a> </td>
400 <td width="20%" align="center"> </td>
401 <td width="40%" align="right"> <a accesskey="n" href="Bv9ARM.ch02.html">Next</a>
402 </td>
403 </tr>
404 <tr>
405 <td width="40%" align="left" valign="top">BIND 9 Administrator Reference Manual </td>
406 <td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
407 <td width="40%" align="right" valign="top"> Chapter 2. <acronym class="acronym">BIND</acronym> Resource Requirements</td>
408 </tr>
409 </table>
410 </div>
411 </body>
412 </html>