TrumanWong

named-checkzone

Use the named-checkzone command to check and convert the zone file validity. The zone name and zone file name must be specified.

Supplementary instructions

named-checkzone command can perform zone file validity check and conversion, and the zone name and zone file name must be specified.

grammar

named-checkzone [options] [zone name] [zone file name]

Options

-q quiet mode
-d enables debugging
-c <category> Specifies the category of the zone. If not specified, use IN

example

Perform validity check and conversion on zone file /var/named/192.168.0.rev.

[root@localhost ~]# named-checkzone 0.168.192.in-addr.arpa /var/named/192.168.0.rev
zone0.168.192.in-addr.arpa/IN: loaded serial 1268360612
OK

Validity check and conversion of zone file /var/named/sh.com.hosts.

[root@localhost ~]# named-checkzone sh.com /var/named/sh.com.hosts
zonesh.com/IN: sh.com/MX 'mail.sh.com' is a CNAME (illegal)
zonesh.com/IN: loaded serial 1268360234
OK