2 - Copyright (C) 2004-2007, 2009-2011, 2013-2015 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000-2002 Internet Software Consortium.
5 - Permission to use, copy, modify, and/or 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.
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.
19 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
20 <title>named-checkzone</title>
21 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
23 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
24 <a name="man.named-checkzone"></a><div class="titlepage"></div>
25 <div class="refnamediv">
27 <p><span class="application">named-checkzone</span>, <span class="application">named-compilezone</span> — zone file validity checking or converting tool</p>
29 <div class="refsynopsisdiv">
31 <div class="cmdsynopsis"><p><code class="command">named-checkzone</code> [<code class="option">-d</code>] [<code class="option">-h</code>] [<code class="option">-j</code>] [<code class="option">-q</code>] [<code class="option">-v</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-f <em class="replaceable"><code>format</code></em></code>] [<code class="option">-F <em class="replaceable"><code>format</code></em></code>] [<code class="option">-i <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-m <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-M <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-L <em class="replaceable"><code>serial</code></em></code>] [<code class="option">-o <em class="replaceable"><code>filename</code></em></code>] [<code class="option">-r <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-s <em class="replaceable"><code>style</code></em></code>] [<code class="option">-S <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-T <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] [<code class="option">-W <em class="replaceable"><code>mode</code></em></code>] {zonename} {filename}</p></div>
32 <div class="cmdsynopsis"><p><code class="command">named-compilezone</code> [<code class="option">-d</code>] [<code class="option">-j</code>] [<code class="option">-q</code>] [<code class="option">-v</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-C <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-f <em class="replaceable"><code>format</code></em></code>] [<code class="option">-F <em class="replaceable"><code>format</code></em></code>] [<code class="option">-i <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-k <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-m <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-n <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-L <em class="replaceable"><code>serial</code></em></code>] [<code class="option">-r <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-s <em class="replaceable"><code>style</code></em></code>] [<code class="option">-t <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-T <em class="replaceable"><code>mode</code></em></code>] [<code class="option">-w <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] [<code class="option">-W <em class="replaceable"><code>mode</code></em></code>] {<code class="option">-o <em class="replaceable"><code>filename</code></em></code>} {zonename} {filename}</p></div>
34 <div class="refsection">
35 <a name="id-1.7"></a><h2>DESCRIPTION</h2>
36 <p><span class="command"><strong>named-checkzone</strong></span>
37 checks the syntax and integrity of a zone file. It performs the
38 same checks as <span class="command"><strong>named</strong></span> does when loading a
39 zone. This makes <span class="command"><strong>named-checkzone</strong></span> useful for
40 checking zone files before configuring them into a name server.
43 <span class="command"><strong>named-compilezone</strong></span> is similar to
44 <span class="command"><strong>named-checkzone</strong></span>, but it always dumps the
45 zone contents to a specified file in a specified format.
46 Additionally, it applies stricter check levels by default,
47 since the dump output will be used as an actual zone file
48 loaded by <span class="command"><strong>named</strong></span>.
49 When manually specified otherwise, the check levels must at
50 least be as strict as those specified in the
51 <span class="command"><strong>named</strong></span> configuration file.
54 <div class="refsection">
55 <a name="id-1.8"></a><h2>OPTIONS</h2>
56 <div class="variablelist"><dl class="variablelist">
57 <dt><span class="term">-d</span></dt>
61 <dt><span class="term">-h</span></dt>
63 Print the usage summary and exit.
65 <dt><span class="term">-q</span></dt>
67 Quiet mode - exit code only.
69 <dt><span class="term">-v</span></dt>
71 Print the version of the <span class="command"><strong>named-checkzone</strong></span>
74 <dt><span class="term">-j</span></dt>
76 When loading the zone file read the journal if it exists.
78 <dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
80 Specify the class of the zone. If not specified, "IN" is assumed.
82 <dt><span class="term">-i <em class="replaceable"><code>mode</code></em></span></dt>
85 Perform post-load zone integrity checks. Possible modes are
86 <span class="command"><strong>"full"</strong></span> (default),
87 <span class="command"><strong>"full-sibling"</strong></span>,
88 <span class="command"><strong>"local"</strong></span>,
89 <span class="command"><strong>"local-sibling"</strong></span> and
90 <span class="command"><strong>"none"</strong></span>.
93 Mode <span class="command"><strong>"full"</strong></span> checks that MX records
94 refer to A or AAAA record (both in-zone and out-of-zone
95 hostnames). Mode <span class="command"><strong>"local"</strong></span> only
96 checks MX records which refer to in-zone hostnames.
99 Mode <span class="command"><strong>"full"</strong></span> checks that SRV records
100 refer to A or AAAA record (both in-zone and out-of-zone
101 hostnames). Mode <span class="command"><strong>"local"</strong></span> only
102 checks SRV records which refer to in-zone hostnames.
105 Mode <span class="command"><strong>"full"</strong></span> checks that delegation NS
106 records refer to A or AAAA record (both in-zone and out-of-zone
107 hostnames). It also checks that glue address records
108 in the zone match those advertised by the child.
109 Mode <span class="command"><strong>"local"</strong></span> only checks NS records which
110 refer to in-zone hostnames or that some required glue exists,
111 that is when the nameserver is in a child zone.
114 Mode <span class="command"><strong>"full-sibling"</strong></span> and
115 <span class="command"><strong>"local-sibling"</strong></span> disable sibling glue
116 checks but are otherwise the same as <span class="command"><strong>"full"</strong></span>
117 and <span class="command"><strong>"local"</strong></span> respectively.
120 Mode <span class="command"><strong>"none"</strong></span> disables the checks.
123 <dt><span class="term">-f <em class="replaceable"><code>format</code></em></span></dt>
125 Specify the format of the zone file.
126 Possible formats are <span class="command"><strong>"text"</strong></span> (default)
127 and <span class="command"><strong>"raw"</strong></span>.
129 <dt><span class="term">-F <em class="replaceable"><code>format</code></em></span></dt>
132 Specify the format of the output file specified.
133 For <span class="command"><strong>named-checkzone</strong></span>,
134 this does not cause any effects unless it dumps the zone
138 Possible formats are <span class="command"><strong>"text"</strong></span> (default)
139 and <span class="command"><strong>"raw"</strong></span> or <span class="command"><strong>"raw=N"</strong></span>,
140 which store the zone in a binary format for rapid loading
141 by <span class="command"><strong>named</strong></span>. <span class="command"><strong>"raw=N"</strong></span>
142 specifies the format version of the raw zone file: if N
143 is 0, the raw file can be read by any version of
144 <span class="command"><strong>named</strong></span>; if N is 1, the file can be read
145 by release 9.9.0 or higher. The default is 1.
148 <dt><span class="term">-k <em class="replaceable"><code>mode</code></em></span></dt>
150 Perform <span class="command"><strong>"check-names"</strong></span> checks with the
151 specified failure mode.
152 Possible modes are <span class="command"><strong>"fail"</strong></span>
153 (default for <span class="command"><strong>named-compilezone</strong></span>),
154 <span class="command"><strong>"warn"</strong></span>
155 (default for <span class="command"><strong>named-checkzone</strong></span>) and
156 <span class="command"><strong>"ignore"</strong></span>.
158 <dt><span class="term">-L <em class="replaceable"><code>serial</code></em></span></dt>
160 When compiling a zone to 'raw' format, set the "source serial"
161 value in the header to the specified serial number. (This is
162 expected to be used primarily for testing purposes.)
164 <dt><span class="term">-m <em class="replaceable"><code>mode</code></em></span></dt>
166 Specify whether MX records should be checked to see if they
167 are addresses. Possible modes are <span class="command"><strong>"fail"</strong></span>,
168 <span class="command"><strong>"warn"</strong></span> (default) and
169 <span class="command"><strong>"ignore"</strong></span>.
171 <dt><span class="term">-M <em class="replaceable"><code>mode</code></em></span></dt>
173 Check if a MX record refers to a CNAME.
174 Possible modes are <span class="command"><strong>"fail"</strong></span>,
175 <span class="command"><strong>"warn"</strong></span> (default) and
176 <span class="command"><strong>"ignore"</strong></span>.
178 <dt><span class="term">-n <em class="replaceable"><code>mode</code></em></span></dt>
180 Specify whether NS records should be checked to see if they
182 Possible modes are <span class="command"><strong>"fail"</strong></span>
183 (default for <span class="command"><strong>named-compilezone</strong></span>),
184 <span class="command"><strong>"warn"</strong></span>
185 (default for <span class="command"><strong>named-checkzone</strong></span>) and
186 <span class="command"><strong>"ignore"</strong></span>.
188 <dt><span class="term">-o <em class="replaceable"><code>filename</code></em></span></dt>
190 Write zone output to <code class="filename">filename</code>.
191 If <code class="filename">filename</code> is <code class="filename">-</code> then
192 write to standard out.
193 This is mandatory for <span class="command"><strong>named-compilezone</strong></span>.
195 <dt><span class="term">-r <em class="replaceable"><code>mode</code></em></span></dt>
197 Check for records that are treated as different by DNSSEC but
198 are semantically equal in plain DNS.
199 Possible modes are <span class="command"><strong>"fail"</strong></span>,
200 <span class="command"><strong>"warn"</strong></span> (default) and
201 <span class="command"><strong>"ignore"</strong></span>.
203 <dt><span class="term">-s <em class="replaceable"><code>style</code></em></span></dt>
205 Specify the style of the dumped zone file.
206 Possible styles are <span class="command"><strong>"full"</strong></span> (default)
207 and <span class="command"><strong>"relative"</strong></span>.
208 The full format is most suitable for processing
209 automatically by a separate script.
210 On the other hand, the relative format is more
211 human-readable and is thus suitable for editing by hand.
212 For <span class="command"><strong>named-checkzone</strong></span>
213 this does not cause any effects unless it dumps the zone
215 It also does not have any meaning if the output format
218 <dt><span class="term">-S <em class="replaceable"><code>mode</code></em></span></dt>
220 Check if a SRV record refers to a CNAME.
221 Possible modes are <span class="command"><strong>"fail"</strong></span>,
222 <span class="command"><strong>"warn"</strong></span> (default) and
223 <span class="command"><strong>"ignore"</strong></span>.
225 <dt><span class="term">-t <em class="replaceable"><code>directory</code></em></span></dt>
227 Chroot to <code class="filename">directory</code> so that
229 directives in the configuration file are processed as if
230 run by a similarly chrooted named.
232 <dt><span class="term">-T <em class="replaceable"><code>mode</code></em></span></dt>
234 Check if Sender Policy Framework (SPF) records exist
235 and issues a warning if an SPF-formatted TXT record is
236 not also present. Possible modes are <span class="command"><strong>"warn"</strong></span>
237 (default), <span class="command"><strong>"ignore"</strong></span>.
239 <dt><span class="term">-w <em class="replaceable"><code>directory</code></em></span></dt>
241 chdir to <code class="filename">directory</code> so that
243 filenames in master file $INCLUDE directives work. This
244 is similar to the directory clause in
245 <code class="filename">named.conf</code>.
247 <dt><span class="term">-D</span></dt>
249 Dump zone file in canonical format.
250 This is always enabled for <span class="command"><strong>named-compilezone</strong></span>.
252 <dt><span class="term">-W <em class="replaceable"><code>mode</code></em></span></dt>
254 Specify whether to check for non-terminal wildcards.
255 Non-terminal wildcards are almost always the result of a
256 failure to understand the wildcard matching algorithm (RFC 1034).
257 Possible modes are <span class="command"><strong>"warn"</strong></span> (default)
259 <span class="command"><strong>"ignore"</strong></span>.
261 <dt><span class="term">zonename</span></dt>
263 The domain name of the zone being checked.
265 <dt><span class="term">filename</span></dt>
267 The name of the zone file.
271 <div class="refsection">
272 <a name="id-1.9"></a><h2>RETURN VALUES</h2>
273 <p><span class="command"><strong>named-checkzone</strong></span>
274 returns an exit status of 1 if
275 errors were detected and 0 otherwise.
278 <div class="refsection">
279 <a name="id-1.10"></a><h2>SEE ALSO</h2>
280 <p><span class="citerefentry"><span class="refentrytitle">named</span>(8)</span>,
281 <span class="citerefentry"><span class="refentrytitle">named-checkconf</span>(8)</span>,
282 <em class="citetitle">RFC 1035</em>,
283 <em class="citetitle">BIND 9 Administrator Reference Manual</em>.