Linux "delv" Command Line Options and Examples
DNS lookup and validation utility
delv is a tool for sending DNS queries and validating the results, using the same internal resolver and validator logic as named.
delv [@server] [[-4] | [-6]] [-a anchor-file] [-b address] [-c class] [-d level] [-i] [-m] [-p port#] [-q name] [-t type] [-x addr]
[name] [type] [class] [queryopt...]
Command Line Options:
Specifies a file from which to read DNSSEC trust anchors. The default is /etc/bind.keys, which is included with BIND 9 andcontains one or more trust anchors for the root zone (".").Keys that do not match the root zone name are ignored. An alternate key name can be specified using the +root=NAME options.DNSSEC Lookaside Validation can also be turned on by using the +dlv=NAME to specify the name of a zone containing DLV records.Note: When reading the trust anchor file, delv treats managed-keys statements and trusted-keys statements identically. That is,for a managed key, it is the initial key that is trusted; RFC 5011 key management is not supported. delv will not consult themanaged-keys database maintained by named. This means that if either of the keys in /etc/bind.keys is revoked and rolled over, itwill be necessary to update /etc/bind.keys to use DNSSEC validation in delv.
delv -a ...
Sets the source IP address of the query to address. This must be a valid address on one of the host's network interfaces or"0.0.0.0" or "::". An optional source port may be specified by appending "#<port>"
delv -b ...
Sets the query class for the requested data. Currently, only class "IN" is supported in delv and any other value is ignored.
delv -c ...
Set the systemwide debug level to level. The allowed range is from 0 to 99. The default is 0 (no debugging). Debugging tracesfrom delv become more verbose as the debug level increases. See the +mtrace, +rtrace, and +vtrace options below for additionaldebugging details.
delv -d ...
Display the delv help usage output and exit.
delv -h ...
Insecure mode. This disables internal DNSSEC validation. (Note, however, this does not set the CD bit on upstream queries. If theserver being queried is performing DNSSEC validation, then it will not return invalid data; this can cause delv to time out. Whenit is necessary to examine invalid data to debug a DNSSEC problem, use dig +cd.)
delv -i ...
Enables memory usage debugging.
delv -m ...
Specifies a destination port to use for queries instead of the standard DNS port number 53. This option would be used with a nameserver that has been configured to listen for queries on a non-standard port number.
delv -p ...
Sets the query name to name. While the query name can be specified without using the -q, it is sometimes necessary todisambiguate names from types or classes (for example, when looking up the name "ns", which could be misinterpreted as the typeNS, or "ch", which could be misinterpreted as class CH).
delv -q ...
Sets the query type to type, which can be any valid query type supported in BIND 9 except for zone transfer types AXFR and IXFR.As with -q, this is useful to distinguish query name type or class when they are ambiguous. it is sometimes necessary todisambiguate names from types.The default query type is "A", unless the -x option is supplied to indicate a reverse lookup, in which case it is "PTR".
delv -t ...
Print the delv version and exit.
delv -v ...
Performs a reverse lookup, mapping an addresses to a name. addr is an IPv4 address in dotted-decimal notation, or acolon-delimited IPv6 address. When -x is used, there is no need to provide the name or type arguments. delv automaticallyperforms a lookup for a name like 220.127.116.11.in-addr.arpa and sets the query type to PTR. IPv6 addresses are looked up usingnibble format under the IP6.ARPA domain.
delv -x ...
Forces delv to only use IPv4.
delv -4 ...
Forces delv to only use IPv6.QUERY OPTIONSdelv provides a number of query options which affect the way results are displayed, and in some cases the way lookups are performed.Each query option is identified by a keyword preceded by a plus sign (+). Some keywords set or reset an option. These may be precededby the string no to negate the meaning of that keyword. Other keywords assign values to options like the timeout interval. They havethe form +keyword=value. The query options are:+[no]cdflagControls whether to set the CD (checking disabled) bit in queries sent by delv. This may be useful when troubleshooting DNSSECproblems from behind a validating resolver. A validating resolver will block invalid responses, making it difficult to retrievethem for analysis. Setting the CD flag on queries will cause the resolver to return invalid responses, which delv can thenvalidate internally and report the errors in detail.+[no]classControls whether to display the CLASS when printing a record. The default is to display the CLASS.+[no]ttlControls whether to display the TTL when printing a record. The default is to display the TTL.+[no]rtraceToggle resolver fetch logging. This reports the name and type of each query sent by delv in the process of carrying out theresolution and validation process: this includes including the original query and all subsequent queries to follow CNAMEs and toestablish a chain of trust for DNSSEC validation.This is equivalent to setting the debug level to 1 in the "resolver" logging category. Setting the systemwide debug level to 1using the -d option will product the same output (but will affect other logging categories as well).+[no]mtraceToggle message logging. This produces a detailed dump of the responses received by delv in the process of carrying out theresolution and validation process.This is equivalent to setting the debug level to 10 for the "packets" module of the "resolver" logging category. Setting thesystemwide debug level to 10 using the -d option will produce the same output (but will affect other logging categories as well).+[no]vtraceToggle validation logging. This shows the internal process of the validator as it determines whether an answer is validly signed,unsigned, or invalid.This is equivalent to setting the debug level to 3 for the "validator" module of the "dnssec" logging category. Setting thesystemwide debug level to 3 using the -d option will produce the same output (but will affect other logging categories as well).+[no]shortProvide a terse answer. The default is to print the answer in a verbose form.+[no]commentsToggle the display of comment lines in the output. The default is to print comments.+[no]rrcommentsToggle the display of per-record comments in the output (for example, human-readable key information about DNSKEY records). Thedefault is to print per-record comments.+[no]cryptoToggle the display of cryptographic fields in DNSSEC records. The contents of these field are unnecessary to debug most DNSSECvalidation failures and removing them makes it easier to see the common failures. The default is to display the fields. Whenomitted they are replaced by the string "[omitted]" or in the DNSKEY case the key id is displayed as the replacement, e.g. "[ keyid = value ]".+[no]trustControls whether to display the trust level when printing a record. The default is to display the trust level.+[no]split[=W]Split long hex- or base64-formatted fields in resource records into chunks of W characters (where W is rounded up to the nearestmultiple of 4). +nosplit or +split=0 causes fields not to be split at all. The default is 56 characters, or 44 characters whenmultiline mode is active.+[no]allSet or clear the display options +[no]comments, +[no]rrcomments, and +[no]trust as a group.+[no]multilinePrint long records (such as RRSIG, DNSKEY, and SOA records) in a verbose multi-line format with human-readable comments. Thedefault is to print each record on a single line, to facilitate machine parsing of the delv output.+[no]dnssecIndicates whether to display RRSIG records in the delv output. The default is to do so. Note that (unlike in dig) this does notcontrol whether to request DNSSEC records or whether to validate them. DNSSEC records are always requested, and validation willalways occur unless suppressed by the use of -i or +noroot and +nodlv.+[no]root[=ROOT]Indicates whether to perform conventional (non-lookaside) DNSSEC validation, and if so, specifies the name of a trust anchor. Thedefault is to validate using a trust anchor of "." (the root zone), for which there is a built-in key. If specifying a differenttrust anchor, then -a must be used to specify a file containing the key.+[no]dlv[=DLV]Indicates whether to perform DNSSEC lookaside validation, and if so, specifies the name of the DLV trust anchor. The -a optionmust also be used to specify a file containing the DLV key.+[no]tcpControls whether to use TCP when sending queries. The default is to use UDP unless a truncated response has been received.+[no]unknownformatPrint all RDATA in unknown RR type presentation format (RFC 3597). The default is to print RDATA for known types in the type'spresentation format.FILES/etc/bind.keys/etc/resolv.conf
delv -6 ...