named-rrchecker - syntax checker for individual DNS resource
records
named-rrchecker [-h] [-o origin] [-p]
[-u] [-C] [-T] [-P]
named-rrchecker reads a single DNS resource record (RR)
from standard input and checks whether it is syntactically correct.
- Input must not start with an owner (domain) name
- The CLASS field is mandatory (typically IN).
- The TTL field must not be present.
- RDATA format is specific to each RRTYPE.
- Leading and trailing whitespace in each field is ignored.
Format details can be found in RFC 1035 Section 5.1
<https://datatracker.ietf.org/doc/html/rfc1035.html#section-5.1> under
<rr> specification. RFC 3597
<https://datatracker.ietf.org/doc/html/rfc3597.html> format is also
accepted in any of the input fields. See Examples.
- -o origin
- This option specifies the origin to be used when interpreting names in the
record: it defaults to root (.). The specified origin is always
taken as an absolute name.
- -p
- This option prints out the resulting record in canonical form. If there is
no canonical form defined, the record is printed in RFC 3597
<https://datatracker.ietf.org/doc/html/rfc3597.html> unknown record
format.
- -u
- This option prints out the resulting record in RFC 3597
<https://datatracker.ietf.org/doc/html/rfc3597.html> unknown record
format.
- -C, -T, -P
- These options do not read input. They print out known classes, standard
types, and private type mnemonics. Each item is printed on a separate
line. The resulting list of private types may be empty
- -h
- This option prints out the help menu.
Pay close attention to the echo command line options
-e and -n, as they affect whitespace in the input to
named-rrchecker.
Special characters allowed in zone files by RFC 1035 Section
5.1
<https://datatracker.ietf.org/doc/html/rfc1035.html#section-5.1> are
accepted.
For multi-line examples see the next section.
- echo 'IN A 192.0.2.1'
| named-rrchecker -u
- Valid input in RFC 1035
<https://datatracker.ietf.org/doc/html/rfc1035.html> format.
- Output in RFC 3957
<https://datatracker.ietf.org/doc/html/rfc3957.html> format:
CLASS1 TYPE1 \# 4 C0000201
- echo 'CLASS1 TYPE1 \#
4 C0000201' | named-rrchecker -p
- Valid input in RFC 3597
<https://datatracker.ietf.org/doc/html/rfc3597.html> format.
- Output in RFC 1035
<https://datatracker.ietf.org/doc/html/rfc1035.html> format: IN A
192.0.2.1
- echo 'IN A \# 4
C0000201' | named-rrchecker -p
- Valid input with class and type in RFC 1035
<https://datatracker.ietf.org/doc/html/rfc1035.html> format and
rdata in RFC 3597
<https://datatracker.ietf.org/doc/html/rfc3597.html> format.
- Output in RFC 1035
<https://datatracker.ietf.org/doc/html/rfc1035.html> format: IN A
192.0.2.1
- echo 'IN HTTPS 1 .
key3=\001\000' | named-rrchecker -p
- Valid input with RFC 9460
<https://datatracker.ietf.org/doc/html/rfc9460.html> syntax for an
unknown key3 field. Syntax \001\000 produces two octets with
values 1 and 0, respectively.
- Output: IN HTTPS 1 . port=256
- key3 matches the standardized key name port.
- Octets 1 and 0 were decoded as integer values in big-endian encoding.
- echo 'IN HTTPS 1 .
key3=\001' | named-rrchecker -p
- •
- Invalid input - the length of the value for key3 (i.e. port) does
not match the known standard format for that parameter in the SVCB
RRTYPE.
- echo 'IN HTTPS 1 .
port=\001\000' | named-rrchecker -p
- •
- Invalid input - the key port, when specified using its standard
mnemonic name, must use standard key-specific syntax.
- 0
- The whole input was parsed as one syntactically valid resource
record.
- 1
- The input is not a syntactically valid resource record, or the given type
is not supported, or either/both class and type are meta-values, which
should not appear in zone files.
RFC 1034
<https://datatracker.ietf.org/doc/html/rfc1034.html>, RFC 1035
<https://datatracker.ietf.org/doc/html/rfc1035.html>, RFC 3957
<https://datatracker.ietf.org/doc/html/rfc3957.html>, named(8)
<#std-iscman-named>.
Internet Systems Consortium
2026, Internet Systems Consortium