named-checkzone.docbook 20.2 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 27 28
  <docinfo>
    <copyright>
      <year>2004</year>
      <year>2005</year>
Mark Andrews's avatar
Mark Andrews committed
29
      <year>2006</year>
Mark Andrews's avatar
Mark Andrews committed
30
      <year>2007</year>
Automatic Updater's avatar
Automatic Updater committed
31
      <year>2009</year>
Automatic Updater's avatar
Automatic Updater committed
32
      <year>2010</year>
Automatic Updater's avatar
Automatic Updater committed
33
      <year>2011</year>
Tinderbox User's avatar
Tinderbox User committed
34
      <year>2012</year>
Tinderbox User's avatar
Tinderbox User committed
35
      <year>2013</year>
Mark Andrews's avatar
Mark Andrews committed
36
      <year>2014</year>
37
      <year>2015</year>
38
      <year>2016</year>
39 40
      <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
    </copyright>
Tinderbox User's avatar
Tinderbox User committed
41 42 43 44 45 46
    <copyright>
      <year>2000</year>
      <year>2001</year>
      <year>2002</year>
      <holder>Internet Software Consortium.</holder>
    </copyright>
47 48
  </docinfo>

49 50
  <refnamediv>
    <refname><application>named-checkzone</application></refname>
51 52
    <refname><application>named-compilezone</application></refname>
    <refpurpose>zone file validity checking or converting tool</refpurpose>
53 54 55
  </refnamediv>

  <refsynopsisdiv>
Evan Hunt's avatar
Evan Hunt committed
56
    <cmdsynopsis sepchar=" ">
57
      <command>named-checkzone</command>
Evan Hunt's avatar
Evan Hunt committed
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
      <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>
85
    </cmdsynopsis>
Evan Hunt's avatar
Evan Hunt committed
86
    <cmdsynopsis sepchar=" ">
87
      <command>named-compilezone</command>
Evan Hunt's avatar
Evan Hunt committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
      <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>
113 114 115
    </cmdsynopsis>
  </refsynopsisdiv>

Evan Hunt's avatar
Evan Hunt committed
116
  <refsection><info><title>DESCRIPTION</title></info>
117

118 119 120 121 122
    <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.
123
    </para>
124 125 126 127 128 129 130
    <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>.
131
	When manually specified otherwise, the check levels must at
132 133
        least be as strict as those specified in the
	<command>named</command> configuration file.
Mark Andrews's avatar
Mark Andrews committed
134
     </para>
Evan Hunt's avatar
Evan Hunt committed
135
  </refsection>
136

Evan Hunt's avatar
Evan Hunt committed
137
  <refsection><info><title>OPTIONS</title></info>
138

139 140 141 142

    <variablelist>
      <varlistentry>
        <term>-d</term>
143 144 145 146 147
        <listitem>
          <para>
            Enable debugging.
          </para>
        </listitem>
148 149
      </varlistentry>

150 151 152 153 154 155 156 157 158
      <varlistentry>
        <term>-h</term>
        <listitem>
          <para>
            Print the usage summary and exit.
          </para>
        </listitem>
      </varlistentry>

159 160
      <varlistentry>
        <term>-q</term>
161 162 163 164 165
        <listitem>
          <para>
            Quiet mode - exit code only.
          </para>
        </listitem>
166 167
      </varlistentry>

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

178
      <varlistentry>
179
        <term>-j</term>
180 181
        <listitem>
          <para>
182 183 184 185 186 187 188 189 190 191 192 193 194
            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.)
195
          </para>
196
        </listitem>
197
      </varlistentry>
198

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

208 209 210 211
      <varlistentry>
        <term>-i <replaceable class="parameter">mode</replaceable></term>
	<listitem>
	  <para>
212
	      Perform post-load zone integrity checks.  Possible modes are
213
	      <command>"full"</command> (default),
214 215 216
	      <command>"full-sibling"</command>,
	      <command>"local"</command>,
	      <command>"local-sibling"</command> and
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233
	      <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
234
	      hostnames).  It also checks that glue address records
235 236 237 238 239
	      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>
240 241 242 243 244 245
	  <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>
246 247 248 249 250 251
	  <para>
	      Mode <command>"none"</command> disables the checks.
	  </para>
	</listitem>
      </varlistentry>

252 253 254 255 256
      <varlistentry>
	<term>-f <replaceable class="parameter">format</replaceable></term>
	<listitem>
	  <para>
	    Specify the format of the zone file.
257
	    Possible formats are <command>"text"</command> (default),
Evan Hunt's avatar
Evan Hunt committed
258
	    <command>"raw"</command>, and <command>"map"</command>.
259 260 261 262 263 264 265 266 267 268 269 270 271
	  </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>
272
	  <para>
273 274
	    Possible formats are <command>"text"</command> (default),
	    which is the standard textual representation of the zone,
Evan Hunt's avatar
Evan Hunt committed
275
	    and <command>"map"</command>, <command>"raw"</command>,
276 277 278 279 280 281
            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.
282
	  </para>
283 284 285
	</listitem>
      </varlistentry>

286 287
      <varlistentry>
        <term>-k <replaceable class="parameter">mode</replaceable></term>
288 289
        <listitem>
          <para>
Mark Andrews's avatar
Mark Andrews committed
290
            Perform <command>"check-names"</command> checks with the
291 292 293 294 295
	    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
296 297 298
            <command>"ignore"</command>.
          </para>
        </listitem>
299
      </varlistentry>
300

Evan Hunt's avatar
Evan Hunt committed
301 302 303 304 305 306 307 308 309 310 311 312 313
      <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>

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

326 327 328 329 330 331 332 333 334 335 336 337
      <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>

338 339 340 341 342 343 344 345 346 347 348 349
      <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>

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

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

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

390 391 392 393 394 395
      <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)
396
	    and <command>"relative"</command>.
397 398
	    The full format is most suitable for processing
	    automatically by a separate script.
399
	    On the other hand, the relative format is more
400 401 402 403 404 405 406 407 408 409
	    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>

410 411 412 413 414 415 416 417 418 419 420 421
      <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>

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

434 435 436 437
      <varlistentry>
	<term>-T <replaceable class="parameter">mode</replaceable></term>
	<listitem>
	  <para>
438 439 440 441
	    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>.
442 443 444 445
	  </para>
	</listitem>
      </varlistentry>

446 447 448 449
      <varlistentry>
        <term>-w <replaceable class="parameter">directory</replaceable></term>
        <listitem>
          <para>
450 451 452 453 454
            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>.
455 456 457 458
          </para>
        </listitem>
      </varlistentry>

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

469 470
      <varlistentry>
        <term>-W <replaceable class="parameter">mode</replaceable></term>
471 472 473 474 475 476 477 478 479 480
        <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>
481 482
      </varlistentry>

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

      <varlistentry>
        <term>filename</term>
494 495 496 497 498
        <listitem>
          <para>
            The name of the zone file.
          </para>
        </listitem>
499 500 501 502
      </varlistentry>

    </variablelist>

Evan Hunt's avatar
Evan Hunt committed
503
  </refsection>
504

Evan Hunt's avatar
Evan Hunt committed
505
  <refsection><info><title>RETURN VALUES</title></info>
506

507 508 509 510
    <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
511
  </refsection>
512

Evan Hunt's avatar
Evan Hunt committed
513
  <refsection><info><title>SEE ALSO</title></info>
514

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

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