named-checkzone, named-compilezone Commands

Purpose

Zone file validity checking or converting tool of a named configuration file.

Syntax

named-checkzone [ -d ] [ -j ] [ -q ] [ -v ] [ -c class ] [ -f format ] [ -F format ] [ -i mode] [ -k mode ] [ -m mode ] [ -M mode ] [ -n mode ] [ -o filename ] [ -s style ] [ -S mode ] [ -t directory ] [ -w directory ] [ -D ] [ -W mode ] zonename filename

named-compilezone [ -d ] [ -j ] [ -q ] [ -v ] [ -c class ] [ -f format ] [ -F format ] [ -i mode] [ -k mode ] [ -m mode ] [ -n mode ] [ -o filename ] [ -s style ] [ -t directory ] [ -w directory ] [ -D ] [ -W mode ] zonename filename

Description

The named-checkzone command checks the syntax and integrity of a zone file. It performs the same checks as the named daemon does when loading a zone. This makes the named-checkzone command useful for checking zone files before 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. Additionally, it applies stricter check levels by default, since the dump output will be 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 those 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 is always enabled for the named-compilezone command.
-i mode Performs post load zone integrity checks. The mode parameter can be one of the following values:
full
Checks if MX records, SRV records, and delegation NS records refer to A or AAAA record (both in-zone and out-of-zone host names). It also checks if glue addresses records in the zone match those 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 host names or if some required glue exists, that is 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 loading the zone file.
-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 specified. Possible formats are "text" (default) and "raw". This flag does not cause any effects unless it dumps the zone contents.
-k mode Performs "check-names" checks with the specified failure mode. Possible modes are "fail", "warn" (default) and "ignore".
-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 a MX record refers to a 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 zone output to the file specified by the filename value.
-q Indicates quiet mode (exits code only).
-s style Specifies the style of the dumped zone file. Possible styles are "full" (default) and "relative". The "full" format is most suitable for processing automatically by a separate script. On the other hand, the "relative" format is more human-readable and is thus suitable for editing by hand. This flag 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.
-S mode Checks if a SRV record refers to a CNAME. Possible modes are "fail", "warn" (default) and "ignore".
-t directory Changes the directory to the directory so that included 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 directory so that relative file names in master file $INCLUDE directives work. This 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 being checked.
filename Specifies the name of the zone file.

Exit Status

Item Description
0 Indicates a successful completion.
1 Indicates errors.

named-checkzone, named-compilezone command - BIND 9.16

For a complete description, see the named-checkzone, named-compilezone command in the BIND 9.16 Administrator Reference Manual.