-->
Page 114
query-type | The type of information (DNS query type) that you are requesting. If omitted, the default is a (T_A = address). The following types are recognized: |
Type | Example | Description |
a | T_A | Network address |
any | T_ANY | All/any information about specified domain |
mx | T_MX | Mail exchanger for the domain |
ns | T_NS | Name servers |
soa | T_SOA | Zone of authority record |
hinfo | T_HINFO | Host information |
axfr | T_AXFR | Zone transfer (must ask an authoritative server) |
txt | T_TXT | Arbitrary number of strings |
(See RFC 1035 for the complete list.)
query-class | The network class requested in the query. If omitted, the default is in (C_IN = Internet). The following classes are recognized: |
in | C_IN | Internet class domain |
any | C_ANY | All/any class information |
(See RFC 1035 for the complete list.)
NOTE |
any can be used to specify a class and/or a type of query. dig will parse the first occurrence of any to mean query-type = T_ANY. |
OTHER OPTIONS
%ignored-comment | % is used to include an argument that is simply not parsed. This may be useful if running dig in batch mode. Instead of resolving every @server-domain-name in a list of queries, you can avoid the overhead of doing so, and still have the domain name on the command line as a reference. Example: dig @128.9.0.32 %venera.isi.edu mx isi.edu |
_<dig option> | _ is used to specify an option that affects the operation of dig. The following options are currently available (although not guaranteed to be useful): |
_x dot-notation-address | Convenient form to specify inverse address mapping. Instead of dig 32.0.9.128.in-addr.arpa one can simply use dig -x 128.9.0.32 |
_f file | File for dig batch mode. The file contains a list of query specifications (dig command lines) which are to be executed successively. Lines beginning with ;, #, or \n are ignored. Other options may still appear on the command line, and will be in effect for each batch query. |
_T time | Time in seconds between start of successive queries when running in batch mode. Can be used to keep two or more batch dig commands running roughly in sync. Default is zero. |
Page 115
_p port | Port number. Query a name server listening to a nonstandard port number. Default is 53. |
_P[ping-string] | After query returns, execute a ping(8) command for response time comparison. This rather unelegantly makes a call to the shell. The last three lines of statistics is printed for the command: |
ping _s server_name 56 3 | If the optional ping string is present, it replaces ping _s in the shell command. |
_t query-type | Specify type of query. May specify either an integer value to be included in the type field or use the abbreviated mnemonic as discussed earlier (mx = T_MX). |
_c query-class | Specify class of query. May specify either an integer value to be included in the class field or use the abbreviated mnemonic as discussed earlier (in = C_IN). |
_envsav | This flag specifies that the dig environment (defaults, print options, and so on), after all of the arguments are parsed, should be saved to a file to become the default environment. Useful if you do not like the standard set of defaults and do not desire to include a large number of options each time dig is used. The environment consists of resolver state variable flags, timeout, and retries as well as the flags detailing dig output (see below). If the shell environment variable LOCALDEF is set to the name of a file, this is where the default dig environment is saved. If not, the file DiG.env is created in the current working directory. |
NOTE |
LOCALDEF is specific to the dig resolver, and will not affect operation of the standard resolver library. |
Each time dig is executed, it looks for ./DiG.env or the file specified by the shell environment variable LOCALDEF. If such file exists and is readable, then the environment is restored from this file before any arguments are parsed. | |
_envset | This flag only affects batch query runs. When _envset is specified on a line in a dig batch file, the dig environment after the arguments are parsed, becomes the default environment for the duration of the batch file, or until the next line which specifies _envset. |
_[no]stick | This flag only affects batch query runs. It specifies that the dig environment (as read initially or set by _envset switch) is to be restored before each query (line) in a dig batch file. The default _nostick means that the dig environment does not stick, hence options specified on a single line in a dig batch file will remain in effect for subsequent lines (that is, they are not restored to the sticky default). |
+<query option> | + is used to specify an option to be changed in the query packet or to change dig output specifics. Many of these are the same parameters accepted by nslookup(8). If an option requires a parameter, the form is as follows: +keyword[=value] Most keywords can be abbreviated. Parsing of the + options is very simplistica value must not be separated from its keyword by whitespace. The following keywords are currently available: |
Keyword Abbreviation | Meaning (Default) |
[no]debug (deb) | Turn on/off debugging mode[deb] |
[no]d2 | Turn on/off extra debugging mode[nod2] |
[no]recurse (rec) | Use/don't use recursive lookup[rec] |
retry=# (ret) | Set number of retries to # [4] |
continues