Check DNS Zone (CHKDNSZNE)
Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Check DNS Zone (CHKDNSZNE) command checks the syntax and integrity of a zone data file. It performs the same checks as the Domain Name System (DNS) server when loading a zone. This is useful for checking zone data files before configuring them into a DNS server.
Restrictions:
- You must have execute (*X) authority to the directories in the path of the zone file.
- You must have read (*R) authority to the zone file.
- You must have execute (*X) authority to the directories in the path of the output file.
- You must have write (*W) authority to the output file if it already exists.
- You must have read, write and execute (*RWX) authority to the output file's parent directory if the output file does not already exist.
Top |
Parameters
Keyword | Description | Choices | Notes |
---|---|---|---|
ZONEDMN | Zone name | Character value | Required, Positional 1 |
ZONEDTAF | Zone file | Path name | Required, Positional 2 |
DEBUG | Show debug information | *NO, *YES | Optional |
QUIET | Quiet mode | *NO, *YES | Optional |
CHKDNSJRNF | Check journal files | *NO, *YES | Optional |
CLASS | Class | *IN, *CH, *HS | Optional |
CHKDTAITG | Check load integrity | *NONE, *FULL, *FULLNOSIBL, *LOCAL, *LOCALNOSIBL | Optional |
INFMT | Input format | *DFT, *TEXT, *RAW | Optional |
OUTFMT | Output format | *DFT, *TEXT, *RAW | Optional |
DETAIL | Dump style | *DFT, *FULL, *BASIC | Optional |
CANONICAL | Dump canonical names | *NO, *YES | Optional |
ZONESTMF | Zone output file | Path name, *STDOUT | Optional |
CHKLBL | Check labels | *WARN, *FAIL, *IGNORE | Optional |
CHKMXADR | Check MX for address | *WARN, *FAIL, *IGNORE | Optional |
CHKMXNAME | Check MX for CNAME | *WARN, *FAIL, *IGNORE | Optional |
CHKNSADR | Check servers | *WARN, *FAIL, *IGNORE | Optional |
CHKSRVNAME | Check SRV for CNAME | *WARN, *FAIL, *IGNORE | Optional |
CHKWLDCRD | Check for wildcards | *WARN, *IGNORE | Optional |
TOSTMF | Output file | Path name, *STDOUT | Optional |
Top |
Zone name (ZONEDMN)
Specifies the domain name of the zone being checked.
This is a required parameter.
- character-value
- Specify a zone domain name defined in the zone data file.
Top |
Zone file (ZONEDTAF)
Specifies the zone data file to check.
This is a required parameter.
- path-name
- Specify the path name for a stream file which is the zone data file to be checked.
Top |
Show debug information (DEBUG)
Specifies whether or not to enable debugging.
- *NO
- Disable debugging messages.
- *YES
- Enable debugging messages.
Top |
Quiet mode (QUIET)
Specifies whether or not to perform the check in quiet mode. Quiet mode will only use an exit code and not send any messages.
- *NO
- Do not display messages; only display an exit code.
- *YES
- Display messages and an exit code.
Top |
Check journal files (CHKDNSJRNF)
Specifies, when loading a data zone file, whether or not to read the DNS journal file if it exists. A DNS journal file contains zone updates that need to be merged with the master zone data file.
- *NO
- Do not read any DNS journal files for the zone.
- *YES
- Read any DNS journal files for the zone.
Top |
Class (CLASS)
Specifies the protocol group of the information.
- *IN
- The Internet class.
- *CH
- The CHAOS class.
- *HS
- The Hesiod class.
Top |
Check load integrity (CHKDTAITG)
Specifies which post-load zone data integrity checks to perform.
- *NONE
- Do not perform any post-load zone data integrity checks.
- *FULL
- Checks that MX records refer to A or AAAA record for both in-zone and out-of-zone hostnames. Checks that SRV records refer to A or AAAA record for both in-zone and out-of-zone hostnames. Checks that delegation NS records refer to A or AAAA record for both in-zone and out-of-zone hostnames. It also checks that glue addresses records in the zone match those advertised by the child.
- *FULLNOSIBL
- Same as *FULL but disables sibling glue checks.
- *LOCAL
- Same as *FULL but only checks in-zone hostnames. Out-of-zone hostnames are not checked.
- *LOCALNOSIBL
- Same as *LOCAL but disables sibling glue checks.
Top |
Input format (INFMT)
Specify the format of the zone data file to be read as input.
- *DFT
- Same as *TEXT.
- *TEXT
- Human-readable text format.
- *RAW
- Binary file format.
Top |
Output format (OUTFMT)
Specify the format of the output file specified by the TOSTMF parameter. This does not have any effect unless the utility dumps the zone data contents.
- *DFT
- Same as *TEXT.
- *TEXT
- Human-readable text format.
- *RAW
- Binary file format.
Top |
Dump style (DETAIL)
Specifies the detail level of records for the dumped zone data file. The *FULL format is most suitable for processing automatically by a separate script. The *BASIC format is more human-readable and is thus suitable for manual editing. This parameter will only have an effect if the utility dumps the zone data contents with the TOSTMF parameter. It also does not have any meaning if the OUTFMT parameter is not *TEXT.
- *DFT
- Same as *FULL.
- *FULL
- Dump using a format suitable for script processing.
- *BASIC
- Dump using a format for manual editing.
Top |
Dump canonical names (CANONICAL)
Specifies whether or not to dump the zone data file in canonical format. Since a Resource Record (RR) can have more than one name (aliases) associated with it, this allows you to dump the real (canonical) name instead of the aliases.
- *NO
- Do not dump zone data in canonical format (show aliases).
- *YES
- Dump zone data in canonical format (do not show aliases).
Top |
Zone output file (ZONESTMF)
Specifies the output file to which the zone data will be written. The output format will be based on the OUTFMT, DETAIL and CANONICAL parameters.
- *STDOUT
- All command output goes to the standard output device (normally the display).
- path-name
- Specify the path name for a stream file to which the zone data will be written.
Top |
Check labels (CHKLBL)
Specifies how to handle domain name check errors.
Errors are handled using the following failure modes.
- *WARN
- Show warning messages.
- *FAIL
- Show failure messages.
- *IGNORE
- Do not show warning or failure messages.
Top |
Check MX for address (CHKMXADR)
Specifies how to handle errors found when checking MX records to see if they are addresses.
Errors are handled using the following failure modes.
- *WARN
- Show warning messages.
- *FAIL
- Show failure messages.
- *IGNORE
- Do not show warning or failure messages.
Top |
Check MX for CNAME (CHKMXNAME)
Specifies how to handle errors found when checking MX records to see if they refer to a CNAME.
Errors are handled using the following failure modes.
- *WARN
- Show warning messages.
- *FAIL
- Show failure messages.
- *IGNORE
- Do not show warning or failure messages.
Top |
Check servers (CHKNSADR)
Specifies how to handle errors found when checking NS records to see if they are addresses.
Errors are handled using the following failure modes.
- *WARN
- Show warning messages.
- *FAIL
- Show failure messages.
- *IGNORE
- Do not show warning or failure messages.
Top |
Check SRV for CNAME (CHKSRVNAME)
Specifies how to handle errors found when checking SRV records to see if they refer to a CNAME.
Errors are handled using the following failure modes.
- *WARN
- Show warning messages.
- *FAIL
- Show failure messages.
- *IGNORE
- Do not show warning or failure messages.
Top |
Check for wildcards (CHKWLDCRD)
Specifies whether or not 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).
Errors are handled using the following failure modes.
- *WARN
- Show warning messages.
- *IGNORE
- Do not show warning or failure messages.
Top |
Output file (TOSTMF)
Specifies the name of a stream file where all command output is written.
- *STDOUT
- All command output goes to the standard output device (normally the display).
- path-name
- Specify the path name for a stream file where output should be written.
Top |
Examples
CHKDNSZNE ZONEDMN(i5os.ibm.com) ZONEDTAF('/QIBM/UserData/OS400/DNS/NS/i5os.ibm.com.DB') CHKDNSJRNF(*YES)
This command checks the zone 'i5os.ibm.com' in the zone data file '/QIBM/UserData/OS400/DNS/NS/i5os.ibm.com.DB'. It also checks any DNS journal files that may apply to this zone. Output from this command might look like this:
zone i5os.ibm.com/IN: loaded serial 2 OK
Top |
Error messages
*ESCAPE Messages
- DNS0013
- Error processing command parameters.
- DNS0065
- Option 33 of i5/OS is required, but is not installed.
- TCP7124
- Program &1 in library &2 type *PGM ended abnormally.
Top |