]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/blob - contrib/bind9/FAQ.xml
MFC 202961:
[FreeBSD/stable/8.git] / contrib / bind9 / FAQ.xml
1 <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2        "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" []>
3 <!--
4  - Copyright (C) 2004-2009  Internet Systems Consortium, Inc. ("ISC")
5  - Copyright (C) 2000-2003  Internet Software Consortium.
6  -
7  - Permission to use, copy, modify, and/or distribute this software for any
8  - purpose with or without fee is hereby granted, provided that the above
9  - copyright notice and this permission notice appear in all copies.
10  -
11  - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
12  - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13  - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
14  - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15  - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
16  - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  - PERFORMANCE OF THIS SOFTWARE.
18 -->
19
20 <!-- $Id: FAQ.xml,v 1.46.56.4.12.1 2009/12/31 23:17:56 tbox Exp $ -->
21
22 <article class="faq">
23   <title>Frequently Asked Questions about BIND 9</title>
24   <articleinfo>
25     <copyright>
26       <year>2004</year>
27       <year>2005</year>
28       <year>2006</year>
29       <year>2007</year>
30       <year>2008</year>
31       <year>2009</year>
32       <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
33     </copyright>
34     <copyright>
35       <year>2000</year>
36       <year>2001</year>
37       <year>2002</year>
38       <year>2003</year>
39       <holder>Internet Software Consortium.</holder>
40     </copyright>
41   </articleinfo>
42   <qandaset defaultlabel='qanda'>
43           
44     <qandadiv><title>Compilation and Installation Questions</title>       
45     
46     <qandaentry>
47       <question>
48         <para>
49           I'm trying to compile BIND 9, and "make" is failing due to
50           files not being found.  Why?
51         </para>
52       </question>
53       <answer>
54         <para>
55           Using a parallel or distributed "make" to build BIND 9 is
56           not supported, and doesn't work.  If you are using one of
57           these, use normal make or gmake instead.
58         </para>
59       </answer>
60     </qandaentry>
61     
62     <qandaentry>
63       <question>
64         <para>
65           Isn't "make install"  supposed to generate a default named.conf?
66         </para>
67       </question>
68       <answer>
69         <para>
70           Short Answer: No. 
71         </para>
72         <para>
73           Long Answer: There really isn't a default configuration which fits
74           any site perfectly.  There are lots of decisions that need to
75           be made and there is no consensus on what the defaults should be.
76           For example FreeBSD uses /etc/namedb as the location where the
77           configuration files for named are stored.  Others use /var/named.
78         </para>
79         <para>
80           What addresses to listen on?  For a laptop on the move a lot
81           you may only want to listen on the loop back interfaces.
82         </para>
83         <para>
84           Who do you offer recursive service to?  Is there are firewall
85           to consider?  If so is it stateless or stateful.  Are you
86           directly on the Internet?  Are you on a private network? Are
87           you on a NAT'd network? The answers
88           to all these questions change how you configure even a
89           caching name server.
90         </para>
91       </answer>
92     </qandaentry>
93     
94     </qandadiv> <!-- Compilation and Installation Questions -->
95             
96     <qandadiv><title>Configuration and Setup Questions</title>
97
98     <qandaentry>
99       <!-- configuration, log -->
100       <question>
101         <para>
102           Why does named log the warning message <quote>no TTL specified -
103           using SOA MINTTL instead</quote>?
104         </para>
105       </question>
106       <answer>
107         <para>
108           Your zone file is illegal according to RFC1035.  It must either
109           have a line like:
110         </para>
111         <informalexample>
112           <programlisting>
113 $TTL 86400</programlisting>
114         </informalexample>
115         <para>
116           at the beginning, or the first record in it must have a TTL field,
117           like the "84600" in this example:
118         </para>
119         <informalexample>
120           <programlisting>
121 example.com. 86400 IN SOA ns hostmaster ( 1 3600 1800 1814400 3600 )</programlisting>
122         </informalexample>
123       </answer>
124     </qandaentry>
125     
126     <qandaentry>
127       <!-- configuration -->
128       <question>
129         <para>
130           Why do I get errors like <quote>dns_zone_load: zone foo/IN: loading
131           master file bar: ran out of space</quote>?
132         </para>
133       </question>
134       <answer>
135         <para>
136         This is often caused by TXT records with missing close
137         quotes.  Check that all TXT records containing quoted strings
138         have both open and close quotes.
139         </para>
140       </answer>
141     </qandaentry>
142
143     <qandaentry>
144       <!-- security -->
145       <question>
146         <para>
147           How do I restrict people from looking up the server version?
148         </para>
149       </question>
150       <answer>
151         <para>
152           Put a "version" option containing something other than the
153           real version in the "options" section of named.conf.  Note
154           doing this will not prevent attacks and may impede people
155           trying to diagnose problems with your server.  Also it is
156           possible to "fingerprint" nameservers to determine their
157           version.
158         </para>
159       </answer>
160     </qandaentry>
161
162     <qandaentry>
163       <!-- security -->
164       <question>
165         <para>
166           How do I restrict only remote users from looking up the
167           server version?
168         </para>
169       </question>
170       <answer>
171         <para>
172           The following view statement will intercept lookups as the
173           internal view that holds the version information will be
174           matched last.  The caveats of the previous answer still
175           apply, of course.
176         </para>
177         <informalexample>
178           <programlisting>
179 view "chaos" chaos {
180         match-clients { &lt;those to be refused&gt;; };
181         allow-query { none; };
182         zone "." {
183                 type hint;
184                 file "/dev/null";  // or any empty file
185         };
186 };</programlisting>
187         </informalexample>
188       </answer>
189     </qandaentry>
190
191     <qandaentry>
192       <!-- configuration -->
193       <question>
194         <para>
195           What do <quote>no source of entropy found</quote> or <quote>could not
196           open entropy source foo</quote> mean?
197         </para>
198       </question>
199       <answer>
200         <para>
201           The server requires a source of entropy to perform certain
202           operations, mostly DNSSEC related.  These messages indicate
203           that you have no source of entropy.  On systems with
204           /dev/random or an equivalent, it is used by default.  A
205           source of entropy can also be defined using the random-device
206           option in named.conf.
207         </para>
208       </answer>
209     </qandaentry>
210
211     <qandaentry>
212       <!-- configuration -->
213       <question>
214         <para>
215           I'm trying to use TSIG to authenticate dynamic updates or
216           zone transfers.  I'm sure I have the keys set up correctly,
217           but the server is rejecting the TSIG.  Why?
218         </para>
219       </question>
220       <answer>
221         <para>
222           This may be a clock skew problem.  Check that the the clocks
223           on the client and server are properly synchronised (e.g.,
224           using ntp).
225         </para>
226       </answer>
227     </qandaentry>
228
229     <qandaentry>
230       <question>
231         <para>
232           I see a log message like the following.  Why?
233         </para>
234         <para>
235           couldn't open pid file '/var/run/named.pid': Permission denied
236         </para>
237       </question>
238       <answer>
239         <para>
240           You are most likely running named as a non-root user, and
241           that user does not have permission to write in /var/run.
242           The common ways of fixing this are to create a /var/run/named
243           directory owned by the named user and set pid-file to
244           "/var/run/named/named.pid", or set pid-file to "named.pid",
245           which will put the file in the directory specified by the
246           directory option (which, in this case, must be writable by
247           the named user).
248         </para>
249       </answer>
250     </qandaentry>
251     
252     <qandaentry>
253       <question>
254         <para>
255           I can query the nameserver from the nameserver but not from other
256           machines.  Why?
257         </para>
258       </question>
259       <answer>
260         <para>
261           This is usually the result of the firewall configuration stopping
262           the queries and / or the replies.
263         </para>
264       </answer>
265     </qandaentry>
266     
267     <qandaentry>
268       <question>
269         <para>
270           How can I make a server a slave for both an internal and
271           an external view at the same time?  When I tried, both views
272           on the slave were transferred from the same view on the master.
273         </para>
274       </question>
275       <answer>
276         <para>
277           You will need to give the master and slave multiple IP
278           addresses and use those to make sure you reach the correct
279           view on the other machine.
280         </para>
281         <informalexample>
282           <programlisting>
283 Master: 10.0.1.1 (internal), 10.0.1.2 (external, IP alias)
284     internal:
285         match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
286                 notify-source 10.0.1.1;
287                 transfer-source 10.0.1.1;
288                 query-source address 10.0.1.1;
289     external:
290         match-clients { any; };
291         recursion no;   // don't offer recursion to the world
292         notify-source 10.0.1.2;
293         transfer-source 10.0.1.2;
294         query-source address 10.0.1.2;
295
296 Slave: 10.0.1.3 (internal), 10.0.1.4 (external, IP alias)
297     internal:
298         match-clients { !10.0.1.2; !10.0.1.4; 10.0.1/24; };
299         notify-source 10.0.1.3;
300         transfer-source 10.0.1.3;
301         query-source address 10.0.1.3;
302    external:
303         match-clients { any; };
304         recursion no;   // don't offer recursion to the world
305         notify-source 10.0.1.4;
306         transfer-source 10.0.1.4;
307         query-source address 10.0.1.4;</programlisting>
308         </informalexample>
309         <para>
310           You put the external address on the alias so that all the other
311           dns clients on these boxes see the internal view by default.
312         </para>
313       </answer>
314       <answer>
315         <para>
316           BIND 9.3 and later: Use TSIG to select the appropriate view.
317         </para>
318         <informalexample>
319           <programlisting>
320 Master 10.0.1.1:
321         key "external" {
322                 algorithm hmac-sha256;
323                 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
324         };
325         view "internal" {
326                 match-clients { !key external; // reject message ment for the
327                                                // external view.
328                                 10.0.1/24; };  // accept from these addresses.
329                 ...
330         };
331         view "external" {
332                 match-clients { key external; any; };
333                 server 10.0.1.2 { keys external; };  // tag messages from the
334                                                      // external view to the
335                                                      // other servers for the
336                                                      // view.
337                 recursion no;
338                 ...
339         };
340
341 Slave 10.0.1.2:
342         key "external" {
343                 algorithm hmac-sha256;
344                 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
345         };
346         view "internal" {
347                 match-clients { !key external; 10.0.1/24; };
348                 ...
349         };
350         view "external" {
351                 match-clients { key external; any; };
352                 server 10.0.1.1 { keys external; };
353                 recursion no;
354                 ...
355         };</programlisting>
356         </informalexample>
357       </answer>
358     </qandaentry>
359     
360     <qandaentry>
361       <question>
362         <para>
363           I get error messages like <quote>multiple RRs of singleton type</quote>
364           and <quote>CNAME and other data</quote> when transferring a zone.  What
365           does this mean?
366         </para>
367       </question>
368       <answer>
369         <para>
370           These indicate a malformed master zone.  You can identify
371           the exact records involved by transferring the zone using
372           dig then running named-checkzone on it.
373         </para>
374         <informalexample>
375           <programlisting>
376 dig axfr example.com @master-server &gt; tmp
377 named-checkzone example.com tmp</programlisting>
378         </informalexample>
379         <para>
380           A CNAME record cannot exist with the same name as another record
381           except for the DNSSEC records which prove its existence (NSEC).
382         </para>
383         <para>
384           RFC 1034, Section 3.6.2: <quote>If a CNAME RR is present at a node,
385           no other data should be present; this ensures that the data for a
386           canonical name and its aliases cannot be different.  This rule also
387           insures that a cached CNAME can be used without checking with an
388           authoritative server for other RR types.</quote>
389         </para>
390       </answer>
391     </qandaentry>
392     
393     <qandaentry>
394       <question>
395         <para>
396           I get error messages like <quote>named.conf:99: unexpected end
397           of input</quote> where 99 is the last line of named.conf.
398         </para>
399       </question>
400       <answer>
401         <para>
402           There are unbalanced quotes in named.conf.
403         </para>
404       </answer>
405       <answer>
406         <para>
407           Some text editors (notepad and wordpad) fail to put a line
408           title indication (e.g. CR/LF) on the last line of a
409           text file.  This can be fixed by "adding" a blank line to
410           the end of the file.  Named expects to see EOF immediately
411           after EOL and treats text files where this is not met as
412           truncated.
413         </para>
414       </answer>
415     </qandaentry>
416     
417     <qandaentry>
418       <question>
419         <para>
420           How do I share a dynamic zone between multiple views?
421         </para>
422       </question>
423       <answer>
424         <para>
425           You choose one view to be master and the second a slave and
426           transfer the zone between views.
427         </para>
428         <informalexample>
429           <programlisting>
430 Master 10.0.1.1:
431         key "external" {
432                 algorithm hmac-sha256;
433                 secret "xxxxxxxxxxxxxxxxxxxxxxxx";
434         };
435
436         key "mykey" {
437                 algorithm hmac-sha256;
438                 secret "yyyyyyyyyyyyyyyyyyyyyyyy";
439         };
440
441         view "internal" {
442                 match-clients { !key external; 10.0.1/24; };
443                 server 10.0.1.1 {
444                         /* Deliver notify messages to external view. */
445                         keys { external; };
446                 };
447                 zone "example.com" {
448                         type master;
449                         file "internal/example.db";
450                         allow-update { key mykey; };
451                         also-notify { 10.0.1.1; };
452                 };
453         };
454
455         view "external" {
456                 match-clients { key external; any; };
457                 zone "example.com" {
458                         type slave;
459                         file "external/example.db";
460                         masters { 10.0.1.1; };
461                         transfer-source 10.0.1.1;
462                         // allow-update-forwarding { any; };
463                         // allow-notify { ... };
464                 };
465         };</programlisting>
466         </informalexample>
467       </answer>
468     </qandaentry>
469
470     <qandaentry>
471       <question>
472         <para>
473           I get a error message like <quote>zone wireless.ietf56.ietf.org/IN:
474           loading master file primaries/wireless.ietf56.ietf.org: no
475           owner</quote>.
476         </para>
477       </question>
478       <answer>
479         <para>
480           This error is produced when a line in the master file
481           contains leading white space (tab/space) but the is no
482           current record owner name to inherit the name from.  Usually
483           this is the result of putting white space before a comment,
484           forgetting the "@" for the SOA record, or indenting the master
485           file.
486         </para>
487       </answer>
488     </qandaentry>
489
490     <qandaentry>
491       <question>
492         <para>
493           Why are my logs in GMT (UTC).
494         </para>
495       </question>
496       <answer>
497         <para>
498           You are running chrooted (-t) and have not supplied local timezone
499           information in the chroot area.
500         </para>
501         <simplelist>
502           <member>FreeBSD: /etc/localtime</member>
503           <member>Solaris: /etc/TIMEZONE and /usr/share/lib/zoneinfo</member>
504           <member>OSF: /etc/zoneinfo/localtime</member>
505           </simplelist>
506         <para>
507           See also tzset(3) and zic(8).
508         </para>
509       </answer>
510     </qandaentry>
511     
512     <qandaentry>
513       <question>
514         <para>
515           I get <quote>rndc: connect failed: connection refused</quote> when
516           I try to run rndc.
517         </para>
518       </question>
519       <answer>
520         <para>
521           This is usually a configuration error.
522         </para>
523         <para>
524           First ensure that named is running and no errors are being
525           reported at startup (/var/log/messages or equivalent).
526           Running "named -g &lt;usual arguments&gt;" from a title
527           can help at this point.
528         </para>
529         <para>
530           Secondly ensure that named is configured to use rndc either
531           by "rndc-confgen -a", rndc-confgen or manually.  The
532           Administrators Reference manual has details on how to do
533           this.
534         </para>
535         <para>
536           Old versions of rndc-confgen used localhost rather than
537           127.0.0.1 in /etc/rndc.conf for the default server.  Update
538           /etc/rndc.conf if necessary so that the default server
539           listed in /etc/rndc.conf matches the addresses used in
540           named.conf.  "localhost" has two address (127.0.0.1 and
541           ::1).
542         </para>
543         <para>
544           If you use "rndc-confgen -a" and named is running with -t or -u
545           ensure that /etc/rndc.conf has the correct ownership and that
546           a copy is in the chroot area.  You can do this by re-running
547           "rndc-confgen -a" with appropriate -t and -u arguments.
548         </para>
549       </answer>
550     </qandaentry>
551     
552     <qandaentry>
553       <question>
554         <para>
555           I get <quote>transfer of 'example.net/IN' from 192.168.4.12#53:
556           failed while receiving responses: permission denied</quote> error
557           messages.
558         </para>
559       </question>
560       <answer>
561         <para>
562           These indicate a filesystem permission error preventing
563           named creating / renaming the temporary file.  These will
564           usually also have other associated error messages like
565         </para>
566         <informalexample>
567           <programlisting>
568 "dumping master file: sl/tmp-XXXX5il3sQ: open: permission denied"</programlisting>
569         </informalexample>
570         <para>
571           Named needs write permission on the directory containing
572           the file.  Named writes the new cache file to a temporary
573           file then renames it to the name specified in named.conf
574           to ensure that the contents are always complete.  This is
575           to prevent named loading a partial zone in the event of
576           power failure or similar interrupting the write of the
577           master file.
578         </para>
579         <para>
580           Note file names are relative to the directory specified in
581           options and any chroot directory  ([&lt;chroot
582           dir&gt;/][&lt;options dir&gt;]).
583         </para>
584         <informalexample>
585           <para>
586             If named is invoked as "named -t /chroot/DNS" with
587             the following named.conf then "/chroot/DNS/var/named/sl"
588             needs to be writable by the user named is running as.
589           </para>
590           <programlisting>
591 options {
592         directory "/var/named";
593 };
594
595 zone "example.net" {
596         type slave;
597         file "sl/example.net";
598         masters { 192.168.4.12; };
599 };</programlisting>
600         </informalexample>
601       </answer>
602     </qandaentry>
603     
604     <qandaentry>
605       <question>
606         <para>
607           I want to forward all DNS queries from my caching nameserver to
608           another server. But there are some domains which have to be
609           served locally, via rbldnsd.
610         </para>
611         <para>
612           How do I achieve this ?
613         </para>
614       </question>
615       <answer>
616         <programlisting>
617 options {
618         forward only;
619         forwarders { &lt;ip.of.primary.nameserver&gt;; };
620 };
621
622 zone "sbl-xbl.spamhaus.org" {
623         type forward; forward only;
624         forwarders { &lt;ip.of.rbldns.server&gt; port 530; };
625 };
626
627 zone "list.dsbl.org" {
628         type forward; forward only;
629         forwarders { &lt;ip.of.rbldns.server&gt; port 530; };
630 };
631         </programlisting>
632       </answer>
633     </qandaentry>
634
635     <qandaentry>
636       <question>
637         <para>
638           Can you help me understand how BIND 9 uses memory to store
639           DNS zones?
640         </para>
641         <para>
642           Some times it seems to take several times the amount of
643           memory it needs to store the zone.
644         </para>
645       </question>
646       <answer>
647         <para>
648           When reloading a zone named my have multiple copies of
649           the zone in memory at one time.  The zone it is serving
650           and the one it is loading.  If reloads are ultra fast it
651           can have more still.
652         </para>
653         <para>
654           e.g.  Ones that are transferring out, the one that it is
655           serving and the one that is loading.
656         </para>
657         <para>
658           BIND 8 destroyed the zone before loading and also killed
659           off outgoing transfers of the zone.
660         </para>
661         <para>
662           The new strategy allows slaves to get copies of the new
663           zone regardless of how often the master is loaded compared
664           to the transfer time.  The slave might skip some intermediate
665           versions but the transfers will complete and it will keep
666           reasonably in sync with the master.
667         </para>
668         <para>
669           The new strategy also allows the master to recover from
670           syntax and other errors in the master file as it still
671           has an in-core copy of the old contents.
672         </para>
673       </answer>
674     </qandaentry>
675
676     <qandaentry>
677       <question>
678         <para>
679           I want to use IPv6 locally but I don't have a external IPv6
680           connection.  External lookups are slow.
681         </para>
682       </question>
683       <answer>
684         <para>
685           You can use server clauses to stop named making external lookups
686           over IPv6.
687         </para>
688         <programlisting>
689 server fd81:ec6c:bd62::/48 { bogus no; }; // site ULA prefix
690 server ::/0 { bogus yes; };
691 </programlisting>
692       </answer>
693     </qandaentry>
694     
695     </qandadiv> <!-- Configuration and Setup Questions -->
696     
697     <qandadiv><title>Operations Questions</title>
698
699     <qandaentry>
700       <question>
701         <para>
702           How to change the nameservers for a zone?
703         </para>
704       </question>
705       <answer>
706         <para>
707           Step 1: Ensure all nameservers, new and old, are serving the
708           same zone content.
709         </para>
710         <para>
711           Step 2: Work out the maximum TTL of the NS RRset in the parent and child
712           zones.  This is the time it will take caches to be clear of a
713           particular version of the NS RRset.
714           If you are just removing nameservers you can skip to Step 6.
715         </para>
716         <para>
717           Step 3: Add new nameservers to the NS RRset for the zone and
718           wait until all the servers for the zone are answering with this
719           new NS RRset.
720         </para>
721         <para>
722           Step 4: Inform the parent zone of the new NS RRset then wait for all the
723           parent servers to be answering with the new NS RRset.
724         </para>
725         <para>
726           Step 5: Wait for cache to be clear of the old NS RRset.
727           See Step 2 for how long.
728           If you are just adding nameservers you are done.
729         </para>
730         <para>
731           Step 6: Remove any old nameservers from the zones NS RRset and
732           wait for all the servers for the zone to be serving the new NS RRset.
733         </para>
734         <para>
735           Step 7: Inform the parent zone of the new NS RRset then wait for all the
736           parent servers to be answering with the new NS RRset.
737         </para>
738         <para>
739           Step 8: Wait for cache to be clear of the old NS RRset.
740           See Step 2 for how long.
741         </para>
742         <para>
743           Step 9: Turn off the old nameservers or remove the zone entry from
744           the configuration of the old nameservers.
745         </para>
746         <para>
747           Step 10: Increment the serial number and wait for the change to
748           be visible in all nameservers for the zone.  This ensures that
749           zone transfers are still working after the old servers are
750           decommissioned.
751         </para>
752         <para>
753           Note: the above procedure is designed to be transparent
754           to dns clients.  Decommissioning the old servers too early
755           will result in some clients not being able to look up
756           answers in the zone.
757         </para>
758         <para>
759           Note: while it is possible to run the addition and removal
760           stages together it is not recommended.
761         </para>
762       </answer>
763     </qandaentry>
764
765     </qandadiv> <!-- Operations Questions -->
766
767     <qandadiv><title>General Questions</title>
768             
769     <qandaentry>
770       <question>
771         <para>
772           I keep getting log messages like the following.  Why?
773         </para>
774         <para>
775           Dec  4 23:47:59 client 10.0.0.1#1355: updating zone
776           'example.com/IN': update failed: 'RRset exists (value
777           dependent)' prerequisite not satisfied (NXRRSET)
778         </para>
779       </question>
780       <answer>
781         <para>
782           DNS updates allow the update request to test to see if
783           certain conditions are met prior to proceeding with the
784           update.  The message above is saying that conditions were
785           not met and the update is not proceeding.  See doc/rfc/rfc2136.txt
786           for more details on prerequisites.
787         </para>
788       </answer>
789     </qandaentry>
790
791     <qandaentry>
792       <question>
793         <para>
794           I keep getting log messages like the following.  Why?
795         </para>
796         <para>
797           Jun 21 12:00:00.000 client 10.0.0.1#1234: update denied
798         </para>
799       </question>
800       <answer>
801         <para>
802           Someone is trying to update your DNS data using the RFC2136
803           Dynamic Update protocol.  Windows 2000 machines have a habit
804           of sending dynamic update requests to DNS servers without
805           being specifically configured to do so.  If the update
806           requests are coming from a Windows 2000 machine, see
807           <ulink
808            url="http://support.microsoft.com/support/kb/articles/q246/8/04.asp">
809   &lt;http://support.microsoft.com/support/kb/articles/q246/8/04.asp&gt;</ulink>
810           for information about how to turn them off.
811         </para>
812       </answer>
813     </qandaentry>
814             
815     <qandaentry>
816       <question>
817         <para>
818           When I do a "dig . ns", many of the A records for the root
819           servers are missing.  Why?
820         </para>
821       </question>
822       <answer>
823         <para>
824           This is normal and harmless.  It is a somewhat confusing
825           side effect of the way BIND 9 does RFC2181 trust ranking
826           and of the efforts BIND 9 makes to avoid promoting glue
827           into answers.
828         </para>
829         <para>
830          When BIND 9 first starts up and primes its cache, it receives
831          the root server addresses as additional data in an authoritative
832          response from a root server, and these records are eligible
833          for inclusion as additional data in responses.  Subsequently
834          it receives a subset of the root server addresses as
835          additional data in a non-authoritative (referral) response
836          from a root server.  This causes the addresses to now be
837          considered non-authoritative (glue) data, which is not
838          eligible for inclusion in responses.
839         </para>
840         <para>
841          The server does have a complete set of root server addresses
842          cached at all times, it just may not include all of them
843          as additional data, depending on whether they were last
844          received as answers or as glue.  You can always look up the
845          addresses with explicit queries like "dig a.root-servers.net A".
846         </para>
847       </answer>
848     </qandaentry>
849     
850     <qandaentry>
851       <question>
852         <para>
853           Why don't my zones reload when I do an "rndc reload" or SIGHUP?
854         </para>
855       </question>
856       <answer>
857         <para>
858           A zone can be updated either by editing zone files and
859           reloading the server or by dynamic update, but not both.
860           If you have enabled dynamic update for a zone using the
861           "allow-update" option, you are not supposed to edit the
862           zone file by hand, and the server will not attempt to reload
863           it.
864         </para>
865       </answer>
866     </qandaentry>
867     
868     <qandaentry>
869       <question>
870         <para>
871           Why is named listening on UDP port other than 53?
872         </para>
873       </question>
874       <answer>
875         <para>
876           Named uses a system selected port to make queries of other
877           nameservers.  This behaviour can be overridden by using
878           query-source to lock down the port and/or address.  See
879           also notify-source and transfer-source.
880         </para>
881       </answer>
882     </qandaentry>
883     
884     <qandaentry>
885       <question>
886         <para>
887           I get warning messages like <quote>zone example.com/IN: refresh:
888           failure trying master 1.2.3.4#53: timed out</quote>.
889         </para>
890       </question>
891       <answer>
892         <para>
893         Check that you can make UDP queries from the slave to the master
894         </para>
895         <informalexample>
896           <programlisting>
897 dig +norec example.com soa @1.2.3.4</programlisting>
898         </informalexample>
899         <para>
900           You could be generating queries faster than the slave can
901           cope with.  Lower the serial query rate.
902         </para>
903         <informalexample>
904           <programlisting>
905 serial-query-rate 5; // default 20</programlisting>
906         </informalexample>
907       </answer>
908     </qandaentry>
909
910     <qandaentry>            
911       <question>
912         <para>
913           I don't get RRSIG's returned when I use "dig +dnssec".
914         </para>
915       </question>
916       <answer>
917         <para>
918           You need to ensure DNSSEC is enabled (dnssec-enable yes;).
919         </para>
920       </answer>
921     </qandaentry>
922     
923     <qandaentry>
924       <question>
925         <para>
926           Can a NS record refer to a CNAME.
927         </para>
928       </question>
929       <answer>
930         <para>
931           No.  The rules for glue (copies of the *address* records
932           in the parent zones) and additional section processing do
933           not allow it to work.
934         </para>
935         <para>
936           You would have to add both the CNAME and address records
937           (A/AAAA) as glue to the parent zone and have CNAMEs be
938           followed when doing additional section processing to make
939           it work.  No nameserver implementation supports either of
940           these requirements.
941         </para>
942       </answer>
943     </qandaentry>
944
945     <qandaentry>
946       <question>
947         <para>
948           What does <quote>RFC 1918 response from Internet for
949           0.0.0.10.IN-ADDR.ARPA</quote> mean?
950         </para>
951       </question>
952       <answer>
953         <para>
954           If the IN-ADDR.ARPA name covered refers to a internal address
955           space you are using then you have failed to follow RFC 1918
956           usage rules and are leaking queries to the Internet.  You
957           should establish your own zones for these addresses to prevent
958           you querying the Internet's name servers for these addresses.
959           Please see <ulink url="http://as112.net/">&lt;http://as112.net/&gt;</ulink>
960           for details of the problems you are causing and the counter
961           measures that have had to be deployed.
962         </para>
963         <para>
964           If you are not using these private addresses then a client
965           has queried for them.  You can just ignore the messages,
966           get the offending client to stop sending you these messages
967           as they are most probably leaking them or setup your own zones
968           empty zones to serve answers to these queries.
969         </para>
970         <informalexample>
971           <programlisting>
972 zone "10.IN-ADDR.ARPA" {
973         type master;
974         file "empty";
975 };
976
977 zone "16.172.IN-ADDR.ARPA" {
978         type master;
979         file "empty";
980 };
981
982 ...
983
984 zone "31.172.IN-ADDR.ARPA" {
985         type master;
986         file "empty";
987 };
988
989 zone "168.192.IN-ADDR.ARPA" {
990         type master;
991         file "empty";
992 };
993
994 empty:
995 @ 10800 IN SOA &lt;name-of-server&gt;. &lt;contact-email&gt;. (
996                1 3600 1200 604800 10800 )
997 @ 10800 IN NS &lt;name-of-server&gt;.</programlisting>
998         </informalexample>
999         <para>
1000         <note>
1001           Future versions of named are likely to do this automatically.
1002         </note>
1003         </para>
1004       </answer>
1005     </qandaentry>
1006     
1007     <qandaentry>
1008       <question>
1009         <para>
1010           Will named be affected by the 2007 changes to daylight savings
1011           rules in the US.
1012         </para>
1013       </question>
1014       <answer>
1015         <para>
1016           No, so long as the machines internal clock (as reported
1017           by "date -u") remains at UTC.  The only visible change
1018           if you fail to upgrade your OS, if you are in a affected
1019           area, will be that log messages will be a hour out during
1020           the period where the old rules do not match the new rules.
1021         </para>
1022         <para>
1023           For most OS's this change just means that you need to
1024           update the conversion rules from UTC to local time.
1025           Normally this involves updating a file in /etc (which
1026           sets the default timezone for the machine) and possibly
1027           a directory which has all the conversion rules for the
1028           world (e.g. /usr/share/zoneinfo).  When updating the OS
1029           do not forget to update any chroot areas as well.
1030           See your OS's documentation for more details.
1031         </para>
1032         <para>
1033           The local timezone conversion rules can also be done on
1034           a individual basis by setting the TZ environment variable
1035           appropriately.  See your OS's documentation for more
1036           details.
1037         </para>
1038       </answer>
1039     </qandaentry>
1040
1041     <qandaentry>
1042       <question>
1043         <para>
1044           Is there a bugzilla (or other tool) database that mere
1045           mortals can have (read-only) access to for bind?
1046         </para>
1047       </question>
1048       <answer>
1049         <para>
1050           No.  The BIND 9 bug database is kept closed for a number
1051           of reasons.  These include, but are not limited to, that
1052           the database contains proprietory information from people
1053           reporting bugs.  The database has in the past and may in
1054           future contain unfixed bugs which are capable of bringing
1055           down most of the Internet's DNS infrastructure.
1056         </para>
1057         <para>
1058           The release pages for each version contain up to date
1059           lists of bugs that have been fixed post release.  That
1060           is as close as we can get to providing a bug database.
1061         </para>
1062       </answer>
1063     </qandaentry>
1064
1065     <qandaentry>
1066       <question>
1067         <para>
1068           Why do queries for NSEC3 records fail to return the NSEC3 record?
1069         </para>
1070       </question>
1071       <answer>
1072         <para>
1073           NSEC3 records are strictly meta data and can only be
1074           returned in the authority section.  This is done so that
1075           signing the zone using NSEC3 records does not bring names
1076           into existence that do not exist in the unsigned version
1077           of the zone.
1078         </para>
1079       </answer>
1080     </qandaentry>
1081
1082     </qandadiv> <!-- General Questions -->
1083     
1084     <qandadiv><title>Operating-System Specific Questions</title>
1085             
1086     <qandadiv><title>HPUX</title>
1087
1088     <qandaentry>
1089       <question>
1090         <para>I get the following error trying to configure BIND:
1091 <programlisting>checking if unistd.h or sys/types.h defines fd_set... no
1092 configure: error: need either working unistd.h or sys/select.h</programlisting>
1093         </para>
1094       </question>
1095       <answer>
1096         <para>
1097           You have attempted to configure BIND with the bundled C compiler.
1098           This compiler does not meet the minimum compiler requirements to
1099           for building BIND.  You need to install a ANSI C compiler and / or
1100           teach configure how to find the ANSI C compiler.  The later can
1101           be done by adjusting the PATH environment variable and / or
1102           specifying the compiler via CC.
1103         </para>
1104         <informalexample>
1105           <programlisting>./configure CC=&lt;compiler&gt; ...</programlisting>
1106         </informalexample>
1107       </answer>
1108     </qandaentry>
1109
1110     </qandadiv> <!-- HPUX -->
1111
1112     <qandadiv><title>Linux</title>
1113             
1114     <qandaentry>
1115       <question> 
1116         <para>
1117           Why do I get the following errors:
1118 <programlisting>general: errno2result.c:109: unexpected error:
1119 general: unable to convert errno to isc_result: 14: Bad address
1120 client: UDP client handler shutting down due to fatal receive error: unexpected error</programlisting>
1121         </para>
1122       </question>
1123       <answer>
1124         <para>
1125           This is the result of a Linux kernel bug.
1126         </para>
1127         <para>
1128           See:
1129           <ulink url="http://marc.theaimsgroup.com/?l=linux-netdev&amp;m=113081708031466&amp;w=2">&lt;http://marc.theaimsgroup.com/?l=linux-netdev&amp;m=113081708031466&amp;w=2&gt;</ulink>
1130         </para>
1131       </answer>
1132     </qandaentry>
1133
1134     <qandaentry>
1135       <question>
1136         <para>
1137           Why does named lock up when it attempts to connect over IPSEC tunnels?
1138         </para>
1139       </question>
1140       <answer>
1141         <para>
1142           This is due to a kernel bug where the fact that a socket is marked
1143           non-blocking is ignored.  It is reported that setting
1144           xfrm_larval_drop to 1 helps but this may have negative side effects.
1145           See:
1146 <ulink url="https://bugzilla.redhat.com/show_bug.cgi?id=427629">&lt;https://bugzilla.redhat.com/show_bug.cgi?id=427629&gt;</ulink>
1147           and
1148 <ulink url="http://lkml.org/lkml/2007/12/4/260">&lt;http://lkml.org/lkml/2007/12/4/260&gt;</ulink>.
1149         </para>
1150         <para>
1151         xfrm_larval_drop can be set to 1 by the following procedure:
1152 <programlisting>
1153 echo "1" &gt; proc/sys/net/core/xfrm_larval_drop</programlisting>
1154         </para>
1155       </answer>
1156     </qandaentry>
1157
1158     <qandaentry>
1159       <question>
1160         <para>
1161           Why do I see 5 (or more) copies of named on Linux?
1162         </para>
1163       </question>
1164       <answer>
1165         <para>
1166           Linux threads each show up as a process under ps.  The
1167           approximate number of threads running is n+4, where n is
1168           the number of CPUs.  Note that the amount of memory used
1169           is not cumulative; if each process is using 10M of memory,
1170           only a total of 10M is used.
1171         </para>
1172         <para>
1173           Newer versions of Linux's ps command hide the individual threads
1174           and require -L to display them.
1175         </para>
1176       </answer>
1177     </qandaentry>
1178     
1179     <qandaentry>
1180       <question>
1181         <para>
1182           Why does BIND 9 log <quote>permission denied</quote> errors accessing
1183           its configuration files or zones on my Linux system even
1184           though it is running as root?
1185         </para>
1186       </question>
1187       <answer>
1188         <para>
1189           On Linux, BIND 9 drops most of its root privileges on
1190           startup.  This including the privilege to open files owned
1191           by other users.  Therefore, if the server is running as
1192           root, the configuration files and zone files should also
1193           be owned by root.
1194         </para>
1195       </answer>
1196     </qandaentry>
1197     
1198     <qandaentry>
1199       <question>
1200         <para>
1201           I get the error message <quote>named: capset failed: Operation
1202           not permitted</quote> when starting named.
1203         </para>
1204       </question>
1205       <answer>
1206         <para>
1207           The capability module, part of "Linux Security Modules/LSM",
1208           has not been loaded into the kernel.  See insmod(8), modprobe(8).
1209         </para>
1210         <para>
1211           The relevant modules can be loaded by running:
1212 <programlisting>
1213 modprobe commoncap
1214 modprobe capability</programlisting>
1215         </para>
1216       </answer>
1217     </qandaentry>
1218     
1219     <qandaentry>
1220       <question>
1221         <para>
1222            I'm running BIND on Red Hat Enterprise Linux or Fedora Core -
1223         </para>
1224         <para>
1225           Why can't named update slave zone database files?
1226         </para>
1227         <para>
1228           Why can't named create DDNS journal files or update
1229           the master zones from journals?
1230         </para>
1231         <para>
1232           Why can't named create custom log files?
1233         </para>
1234       </question>
1235
1236       <answer>
1237         <para>
1238           Red Hat Security Enhanced Linux (SELinux) policy security
1239           protections :
1240         </para>
1241
1242         <para>
1243            Red Hat have adopted the National Security Agency's
1244            SELinux security policy (see <ulink
1245    url="http://www.nsa.gov/selinux">&lt;http://www.nsa.gov/selinux&gt;</ulink>)
1246            and recommendations for BIND security , which are more
1247            secure than running named in a chroot and make use of
1248            the bind-chroot environment unnecessary .
1249         </para>
1250
1251         <para>
1252           By default, named is not allowed by the SELinux policy
1253           to write, create or delete any files EXCEPT in these
1254           directories:
1255           <informalexample>
1256             <programlisting>
1257 $ROOTDIR/var/named/slaves
1258 $ROOTDIR/var/named/data
1259 $ROOTDIR/var/tmp
1260             </programlisting>
1261           </informalexample>
1262           where $ROOTDIR may be set in /etc/sysconfig/named if
1263           bind-chroot is installed.
1264         </para>
1265
1266         <para>
1267           The SELinux policy particularly does NOT allow named to modify
1268           the $ROOTDIR/var/named directory, the default location for master
1269           zone database files.
1270         </para>
1271
1272         <para>
1273           SELinux policy overrules file access permissions - so
1274           even if all the files under /var/named have ownership
1275           named:named and mode rw-rw-r--, named will still not be
1276           able to write or create files except in the directories
1277           above, with SELinux in Enforcing mode.
1278         </para>
1279   
1280         <para>
1281           So, to allow named to update slave or DDNS zone files,
1282           it is best to locate them in $ROOTDIR/var/named/slaves,
1283           with named.conf zone statements such as:
1284           <informalexample>
1285             <programlisting>
1286 zone "slave.zone." IN {
1287         type slave;
1288         file "slaves/slave.zone.db";
1289         ...
1290 };   
1291 zone "ddns.zone." IN  {
1292         type master;
1293         allow-updates {...};
1294         file "slaves/ddns.zone.db";
1295 };
1296             </programlisting>
1297           </informalexample>
1298         </para>
1299
1300         <para>
1301           To allow named to create its cache dump and statistics
1302           files, for example, you could use named.conf options
1303           statements such as:
1304           <informalexample>
1305             <programlisting>
1306 options {
1307         ...
1308         dump-file "/var/named/data/cache_dump.db";
1309         statistics-file "/var/named/data/named_stats.txt";
1310         ...
1311 };
1312             </programlisting>
1313           </informalexample>
1314         </para>
1315
1316         <para>
1317           You can also tell SELinux to allow named to update any
1318           zone database files, by setting the SELinux tunable boolean
1319           parameter 'named_write_master_zones=1', using the
1320           system-config-securitylevel GUI, using the 'setsebool'
1321           command, or in /etc/selinux/targeted/booleans.
1322         </para>
1323   
1324         <para>
1325           You can disable SELinux protection for named entirely by
1326           setting the 'named_disable_trans=1' SELinux tunable boolean
1327           parameter.
1328         </para>
1329     
1330         <para>
1331           The SELinux named policy defines these SELinux contexts for named:
1332           <informalexample>
1333             <programlisting>
1334 named_zone_t : for zone database files       - $ROOTDIR/var/named/*
1335 named_conf_t : for named configuration files - $ROOTDIR/etc/{named,rndc}.*
1336 named_cache_t: for files modifiable by named - $ROOTDIR/var/{tmp,named/{slaves,data}}
1337             </programlisting>
1338           </informalexample>
1339         </para>
1340    
1341         <para>
1342           If you want to retain use of the SELinux policy for named,
1343           and put named files in different locations, you can do
1344           so by changing the context of the custom file locations
1345           .
1346         </para>
1347
1348         <para>
1349           To create a custom configuration file location, e.g.
1350           '/root/named.conf', to use with the 'named -c' option,
1351           do:
1352           <informalexample>
1353             <programlisting>
1354 # chcon system_u:object_r:named_conf_t /root/named.conf
1355             </programlisting>
1356           </informalexample>
1357         </para>
1358   
1359         <para>
1360           To create a custom modifiable named data location, e.g.
1361           '/var/log/named' for a log file, do:
1362           <informalexample>
1363             <programlisting>
1364 # chcon system_u:object_r:named_cache_t /var/log/named
1365             </programlisting>
1366           </informalexample>
1367         </para>
1368    
1369         <para>
1370    To create a custom zone file location, e.g. /root/zones/, do:
1371           <informalexample>
1372             <programlisting>
1373 # chcon system_u:object_r:named_zone_t /root/zones/{.,*}
1374             </programlisting>
1375           </informalexample>
1376         </para>
1377   
1378         <para>
1379           See these man-pages for more information : selinux(8),
1380           named_selinux(8), chcon(1), setsebool(8)
1381         </para>
1382       </answer>
1383     </qandaentry>
1384
1385     <qandaentry>
1386       <question>
1387         <para>
1388           Listening on individual IPv6 interfaces does not work.
1389         </para>
1390       </question>
1391       <answer>
1392         <para>
1393           This is usually due to "/proc/net/if_inet6" not being available
1394           in the chroot file system.  Mount another instance of "proc"
1395           in the chroot file system.
1396         </para>
1397         <para>
1398           This can be be made permanent by adding a second instance to
1399           /etc/fstab.
1400           <informalexample>
1401             <programlisting>
1402 proc /proc           proc defaults 0 0
1403 proc /var/named/proc proc defaults 0 0</programlisting>
1404           </informalexample>
1405         </para>
1406       </answer>
1407     </qandaentry>
1408     
1409     </qandadiv> <!-- Linux -->
1410     
1411     <qandadiv><title>Windows</title>
1412             
1413     <qandaentry>
1414       <question>
1415         <para>
1416           Zone transfers from my BIND 9 master to my Windows 2000
1417           slave fail.  Why?
1418         </para>
1419       </question>
1420       <answer>
1421         <para>
1422           This may be caused by a bug in the Windows 2000 DNS server
1423           where DNS messages larger than 16K are not handled properly.
1424           This can be worked around by setting the option "transfer-format
1425           one-answer;".  Also check whether your zone contains domain
1426           names with embedded spaces or other special characters,
1427           like "John\032Doe\213s\032Computer", since such names have
1428           been known to cause Windows 2000 slaves to incorrectly
1429           reject the zone.
1430         </para>
1431       </answer>
1432     </qandaentry>
1433     
1434     <qandaentry>
1435       <question>
1436         <para>
1437           I get <quote>Error 1067</quote> when starting named under Windows.
1438         </para>
1439       </question>
1440       <answer>
1441         <para>
1442           This is the service manager saying that named exited.   You
1443           need to examine the Application log in the EventViewer to
1444           find out why.
1445         </para>
1446         <para>
1447           Common causes are that you failed to create "named.conf"
1448           (usually "C:\windows\dns\etc\named.conf") or failed to
1449           specify the directory in named.conf.
1450         </para>
1451         <informalexample>
1452           <programlisting>
1453 options {
1454         Directory "C:\windows\dns\etc";
1455 };</programlisting>
1456         </informalexample>
1457       </answer>
1458     </qandaentry>
1459             
1460     </qandadiv> <!-- Windows -->
1461     
1462     <qandadiv><title>FreeBSD</title>
1463             
1464     <qandaentry>
1465       <question>
1466         <para>
1467           I have FreeBSD 4.x and "rndc-confgen -a" just sits there.
1468         </para>
1469       </question>
1470       <answer>
1471         <para>
1472           /dev/random is not configured.  Use rndcontrol(8) to tell
1473           the kernel to use certain interrupts as a source of random
1474           events.  You can make this permanent by setting rand_irqs
1475           in /etc/rc.conf.
1476         </para>
1477         <informalexample>
1478           <programlisting>
1479 rand_irqs="3 14 15"</programlisting>
1480         </informalexample>
1481         <para>
1482           See also
1483           <ulink url="http://people.freebsd.org/~dougb/randomness.html">
1484           &lt;http://people.freebsd.org/~dougb/randomness.html&gt;</ulink>.
1485         </para>
1486       </answer>
1487     </qandaentry>
1488     
1489     </qandadiv> <!-- FreeBSD -->
1490     
1491     <qandadiv><title>Solaris</title>
1492             
1493     <qandaentry>
1494       <question>
1495         <para>
1496           How do I integrate BIND 9 and Solaris SMF
1497         </para>
1498       </question>
1499       <answer>
1500         <para>
1501           Sun has a blog entry describing how to do this.
1502         </para>
1503         <para>
1504           <ulink
1505           url="http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris">
1506          &lt;http://blogs.sun.com/roller/page/anay/Weblog?catname=%2FSolaris&gt;
1507           </ulink>
1508         </para>
1509       </answer>
1510     </qandaentry>
1511     
1512     </qandadiv>
1513
1514     <qandadiv><title>Apple Mac OS X</title>
1515
1516     <qandaentry>
1517       <question>
1518         <para>
1519           How do I run BIND 9 on Apple Mac OS X?
1520         </para>
1521       </question>
1522       <answer>
1523         <para>
1524          If you run Tiger(Mac OS 10.4) or later then this is all you need to do:
1525         </para>
1526         <informalexample>
1527           <programlisting>
1528 % sudo rndc-confgen  > /etc/rndc.conf</programlisting>
1529         </informalexample>
1530         <para>
1531           Copy the key statement from /etc/rndc.conf into /etc/rndc.key, e.g.:
1532         </para>
1533         <informalexample>
1534           <programlisting>
1535 key "rndc-key" {
1536         algorithm hmac-md5;
1537         secret "uvceheVuqf17ZwIcTydddw==";
1538 };</programlisting>
1539         </informalexample>
1540         <para>
1541           Then start the relevant service:
1542         </para>
1543         <informalexample>
1544           <programlisting>
1545 % sudo service org.isc.named start</programlisting>
1546         </informalexample>
1547         <para>
1548           This is persistent upon a reboot, so you will have to do it only once.
1549         </para>
1550       </answer>
1551
1552       <answer>
1553         <para>
1554          Alternatively you can just generate /etc/rndc.key by running:
1555         </para>
1556         <informalexample>
1557           <programlisting>
1558 % sudo rndc-confgen -a</programlisting>
1559         </informalexample>
1560         <para>
1561           Then start the relevant service:
1562         </para>
1563         <informalexample>
1564           <programlisting>
1565 % sudo service org.isc.named start</programlisting>
1566         </informalexample>
1567         <para>
1568           Named will look for /etc/rndc.key when it starts if it
1569           doesn't have a controls section or the existing controls are
1570           missing keys sub-clauses.  This is persistent upon a
1571           reboot, so you will have to do it only once.
1572         </para>
1573       </answer>
1574     </qandaentry>
1575
1576     </qandadiv>
1577     
1578     </qandadiv> <!-- Operating-System Specific Questions -->
1579
1580   </qandaset>
1581 </article>