-->
Page 116
Keyword Abbreviation | Meaning (Default) |
time=# (ti) | Set timeout length to # seconds [4] |
[no]ko | Keep open option (implies vc) [noko] |
[no]vc | Use/don't use virtual circuit [novc] |
[no]defname (def) | Use/don't use default domain name [def] |
[no]search (sea) | Use/don't use domain search list [sea] |
domain=NAME (do) | Set default domain name to NAME |
[no]ignore (i) | Ignore/don't ignore trunc. errors [noi] |
[no]primary (pr) | Use/don't use primary server [nopr] |
[no]aaonly (aa) | Authoritative query only flag [noaa] |
[no]sort (sor) | Sort resource records [nosor] |
[no]cmd | Echo parsed arguments [cmd] |
[no]stats (st) | Print query statistics [st] |
[no]Header (H) | Print basic header [H] |
[no]header (he) | Print header flags [he] |
[no]ttlid (tt) | Print TTLs [tt] |
[no]cl | Print class info [nocl] |
[no]qr | Print outgoing query [noqr] |
[no]reply (rep) | Print reply [rep] |
[no]ques (qu) | Print question section [qu] |
[no]answer (an) | Print answer section [an] |
[no]author (au) | Print authoritative section [au] |
[no]addit (ad) | Print additional section [ad] |
pfdef | Set to default print flags |
pfmin | Set to minimal default print flags |
pfset=# | Set print flags to # (# can be hex/octal/decimal) |
pfand=# | Bitwise and print flags with # |
pfor=# | Bitwise or print flags with # |
The retry and time options affect the retransmission strategy used by resolver library when sending datagram queries. The algorithm is as follows:
August 30, 1990 for i = 0 to retry _ 1 for j = 1 to num_servers send_query wait((time * (2**i)) / num_servers) end end
Note that dig always uses a value of 1 for num_servers.
DETAILS
dig once required a slightly modified version of the BIND resolver (3) library. BIND's resolver has (as of BIND 4.9) been augmented to work properly with dig. Essentially, dig is a straightforward (albeit not pretty) effort of parsing arguments and setting appropriate parameters. dig uses resolver routines res_init(), res_mkquery(), res_send() as well as accessing _res structure.
Page 117
FILES
/etc/resolv.conf
Initial domain name and name server addresses
ENVIRONMENT
LOCALRES file to use in place of /etc/resolv.conf LOCALDEF default environment file
AUTHOR
Steve Hotz (hotz@isi.edu)
ACKNOWLEDGMENTS
dig uses functions from nslookup(8) authored by Andrew Cherenson.
BUGS
dig has a serious case of "creeping featurism," the result of considering several potential uses during its development. It would probably benefit from a rigorous diet. Similarly, the print flags and granularity of the items they specify make evident their rather ad hoc genesis.
dig does not consistently exit nicely (with appropriate status) when a problem occurs somewhere in the resolver (Most of the common exit cases are handled.) This is particularly annoying when running in batch mode. If it exits abnormally (and is not caught), the entire batch aborts; when such an event is trapped, dig simply continues with the next query.
SEE ALSO
named(8), resolver(3), resolver(5), nslookup(8)
30 August 1990
dnsqueryQuery domain name servers using resolver
SYNOPSIS
dnsquery [-n nameserver] [-t type] [-c class] [-r retry] [-p retry period] [-d] [-s] [-v] host
DESCRIPTION
The dnsquery program is a general interface to nameservers via BIND resolver library calls. The program supports queries to the nameserver with an opcode of QUERY. This program is intended to be a replacement or supplement to programs like nstest, nsquery, and nslookup. All arguments except for host and ns are treated without case-sensitivity.
OPTIONS_n | The nameserver to be used in the query. Nameservers can appear as either Internet addresses of the form w.x.y.z or can appear as domain names. (default: as specified in /etc/resolv.conf) |
_t | The type of resource record of interest. Types include: |
Page 118
WKS Well-known service
HINFO Host information
MINFO Mailbox information
MX Mail exchange
RP Responsible person
MG Mail group member
AFSDB DCE or AFS server
ANY Wildcard
NOTE |
Any case may be used (the default is ANY) |
IN Internet
HS Hesiod
CHAOS Chaos
ANY Wildcard
NOTE |
Any case may be used (the default is IN). |
FILES
/etc/resolv.conf | To get the default ns and search lists. |
<arpa/nameser.h> | List of usable RR types and classes |
<resolv.h> | List of resolver flags |
SEE ALSO
nslookup(8), nstest(1), nsquery(1), named(8), resolver(5)
DIAGNOSTICS
If the resolver fails to answer the query and debugging has not been turned on, dnsquery will simply print a message like this:
Query failed (rc = 1) : Unknown host
The value of the return code is supplied by h_errno.