named-checkzone, named-compilezone Commands

Purpose

Validity check of Zone file or converting tool of a named configuration file.

Syntax

named-checkzone [ -d ] [ -h ] [ -j ] [ -q ] [ -v ] [ -c class ] [ -f format] [ -F format ] [ -J filename ] [ -i mode] [ -k mode ] [ -m mode ] [ -M mode ] [ -n mode ] [ -l ttl ] [ -L serial ] [ -o filename ] [ -r mode ] [ -s style ] [ -S mode ] [ -t directory ] [ -T mode ] [ -w directory ] [ -D ] [ -W mode ] {zonename} {filename}

named-compilezone [ -d ] [ -h ] [ -j ] [ -q ] [ -v ] [ -c class ] [ -f format ] [ -F format ] [ -J filename ] [ -i mode] [ -k mode ] [ -m mode ] [ -M mode ] [ -n mode ] [ -l ttl ] [ -L serial ] [ -r mode ] [ -s style ] [ -S mode ] [ -t directory ] [ -T mode ] [ -w directory ] [ -D ] [ -W mode ] zonename [ -o filename ] { zonename } { filename }

Description

The named-checkzone command checks the syntax and integrity of a zone file. It does the same checks as the named daemon when a zone is loaded, which makes the named-checkzone command useful for checking zone files prior to configuring them into a name server.

The named-compilezone command is similar to the named-checkzone command, but it always dumps the zone contents to a specified file in a specified format. Also, it applies strict check levels by default, since the dump output is used as an actual zone file loaded by the named daemon. When manually specified otherwise, the check levels must at least be as strict as specified in the named configuration file.

Flags

Item Description
-c class Specifies the class of the zone. If not specified, the class is set to IN by default.
-d Enables debugging.
-D Dumps zone file in canonical format. This option is always enabled for the named-compilezone command.
-f format Specifies the format of the zone file. Possible formats are text (default) and raw.
-F format
Specifies the format of the output file that is specified and has an effect only after the zone contents are dumped.
  • text (default): This format is the standard textual representation of the zone.
  • raw and raw=N: This format stores the zone in binary formats for rapid loading by the named command. The raw=N format specifies the format version of the raw zone file. If the value of N is 0, the raw file is read by any version of named command. If the value of N is 1, the file is read by release 9.9.0, or later. The default value of N is 1.
-h Prints the usage summary and exits.
-i mode Performs the zone integrity checks of the post load. The mode parameter can take the following values:
full
Checks if MX records, service (SRV) records, and delegation NS records refer to A or AAAA record (both in-zone and out-of-zone hostnames). It also checks whether glue addresses records in the zone match the ones advertised by the child.
full-sibling
Disables sibling glue checks but is otherwise the same as mode full.
local
Only checks if MX records, SRV records, and delegation NS records refer to in-zone hostnames or if some necessary glue exists when the name server is in a child zone.
local-sibling
Disables sibling glue checks but is otherwise the same as mode local.
none
Disables the checks.
-j Reads the journal if it exists when the zone file is loaded. The journal file name is assumed to be the zone file name with the string .jnl appended.
-J filename Specifies the file from which the journal file is read when a zone file is loaded. The -J flag implies the -j flag.
-k mode Performs check-names checks with the specified failure mode. Possible modes are fail, warn (default), and ignore.
-l ttl Sets a maximum permissible time-to-live (TTL) for the input file. Any record with a TTL higher than this value causes the zone to be rejected. This flag is similar to the max-zone-ttl option in the named.conf file.
-L serial Sets the source serial value in the header to the specified serial number when a zone file is compiled to the raw or map format. Use this flag for testing purposes only.
-m mode Specifies whether MX records must be checked to see if they are addresses. Possible modes are fail, warn (default), and ignore.
-M mode Checks if an MX record refers to a canonical name (CNAME). Possible modes are fail, warn (default), and ignore.
-n mode Specifies whether NS records must be checked to see if they are addresses. Possible modes are fail, warn (default), and ignore.
-o filename Writes the zone output to the file specified by the filename value. If the value of the file name variable is -, then the zone output is written to standard output. This option is mandatory for named-compilezone.
-q Indicates quiet mode (exits code only).
-r mode Checks for records that are considered as different by the Domain Name System Security Extensions (DNSSEC) but are semantically equal in the Domain Name System (DNS). Valid values for the mode parameter are fail, warn (default), and ignore.
-s style Specifies the style of the dumped zone file. Possible styles are full (default) and relative. The full format of the zone file is suitable to process the zone file automatically by a separate script. Alternatively, the relative format is more human-readable and is thus suitable for editing the zone file manually. This flag causes an effect only after the zone file contents are dumped. It also does not have any meaning if the output format is not text.
-S mode Checks if an SRV record refers to a CNAME. Possible modes are fail, warn (default), and ignore.
-t directory Changes the root directory to the specified directory so that $INCLUDE directives in the configuration file are processed.
-v Prints the version of the named-checkzone command and exits.
-w directory Changes the current directory to the specified directory so that relative file names in primary file $INCLUDE directives work. The -w option is similar to the directory clause in the named.conf file.
-W mode Specifies 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 warn (default) and ignore.
zonename Specifies the domain name of the zone that is checked.
filename Specifies the name of the zone file.

Exit Status

Table 1. Exit status
Item Description
0 Indicates a successful completion.
1 Indicates errors.