named-checkzone.docbook 20.1 KB
Newer Older
Brian Wellington's avatar
Brian Wellington committed
1
<!--
2
 - Copyright (C) 2000-2002, 2004-2007, 2009-2016  Internet Systems Consortium, Inc. ("ISC")
Brian Wellington's avatar
Brian Wellington committed
3
 -
4 5 6
 - This Source Code Form is subject to the terms of the Mozilla Public
 - License, v. 2.0. If a copy of the MPL was not distributed with this
 - file, You can obtain one at http://mozilla.org/MPL/2.0/.
Brian Wellington's avatar
Brian Wellington committed
7
-->
Tinderbox User's avatar
Tinderbox User committed
8

Evan Hunt's avatar
Evan Hunt committed
9 10 11 12 13
<!-- Converted by db4-upgrade version 1.0 -->
<refentry xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="man.named-checkzone">
  <info>
    <date>2014-02-19</date>
  </info>
14
  <refentryinfo>
Evan Hunt's avatar
Evan Hunt committed
15 16
    <corpname>ISC</corpname>
    <corpauthor>Internet Systems Consortium, Inc.</corpauthor>
17 18 19 20 21 22 23 24
  </refentryinfo>

  <refmeta>
    <refentrytitle><application>named-checkzone</application></refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo>BIND9</refmiscinfo>
  </refmeta>

25 26
  <docinfo>
    <copyright>
Mark Andrews's avatar
Mark Andrews committed
27 28 29
      <year>2000</year>
      <year>2001</year>
      <year>2002</year>
30 31
      <year>2004</year>
      <year>2005</year>
Mark Andrews's avatar
Mark Andrews committed
32
      <year>2006</year>
Mark Andrews's avatar
Mark Andrews committed
33
      <year>2007</year>
Automatic Updater's avatar
Automatic Updater committed
34
      <year>2009</year>
Automatic Updater's avatar
Automatic Updater committed
35
      <year>2010</year>
Automatic Updater's avatar
Automatic Updater committed
36
      <year>2011</year>
Tinderbox User's avatar
Tinderbox User committed
37
      <year>2012</year>
Tinderbox User's avatar
Tinderbox User committed
38
      <year>2013</year>
Mark Andrews's avatar
Mark Andrews committed
39
      <year>2014</year>
40
      <year>2015</year>
41
      <year>2016</year>
42 43 44 45
      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
    </copyright>
  </docinfo>

46 47
  <refnamediv>
    <refname><application>named-checkzone</application></refname>
48 49
    <refname><application>named-compilezone</application></refname>
    <refpurpose>zone file validity checking or converting tool</refpurpose>
50 51 52
  </refnamediv>

  <refsynopsisdiv>
Evan Hunt's avatar
Evan Hunt committed
53
    <cmdsynopsis sepchar=" ">
54
      <command>named-checkzone</command>
Evan Hunt's avatar
Evan Hunt committed
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
      <arg choice="opt" rep="norepeat"><option>-d</option></arg>
      <arg choice="opt" rep="norepeat"><option>-h</option></arg>
      <arg choice="opt" rep="norepeat"><option>-j</option></arg>
      <arg choice="opt" rep="norepeat"><option>-q</option></arg>
      <arg choice="opt" rep="norepeat"><option>-v</option></arg>
      <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">format</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-F <replaceable class="parameter">format</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-J <replaceable class="parameter">filename</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-M <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">ttl</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">serial</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">style</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-S <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-D</option></arg>
      <arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="req" rep="norepeat">zonename</arg>
      <arg choice="req" rep="norepeat">filename</arg>
82
    </cmdsynopsis>
Evan Hunt's avatar
Evan Hunt committed
83
    <cmdsynopsis sepchar=" ">
84
      <command>named-compilezone</command>
Evan Hunt's avatar
Evan Hunt committed
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
      <arg choice="opt" rep="norepeat"><option>-d</option></arg>
      <arg choice="opt" rep="norepeat"><option>-j</option></arg>
      <arg choice="opt" rep="norepeat"><option>-q</option></arg>
      <arg choice="opt" rep="norepeat"><option>-v</option></arg>
      <arg choice="opt" rep="norepeat"><option>-c <replaceable class="parameter">class</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-C <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-f <replaceable class="parameter">format</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-F <replaceable class="parameter">format</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-J <replaceable class="parameter">filename</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-i <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-k <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-m <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-n <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-l <replaceable class="parameter">ttl</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-L <replaceable class="parameter">serial</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-r <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-s <replaceable class="parameter">style</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-t <replaceable class="parameter">directory</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-T <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-w <replaceable class="parameter">directory</replaceable></option></arg>
      <arg choice="opt" rep="norepeat"><option>-D</option></arg>
      <arg choice="opt" rep="norepeat"><option>-W <replaceable class="parameter">mode</replaceable></option></arg>
      <arg choice="req" rep="norepeat"><option>-o <replaceable class="parameter">filename</replaceable></option></arg>
      <arg choice="req" rep="norepeat">zonename</arg>
      <arg choice="req" rep="norepeat">filename</arg>
110 111 112
    </cmdsynopsis>
  </refsynopsisdiv>

Evan Hunt's avatar
Evan Hunt committed
113
  <refsection><info><title>DESCRIPTION</title></info>
114

115 116 117 118 119
    <para><command>named-checkzone</command>
      checks the syntax and integrity of a zone file.  It performs the
      same checks as <command>named</command> does when loading a
      zone.  This makes <command>named-checkzone</command> useful for
      checking zone files before configuring them into a name server.
120
    </para>
121 122 123 124 125 126 127
    <para>
        <command>named-compilezone</command> is similar to
	<command>named-checkzone</command>, but it always dumps the
        zone contents to a specified file in a specified format.
	Additionally, it applies stricter check levels by default,
        since the dump output will be used as an actual zone file
	loaded by <command>named</command>.
128
	When manually specified otherwise, the check levels must at
129 130
        least be as strict as those specified in the
	<command>named</command> configuration file.
Mark Andrews's avatar
Mark Andrews committed
131
     </para>
Evan Hunt's avatar
Evan Hunt committed
132
  </refsection>
133

Evan Hunt's avatar
Evan Hunt committed
134
  <refsection><info><title>OPTIONS</title></info>
135

136 137 138 139

    <variablelist>
      <varlistentry>
        <term>-d</term>
140 141 142 143 144
        <listitem>
          <para>
            Enable debugging.
          </para>
        </listitem>
145 146
      </varlistentry>

147 148 149 150 151 152 153 154 155
      <varlistentry>
        <term>-h</term>
        <listitem>
          <para>
            Print the usage summary and exit.
          </para>
        </listitem>
      </varlistentry>

156 157
      <varlistentry>
        <term>-q</term>
158 159 160 161 162
        <listitem>
          <para>
            Quiet mode - exit code only.
          </para>
        </listitem>
163 164
      </varlistentry>

165 166
      <varlistentry>
        <term>-v</term>
167 168 169 170 171 172
        <listitem>
          <para>
            Print the version of the <command>named-checkzone</command>
            program and exit.
          </para>
        </listitem>
173 174
      </varlistentry>

175
      <varlistentry>
176
        <term>-j</term>
177 178
        <listitem>
          <para>
179 180 181 182 183 184 185 186 187 188 189 190 191
            When loading a zone file, read the journal if it exists.
            The journal file name is assumed to be the zone file name
	    appended with the string <filename>.jnl</filename>.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>-J <replaceable class="parameter">filename</replaceable></term>
        <listitem>
          <para>
            When loading the zone file read the journal from the given
            file, if it exists. (Implies -j.)
192
          </para>
193
        </listitem>
194
      </varlistentry>
195

196 197
      <varlistentry>
        <term>-c <replaceable class="parameter">class</replaceable></term>
198 199
        <listitem>
          <para>
200
            Specify the class of the zone.  If not specified, "IN" is assumed.
201 202
          </para>
        </listitem>
203 204
      </varlistentry>

205 206 207 208
      <varlistentry>
        <term>-i <replaceable class="parameter">mode</replaceable></term>
	<listitem>
	  <para>
209
	      Perform post-load zone integrity checks.  Possible modes are
210
	      <command>"full"</command> (default),
211 212 213
	      <command>"full-sibling"</command>,
	      <command>"local"</command>,
	      <command>"local-sibling"</command> and
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
	      <command>"none"</command>.
	  </para>
	  <para>
	      Mode <command>"full"</command> checks that MX records
	      refer to A or AAAA record (both in-zone and out-of-zone
	      hostnames).  Mode <command>"local"</command> only
	      checks MX records which refer to in-zone hostnames.
	  </para>
	  <para>
	      Mode <command>"full"</command> checks that SRV records
	      refer to A or AAAA record (both in-zone and out-of-zone
	      hostnames).  Mode <command>"local"</command> only
	      checks SRV records which refer to in-zone hostnames.
	  </para>
	  <para>
	      Mode <command>"full"</command> checks that delegation NS
	      records refer to A or AAAA record (both in-zone and out-of-zone
231
	      hostnames).  It also checks that glue address records
232 233 234 235 236
	      in the zone match those advertised by the child.
	      Mode <command>"local"</command> only checks NS records which
	      refer to in-zone hostnames or that some required glue exists,
	      that is when the nameserver is in a child zone.
	  </para>
237 238 239 240 241 242
	  <para>
	      Mode <command>"full-sibling"</command> and
	      <command>"local-sibling"</command> disable sibling glue
	      checks but are otherwise the same as <command>"full"</command>
	      and <command>"local"</command> respectively.
	  </para>
243 244 245 246 247 248
	  <para>
	      Mode <command>"none"</command> disables the checks.
	  </para>
	</listitem>
      </varlistentry>

249 250 251 252 253
      <varlistentry>
	<term>-f <replaceable class="parameter">format</replaceable></term>
	<listitem>
	  <para>
	    Specify the format of the zone file.
254
	    Possible formats are <command>"text"</command> (default),
Evan Hunt's avatar
Evan Hunt committed
255
	    <command>"raw"</command>, and <command>"map"</command>.
256 257 258 259 260 261 262 263 264 265 266 267 268
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-F <replaceable class="parameter">format</replaceable></term>
	<listitem>
	  <para>
	    Specify the format of the output file specified.
	    For <command>named-checkzone</command>,
	    this does not cause any effects unless it dumps the zone
	    contents.
	  </para>
269
	  <para>
270 271
	    Possible formats are <command>"text"</command> (default),
	    which is the standard textual representation of the zone,
Evan Hunt's avatar
Evan Hunt committed
272
	    and <command>"map"</command>, <command>"raw"</command>,
273 274 275 276 277 278
            and <command>"raw=N"</command>, which store the zone in a
            binary format for rapid loading by <command>named</command>.
            <command>"raw=N"</command> specifies the format version of
            the raw zone file: if N is 0, the raw file can be read by
            any version of <command>named</command>; if N is 1, the file
            can be read by release 9.9.0 or higher; the default is 1.
279
	  </para>
280 281 282
	</listitem>
      </varlistentry>

283 284
      <varlistentry>
        <term>-k <replaceable class="parameter">mode</replaceable></term>
285 286
        <listitem>
          <para>
Mark Andrews's avatar
Mark Andrews committed
287
            Perform <command>"check-names"</command> checks with the
288 289 290 291 292
	    specified failure mode.
            Possible modes are <command>"fail"</command>
	    (default for <command>named-compilezone</command>),
            <command>"warn"</command>
	    (default for <command>named-checkzone</command>) and
293 294 295
            <command>"ignore"</command>.
          </para>
        </listitem>
296
      </varlistentry>
297

Evan Hunt's avatar
Evan Hunt committed
298 299 300 301 302 303 304 305 306 307 308 309 310
      <varlistentry>
        <term>-l <replaceable class="parameter">ttl</replaceable></term>
        <listitem>
          <para>
            Sets a maximum permissible TTL for the input file.
            Any record with a TTL higher than this value will cause
            the zone to be rejected.  This is similar to using the
            <command>max-zone-ttl</command> option in
            <filename>named.conf</filename>.
          </para>
        </listitem>
      </varlistentry>

311 312 313 314
      <varlistentry>
        <term>-L <replaceable class="parameter">serial</replaceable></term>
        <listitem>
          <para>
Evan Hunt's avatar
Evan Hunt committed
315
            When compiling a zone to "raw" or "map" format, set the
316 317 318
            "source serial" value in the header to the specified serial
            number.  (This is expected to be used primarily for testing
            purposes.)
319 320 321
          </para>
        </listitem>
      </varlistentry>
322

323 324 325 326 327 328 329 330 331 332 333 334
      <varlistentry>
        <term>-m <replaceable class="parameter">mode</replaceable></term>
        <listitem>
          <para>
            Specify whether MX records should be checked to see if they
            are addresses.  Possible modes are <command>"fail"</command>,
            <command>"warn"</command> (default) and
            <command>"ignore"</command>.
          </para>
        </listitem>
      </varlistentry>

335 336 337 338 339 340 341 342 343 344 345 346
      <varlistentry>
	<term>-M <replaceable class="parameter">mode</replaceable></term>
        <listitem>
	  <para>
	    Check if a MX record refers to a CNAME.
            Possible modes are <command>"fail"</command>,
            <command>"warn"</command> (default) and
            <command>"ignore"</command>.
	  </para>
        </listitem>
      </varlistentry>

347 348
      <varlistentry>
        <term>-n <replaceable class="parameter">mode</replaceable></term>
349 350 351
        <listitem>
          <para>
            Specify whether NS records should be checked to see if they
352 353 354 355 356
            are addresses.
	    Possible modes are <command>"fail"</command>
	    (default for <command>named-compilezone</command>),
            <command>"warn"</command>
	    (default for <command>named-checkzone</command>) and
357 358 359
            <command>"ignore"</command>.
          </para>
        </listitem>
360 361
      </varlistentry>

362 363 364 365
      <varlistentry>
        <term>-o <replaceable class="parameter">filename</replaceable></term>
        <listitem>
          <para>
366
            Write zone output to <filename>filename</filename>.
367 368
	    If <filename>filename</filename> is <filename>-</filename> then
	    write to standard out.
369
	    This is mandatory for <command>named-compilezone</command>.
370 371 372 373
          </para>
        </listitem>
      </varlistentry>

374 375 376 377 378
      <varlistentry>
	<term>-r <replaceable class="parameter">mode</replaceable></term>
        <listitem>
	  <para>
            Check for records that are treated as different by DNSSEC but
379
	    are semantically equal in plain DNS.
380 381 382 383 384 385 386
            Possible modes are <command>"fail"</command>,
            <command>"warn"</command> (default) and
            <command>"ignore"</command>.
	  </para>
        </listitem>
      </varlistentry>

387 388 389 390 391 392
      <varlistentry>
	<term>-s <replaceable class="parameter">style</replaceable></term>
	<listitem>
	  <para>
	    Specify the style of the dumped zone file.
	    Possible styles are <command>"full"</command> (default)
393
	    and <command>"relative"</command>.
394 395
	    The full format is most suitable for processing
	    automatically by a separate script.
396
	    On the other hand, the relative format is more
397 398 399 400 401 402 403 404 405 406
	    human-readable and is thus suitable for editing by hand.
	    For <command>named-checkzone</command>
	    this does not cause any effects unless it dumps the zone
	    contents.
	    It also does not have any meaning if the output format
	    is not text.
	  </para>
	</listitem>
      </varlistentry>

407 408 409 410 411 412 413 414 415 416 417 418
      <varlistentry>
	<term>-S <replaceable class="parameter">mode</replaceable></term>
        <listitem>
	  <para>
	    Check if a SRV record refers to a CNAME.
            Possible modes are <command>"fail"</command>,
            <command>"warn"</command> (default) and
            <command>"ignore"</command>.
	  </para>
        </listitem>
      </varlistentry>

419 420 421 422
      <varlistentry>
        <term>-t <replaceable class="parameter">directory</replaceable></term>
        <listitem>
          <para>
423
            Chroot to <filename>directory</filename> so that
424 425
            include
            directives in the configuration file are processed as if
426
            run by a similarly chrooted <command>named</command>.
427 428 429 430
          </para>
        </listitem>
      </varlistentry>

431 432 433 434
      <varlistentry>
	<term>-T <replaceable class="parameter">mode</replaceable></term>
	<listitem>
	  <para>
435 436 437 438
	    Check if Sender Policy Framework (SPF) records exist
	    and issues a warning if an SPF-formatted TXT record is
	    not also present.  Possible modes are <command>"warn"</command>
	    (default), <command>"ignore"</command>.
439 440 441 442
	  </para>
	</listitem>
      </varlistentry>

443 444 445 446
      <varlistentry>
        <term>-w <replaceable class="parameter">directory</replaceable></term>
        <listitem>
          <para>
447 448 449 450 451
            chdir to <filename>directory</filename> so that
            relative
            filenames in master file $INCLUDE directives work.  This
            is similar to the directory clause in
            <filename>named.conf</filename>.
452 453 454 455
          </para>
        </listitem>
      </varlistentry>

456 457
      <varlistentry>
        <term>-D</term>
458 459 460
        <listitem>
          <para>
            Dump zone file in canonical format.
461
	    This is always enabled for <command>named-compilezone</command>.
462 463
          </para>
        </listitem>
464 465
      </varlistentry>

466 467
      <varlistentry>
        <term>-W <replaceable class="parameter">mode</replaceable></term>
468 469 470 471 472 473 474 475 476 477
        <listitem>
          <para>
            Specify whether to check for non-terminal wildcards.
            Non-terminal wildcards are almost always the result of a
            failure to understand the wildcard matching algorithm (RFC 1034).
            Possible modes are <command>"warn"</command> (default)
            and
            <command>"ignore"</command>.
          </para>
        </listitem>
478 479
      </varlistentry>

480 481
      <varlistentry>
        <term>zonename</term>
482 483 484 485 486
        <listitem>
          <para>
            The domain name of the zone being checked.
          </para>
        </listitem>
487 488 489 490
      </varlistentry>

      <varlistentry>
        <term>filename</term>
491 492 493 494 495
        <listitem>
          <para>
            The name of the zone file.
          </para>
        </listitem>
496 497 498 499
      </varlistentry>

    </variablelist>

Evan Hunt's avatar
Evan Hunt committed
500
  </refsection>
501

Evan Hunt's avatar
Evan Hunt committed
502
  <refsection><info><title>RETURN VALUES</title></info>
503

504 505 506 507
    <para><command>named-checkzone</command>
      returns an exit status of 1 if
      errors were detected and 0 otherwise.
    </para>
Evan Hunt's avatar
Evan Hunt committed
508
  </refsection>
509

Evan Hunt's avatar
Evan Hunt committed
510
  <refsection><info><title>SEE ALSO</title></info>
511

512 513
    <para><citerefentry>
        <refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
514
      </citerefentry>,
515
      <citerefentry>
516
        <refentrytitle>named-checkconf</refentrytitle><manvolnum>8</manvolnum>
517
      </citerefentry>,
518 519 520
      <citetitle>RFC 1035</citetitle>,
      <citetitle>BIND 9 Administrator Reference Manual</citetitle>.
    </para>
Evan Hunt's avatar
Evan Hunt committed
521
  </refsection>
522

Evan Hunt's avatar
Evan Hunt committed
523
</refentry>