| Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Check DNS Configuration (CHKDNSCFG) command checks the syntax (but not the semantics) of a Domain Name System (DNS) server's named.conf configuration file. This may include files from the /QIBM/UserData/OS400/DNS/_DYN directory.
Restrictions:
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| CFGFILE | Configuration file | Path name, *DFT | Optional, Positional 1 |
| CHKDNSJRNF | Check journal files | *NO, *YES | Optional |
| CHKZONEF | Check zone files | *NO, *YES | Optional |
| TOSTMF | Output file | Path name, *STDOUT | Optional |
| Top |
Specifies the named.conf configuration file to check.
| Top |
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.
| Top |
Specifies whether or not to perform a check load of the master zone data files found in the named.conf configuration file being checked. If any errors are found, they will be displayed. If no errors are found, nothing will be displayed.
| Top |
Specifies the name of a stream file where all command output is written.
| Top |
Example 1: Checking the Default DNS Configuration File
CHKDNSCFG CFGFILE(*DFT) TOSTMF(*STDOUT)
This command will check configuration file /QIBM/UserData/OS400/DNS/NS/named.conf. If any errors are found, they will be sent to the standard output device. If no errors are found, nothing will be sent.
Example 2: Checking DNS Journal Files and Zone Data Files
CHKDNSCFG CFGFILE('/QIBM/UserData/OS400/DNS/NS/named.conf')
CHKDNSJRNF(*YES) CHKZONEF(*YES)
TOSTMF('/mydir/dnserr.txt')
This command will check the configuration file for the server NS and include checking the zone data files and any existing DNS journal files.
If any errors are found, they are written to stream file '/mydir/dnserr.txt'.
| Top |
*ESCAPE Messages
| Top |