.\"
.hy 0
.ad l
+'\" t
.\" Title: dig
-.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
+.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: Jun 30, 2000
.\" Manual: BIND9
.\" Source: BIND9
+.\" Language: English
.\"
.TH "DIG" "1" "Jun 30, 2000" "BIND9" "BIND9"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
.SH "NAME"
dig \- DNS lookup utility
.SH "SYNOPSIS"
.SH "DESCRIPTION"
.PP
\fBdig\fR
-(domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use
+(domain information groper) is a flexible tool for interrogating DNS name servers\&. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried\&. Most DNS administrators use
\fBdig\fR
-to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than
-\fBdig\fR.
+to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output\&. Other lookup tools tend to have less functionality than
+\fBdig\fR\&.
.PP
Although
\fBdig\fR
-is normally used with command\-line arguments, it also has a batch mode of operation for reading lookup requests from a file. A brief summary of its command\-line arguments and options is printed when the
+is normally used with command\-line arguments, it also has a batch mode of operation for reading lookup requests from a file\&. A brief summary of its command\-line arguments and options is printed when the
\fB\-h\fR
-option is given. Unlike earlier versions, the BIND 9 implementation of
+option is given\&. Unlike earlier versions, the BIND 9 implementation of
\fBdig\fR
-allows multiple lookups to be issued from the command line.
+allows multiple lookups to be issued from the command line\&.
.PP
Unless it is told to query a specific name server,
\fBdig\fR
will try each of the servers listed in
-\fI/etc/resolv.conf\fR. If no usable server addreses are found,
+/etc/resolv\&.conf\&. If no usable server addreses are found,
\fBdig\fR
-will send the query to the local host.
+will send the query to the local host\&.
.PP
When no command line arguments or options are given,
\fBdig\fR
-will perform an NS query for "." (the root).
+will perform an NS query for "\&." (the root)\&.
.PP
It is possible to set per\-user defaults for
\fBdig\fR
via
-\fI${HOME}/.digrc\fR. This file is read and any options in it are applied before the command line arguments.
+${HOME}/\&.digrc\&. This file is read and any options in it are applied before the command line arguments\&.
.PP
-The IN and CH class names overlap with the IN and CH top level domains names. Either use the
+The IN and CH class names overlap with the IN and CH top level domains names\&. Either use the
\fB\-t\fR
and
\fB\-c\fR
options to specify the type and class, use the
\fB\-q\fR
-the specify the domain name, or use "IN." and "CH." when looking up these top level domains.
+the specify the domain name, or use "IN\&." and "CH\&." when looking up these top level domains\&.
.SH "SIMPLE USAGE"
.PP
A typical invocation of
\fBdig\fR
looks like:
.sp
+.if n \{\
.RS 4
+.\}
.nf
dig @server name type
.fi
+.if n \{\
.RE
+.\}
.sp
where:
.PP
\fBserver\fR
.RS 4
-is the name or IP address of the name server to query. This can be an IPv4 address in dotted\-decimal notation or an IPv6 address in colon\-delimited notation. When the supplied
+is the name or IP address of the name server to query\&. This can be an IPv4 address in dotted\-decimal notation or an IPv6 address in colon\-delimited notation\&. When the supplied
\fIserver\fR
argument is a hostname,
\fBdig\fR
-resolves that name before querying that name server.
+resolves that name before querying that name server\&.
.sp
If no
\fIserver\fR
argument is provided,
\fBdig\fR
consults
-\fI/etc/resolv.conf\fR; if an address is found there, it queries the name server at that address. If either of the
+/etc/resolv\&.conf; if an address is found there, it queries the name server at that address\&. If either of the
\fB\-4\fR
or
\fB\-6\fR
-options are in use, then only addresses for the corresponding transport will be tried. If no usable addresses are found,
+options are in use, then only addresses for the corresponding transport will be tried\&. If no usable addresses are found,
\fBdig\fR
-will send the query to the local host. The reply from the name server that responds is displayed.
+will send the query to the local host\&. The reply from the name server that responds is displayed\&.
.RE
.PP
\fBname\fR
.RS 4
-is the name of the resource record that is to be looked up.
+is the name of the resource record that is to be looked up\&.
.RE
.PP
\fBtype\fR
.RS 4
-indicates what type of query is required \(em ANY, A, MX, SIG, etc.
+indicates what type of query is required \(em ANY, A, MX, SIG, etc\&.
\fItype\fR
-can be any valid query type. If no
+can be any valid query type\&. If no
\fItype\fR
argument is supplied,
\fBdig\fR
-will perform a lookup for an A record.
+will perform a lookup for an A record\&.
.RE
.SH "OPTIONS"
.PP
The
\fB\-b\fR
option sets the source IP address of the query to
-\fIaddress\fR. This must be a valid address on one of the host's network interfaces or "0.0.0.0" or "::". An optional port may be specified by appending "#<port>"
+\fIaddress\fR\&. This must be a valid address on one of the host\*(Aqs network interfaces or "0\&.0\&.0\&.0" or "::"\&. An optional port may be specified by appending "#<port>"
.PP
The default query class (IN for internet) is overridden by the
\fB\-c\fR
-option.
+option\&.
\fIclass\fR
-is any valid class, such as HS for Hesiod records or CH for Chaosnet records.
+is any valid class, such as HS for Hesiod records or CH for Chaosnet records\&.
.PP
The
\fB\-f\fR
option makes
\fBdig \fR
operate in batch mode by reading a list of lookup requests to process from the file
-\fIfilename\fR. The file contains a number of queries, one per line. Each entry in the file should be organized in the same way they would be presented as queries to
+\fIfilename\fR\&. The file contains a number of queries, one per line\&. Each entry in the file should be organized in the same way they would be presented as queries to
\fBdig\fR
-using the command\-line interface.
+using the command\-line interface\&.
.PP
The
\fB\-m\fR
-option enables memory usage debugging.
+option enables memory usage debugging\&.
.PP
If a non\-standard port number is to be queried, the
\fB\-p\fR
-option is used.
+option is used\&.
\fIport#\fR
is the port number that
\fBdig\fR
-will send its queries instead of the standard DNS port number 53. This option would be used to test a name server that has been configured to listen for queries on a non\-standard port number.
+will send its queries instead of the standard DNS port number 53\&. This option would be used to test a name server that has been configured to listen for queries on a non\-standard port number\&.
.PP
The
\fB\-4\fR
option forces
\fBdig\fR
-to only use IPv4 query transport. The
+to only use IPv4 query transport\&. The
\fB\-6\fR
option forces
\fBdig\fR
-to only use IPv6 query transport.
+to only use IPv6 query transport\&.
.PP
The
\fB\-t\fR
option sets the query type to
-\fItype\fR. It can be any valid query type which is supported in BIND 9. The default query type is "A", unless the
+\fItype\fR\&. It can be any valid query type which is supported in BIND 9\&. The default query type is "A", unless the
\fB\-x\fR
-option is supplied to indicate a reverse lookup. A zone transfer can be requested by specifying a type of AXFR. When an incremental zone transfer (IXFR) is required,
+option is supplied to indicate a reverse lookup\&. A zone transfer can be requested by specifying a type of AXFR\&. When an incremental zone transfer (IXFR) is required,
\fItype\fR
is set to
-ixfr=N. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone's SOA record was
-\fIN\fR.
+ixfr=N\&. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone\*(Aqs SOA record was
+\fIN\fR\&.
.PP
The
\fB\-q\fR
option sets the query name to
-\fIname\fR. This useful do distinguish the
+\fIname\fR\&. This useful do distinguish the
\fIname\fR
-from other arguments.
+from other arguments\&.
.PP
Reverse lookups \(em mapping addresses to names \(em are simplified by the
\fB\-x\fR
-option.
+option\&.
\fIaddr\fR
-is an IPv4 address in dotted\-decimal notation, or a colon\-delimited IPv6 address. When this option is used, there is no need to provide the
+is an IPv4 address in dotted\-decimal notation, or a colon\-delimited IPv6 address\&. When this option is used, there is no need to provide the
\fIname\fR,
\fIclass\fR
and
\fItype\fR
-arguments.
+arguments\&.
\fBdig\fR
automatically performs a lookup for a name like
-11.12.13.10.in\-addr.arpa
-and sets the query type and class to PTR and IN respectively. By default, IPv6 addresses are looked up using nibble format under the IP6.ARPA domain. To use the older RFC1886 method using the IP6.INT domain specify the
+11\&.12\&.13\&.10\&.in\-addr\&.arpa
+and sets the query type and class to PTR and IN respectively\&. By default, IPv6 addresses are looked up using nibble format under the IP6\&.ARPA domain\&. To use the older RFC1886 method using the IP6\&.INT domain specify the
\fB\-i\fR
-option. Bit string labels (RFC2874) are now experimental and are not attempted.
+option\&. Bit string labels (RFC2874) are now experimental and are not attempted\&.
.PP
To sign the DNS queries sent by
\fBdig\fR
and their responses using transaction signatures (TSIG), specify a TSIG key file using the
\fB\-k\fR
-option. You can also specify the TSIG key itself on the command line using the
+option\&. You can also specify the TSIG key itself on the command line using the
\fB\-y\fR
option;
\fIhmac\fR
\fIname\fR
is the name of the TSIG key and
\fIkey\fR
-is the actual key. The key is a base\-64 encoded string, typically generated by
-\fBdnssec\-keygen\fR(8). Caution should be taken when using the
+is the actual key\&. The key is a base\-64 encoded string, typically generated by
+\fBdnssec-keygen\fR(8)\&. Caution should be taken when using the
\fB\-y\fR
option on multi\-user systems as the key can be visible in the output from
\fBps\fR(1)
-or in the shell's history file. When using TSIG authentication with
-\fBdig\fR, the name server that is queried needs to know the key and algorithm that is being used. In BIND, this is done by providing appropriate
+or in the shell\*(Aqs history file\&. When using TSIG authentication with
+\fBdig\fR, the name server that is queried needs to know the key and algorithm that is being used\&. In BIND, this is done by providing appropriate
\fBkey\fR
and
\fBserver\fR
statements in
-\fInamed.conf\fR.
+named\&.conf\&.
.SH "QUERY OPTIONS"
.PP
\fBdig\fR
-provides a number of query options which affect the way in which lookups are made and the results displayed. Some of these set or reset flag bits in the query header, some determine which sections of the answer get printed, and others determine the timeout and retry strategies.
+provides a number of query options which affect the way in which lookups are made and the results displayed\&. Some of these set or reset flag bits in the query header, some determine which sections of the answer get printed, and others determine the timeout and retry strategies\&.
.PP
-Each query option is identified by a keyword preceded by a plus sign (+). Some keywords set or reset an option. These may be preceded by the string
+Each query option is identified by a keyword preceded by a plus sign (+)\&. Some keywords set or reset an option\&. These may be preceded by the string
no
-to negate the meaning of that keyword. Other keywords assign values to options like the timeout interval. They have the form
-\fB+keyword=value\fR. The query options are:
+to negate the meaning of that keyword\&. Other keywords assign values to options like the timeout interval\&. They have the form
+\fB+keyword=value\fR\&. The query options are:
.PP
\fB+[no]tcp\fR
.RS 4
-Use [do not use] TCP when querying name servers. The default behavior is to use UDP unless an AXFR or IXFR query is requested, in which case a TCP connection is used.
+Use [do not use] TCP when querying name servers\&. The default behavior is to use UDP unless an AXFR or IXFR query is requested, in which case a TCP connection is used\&.
.RE
.PP
\fB+[no]vc\fR
.RS 4
-Use [do not use] TCP when querying name servers. This alternate syntax to
+Use [do not use] TCP when querying name servers\&. This alternate syntax to
\fI+[no]tcp\fR
-is provided for backwards compatibility. The "vc" stands for "virtual circuit".
+is provided for backwards compatibility\&. The "vc" stands for "virtual circuit"\&.
.RE
.PP
\fB+[no]ignore\fR
.RS 4
-Ignore truncation in UDP responses instead of retrying with TCP. By default, TCP retries are performed.
+Ignore truncation in UDP responses instead of retrying with TCP\&. By default, TCP retries are performed\&.
.RE
.PP
\fB+domain=somename\fR
\fIsomename\fR, as if specified in a
\fBdomain\fR
directive in
-\fI/etc/resolv.conf\fR, and enable search list processing as if the
+/etc/resolv\&.conf, and enable search list processing as if the
\fI+search\fR
-option were given.
+option were given\&.
.RE
.PP
\fB+[no]search\fR
.RS 4
Use [do not use] the search list defined by the searchlist or domain directive in
-\fIresolv.conf\fR
-(if any). The search list is not used by default.
+resolv\&.conf
+(if any)\&. The search list is not used by default\&.
.RE
.PP
\fB+[no]showsearch\fR
.RS 4
-Perform [do not perform] a search showing intermediate results.
+Perform [do not perform] a search showing intermediate results\&.
.RE
.PP
\fB+[no]defname\fR
.PP
\fB+[no]aaonly\fR
.RS 4
-Sets the "aa" flag in the query.
+Sets the "aa" flag in the query\&.
.RE
.PP
\fB+[no]aaflag\fR
.RS 4
A synonym for
-\fI+[no]aaonly\fR.
+\fI+[no]aaonly\fR\&.
.RE
.PP
\fB+[no]adflag\fR
.PP
\fB+[no]cdflag\fR
.RS 4
-Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses.
+Set [do not set] the CD (checking disabled) bit in the query\&. This requests the server to not perform DNSSEC validation of responses\&.
.RE
.PP
\fB+[no]cl\fR
.RS 4
-Display [do not display] the CLASS when printing the record.
+Display [do not display] the CLASS when printing the record\&.
.RE
.PP
\fB+[no]ttlid\fR
.RS 4
-Display [do not display] the TTL when printing the record.
+Display [do not display] the TTL when printing the record\&.
.RE
.PP
\fB+[no]recurse\fR
.RS 4
-Toggle the setting of the RD (recursion desired) bit in the query. This bit is set by default, which means
+Toggle the setting of the RD (recursion desired) bit in the query\&. This bit is set by default, which means
\fBdig\fR
-normally sends recursive queries. Recursion is automatically disabled when the
+normally sends recursive queries\&. Recursion is automatically disabled when the
\fI+nssearch\fR
or
\fI+trace\fR
-query options are used.
+query options are used\&.
.RE
.PP
\fB+[no]nssearch\fR
.RS 4
When this option is set,
\fBdig\fR
-attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone.
+attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone\&.
.RE
.PP
\fB+[no]trace\fR
.RS 4
-Toggle tracing of the delegation path from the root name servers for the name being looked up. Tracing is disabled by default. When tracing is enabled,
+Toggle tracing of the delegation path from the root name servers for the name being looked up\&. Tracing is disabled by default\&. When tracing is enabled,
\fBdig\fR
makes iterative queries to resolve the name being looked up. It will follow referrals from the root servers, showing the answer from each server that was used to resolve the lookup.
.RE
.RS 4
Toggles the printing of the initial comment in the output identifying the version of
\fBdig\fR
-and the query options that have been applied. This comment is printed by default.
+and the query options that have been applied\&. This comment is printed by default\&.
.RE
.PP
\fB+[no]short\fR
.RS 4
-Provide a terse answer. The default is to print the answer in a verbose form.
+Provide a terse answer\&. The default is to print the answer in a verbose form\&.
.RE
.PP
\fB+[no]identify\fR
.RS 4
Show [or do not show] the IP address and port number that supplied the answer when the
\fI+short\fR
-option is enabled. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer.
+option is enabled\&. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer\&.
.RE
.PP
\fB+[no]comments\fR
.RS 4
-Toggle the display of comment lines in the output. The default is to print comments.
+Toggle the display of comment lines in the output\&. The default is to print comments\&.
.RE
.PP
\fB+[no]stats\fR
.RS 4
-This query option toggles the printing of statistics: when the query was made, the size of the reply and so on. The default behavior is to print the query statistics.
+This query option toggles the printing of statistics: when the query was made, the size of the reply and so on\&. The default behavior is to print the query statistics\&.
.RE
.PP
\fB+[no]qr\fR
.RS 4
-Print [do not print] the query as it is sent. By default, the query is not printed.
+Print [do not print] the query as it is sent\&. By default, the query is not printed\&.
.RE
.PP
\fB+[no]question\fR
.RS 4
-Print [do not print] the question section of a query when an answer is returned. The default is to print the question section as a comment.
+Print [do not print] the question section of a query when an answer is returned\&. The default is to print the question section as a comment\&.
.RE
.PP
\fB+[no]answer\fR
.RS 4
-Display [do not display] the answer section of a reply. The default is to display it.
+Display [do not display] the answer section of a reply\&. The default is to display it\&.
.RE
.PP
\fB+[no]authority\fR
.RS 4
-Display [do not display] the authority section of a reply. The default is to display it.
+Display [do not display] the authority section of a reply\&. The default is to display it\&.
.RE
.PP
\fB+[no]additional\fR
.RS 4
-Display [do not display] the additional section of a reply. The default is to display it.
+Display [do not display] the additional section of a reply\&. The default is to display it\&.
.RE
.PP
\fB+[no]all\fR
.RS 4
-Set or clear all display flags.
+Set or clear all display flags\&.
.RE
.PP
\fB+time=T\fR
.RS 4
Sets the timeout for a query to
\fIT\fR
-seconds. The default timeout is 5 seconds. An attempt to set
+seconds\&. The default timeout is 5 seconds\&. An attempt to set
\fIT\fR
-to less than 1 will result in a query timeout of 1 second being applied.
+to less than 1 will result in a query timeout of 1 second being applied\&.
.RE
.PP
\fB+tries=T\fR
.RS 4
Sets the number of times to try UDP queries to server to
\fIT\fR
-instead of the default, 3. If
+instead of the default, 3\&. If
\fIT\fR
-is less than or equal to zero, the number of tries is silently rounded up to 1.
+is less than or equal to zero, the number of tries is silently rounded up to 1\&.
.RE
.PP
\fB+retry=T\fR
.RS 4
Sets the number of times to retry UDP queries to server to
\fIT\fR
-instead of the default, 2. Unlike
-\fI+tries\fR, this does not include the initial query.
+instead of the default, 2\&. Unlike
+\fI+tries\fR, this does not include the initial query\&.
.RE
.PP
\fB+ndots=D\fR
\fIname\fR
to
\fID\fR
-for it to be considered absolute. The default value is that defined using the ndots statement in
-\fI/etc/resolv.conf\fR, or 1 if no ndots statement is present. Names with fewer dots are interpreted as relative names and will be searched for in the domains listed in the
+for it to be considered absolute\&. The default value is that defined using the ndots statement in
+/etc/resolv\&.conf, or 1 if no ndots statement is present\&. Names with fewer dots are interpreted as relative names and will be searched for in the domains listed in the
\fBsearch\fR
or
\fBdomain\fR
directive in
-\fI/etc/resolv.conf\fR.
+/etc/resolv\&.conf\&.
.RE
.PP
\fB+bufsize=B\fR
.RS 4
Set the UDP message buffer size advertised using EDNS0 to
\fIB\fR
-bytes. The maximum and minimum sizes of this buffer are 65535 and 0 respectively. Values outside this range are rounded up or down appropriately. Values other than zero will cause a EDNS query to be sent.
+bytes\&. The maximum and minimum sizes of this buffer are 65535 and 0 respectively\&. Values outside this range are rounded up or down appropriately\&. Values other than zero will cause a EDNS query to be sent\&.
.RE
.PP
\fB+edns=#\fR
.RS 4
-Specify the EDNS version to query with. Valid values are 0 to 255. Setting the EDNS version will cause a EDNS query to be sent.
+Specify the EDNS version to query with\&. Valid values are 0 to 255\&. Setting the EDNS version will cause a EDNS query to be sent\&.
\fB+noedns\fR
clears the remembered EDNS version.
.RE
.PP
\fB+[no]multiline\fR
.RS 4
-Print records like the SOA records in a verbose multi\-line format with human\-readable comments. The default is to print each record on a single line, to facilitate machine parsing of the
+Print records like the SOA records in a verbose multi\-line format with human\-readable comments\&. The default is to print each record on a single line, to facilitate machine parsing of the
\fBdig\fR
-output.
+output\&.
.RE
.PP
\fB+[no]fail\fR
.RS 4
-Do not try the next server if you receive a SERVFAIL. The default is to not try the next server which is the reverse of normal stub resolver behavior.
+Do not try the next server if you receive a SERVFAIL\&. The default is to not try the next server which is the reverse of normal stub resolver behavior\&.
.RE
.PP
\fB+[no]besteffort\fR
.RS 4
-Attempt to display the contents of messages which are malformed. The default is to not display malformed answers.
+Attempt to display the contents of messages which are malformed\&. The default is to not display malformed answers\&.
.RE
.PP
\fB+[no]dnssec\fR
.RS 4
-Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query.
+Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query\&.
.RE
.PP
\fB+[no]sigchase\fR
.RS 4
-Chase DNSSEC signature chains. Requires dig be compiled with \-DDIG_SIGCHASE.
+Chase DNSSEC signature chains\&. Requires dig be compiled with \-DDIG_SIGCHASE\&.
.RE
.PP
\fB+trusted\-key=####\fR
.RS 4
Specifies a file containing trusted keys to be used with
-\fB+sigchase\fR. Each DNSKEY record must be on its own line.
+\fB+sigchase\fR\&. Each DNSKEY record must be on its own line\&.
.sp
If not specified,
\fBdig\fR
will look for
-\fI/etc/trusted\-key.key\fR
+/etc/trusted\-key\&.key
then
-\fItrusted\-key.key\fR
-in the current directory.
+trusted\-key\&.key
+in the current directory\&.
.sp
-Requires dig be compiled with \-DDIG_SIGCHASE.
+Requires dig be compiled with \-DDIG_SIGCHASE\&.
.RE
.PP
\fB+[no]topdown\fR
.RS 4
-When chasing DNSSEC signature chains perform a top\-down validation. Requires dig be compiled with \-DDIG_SIGCHASE.
+When chasing DNSSEC signature chains perform a top\-down validation\&. Requires dig be compiled with \-DDIG_SIGCHASE\&.
.RE
.PP
\fB+[no]nsid\fR
.RS 4
-Include an EDNS name server ID request when sending a query.
+Include an EDNS name server ID request when sending a query\&.
+.RE
+.PP
+\fB+[no]keepopen\fR
+.RS 4
+Keep the TCP socket open between queries and reuse it rather than creating a new TCP socket for each lookup\&. The default is
+\fB+nokeepopen\fR\&.
.RE
.SH "MULTIPLE QUERIES"
.PP
\fBdig \fR
supports specifying multiple queries on the command line (in addition to supporting the
\fB\-f\fR
-batch file option). Each of those queries can be supplied with its own set of flags, options and query options.
+batch file option)\&. Each of those queries can be supplied with its own set of flags, options and query options\&.
.PP
In this case, each
\fIquery\fR
-argument represent an individual query in the command\-line syntax described above. Each consists of any of the standard options and flags, the name to be looked up, an optional query type and class and any query options that should be applied to that query.
+argument represent an individual query in the command\-line syntax described above\&. Each consists of any of the standard options and flags, the name to be looked up, an optional query type and class and any query options that should be applied to that query\&.
.PP
-A global set of query options, which should be applied to all queries, can also be supplied. These global query options must precede the first tuple of name, class, type, options, flags, and query options supplied on the command line. Any global query options (except the
+A global set of query options, which should be applied to all queries, can also be supplied\&. These global query options must precede the first tuple of name, class, type, options, flags, and query options supplied on the command line\&. Any global query options (except the
\fB+[no]cmd\fR
-option) can be overridden by a query\-specific set of query options. For example:
+option) can be overridden by a query\-specific set of query options\&. For example:
.sp
+.if n \{\
.RS 4
+.\}
.nf
-dig +qr www.isc.org any \-x 127.0.0.1 isc.org ns +noqr
+dig +qr www\&.isc\&.org any \-x 127\&.0\&.0\&.1 isc\&.org ns +noqr
.fi
+.if n \{\
.RE
+.\}
.sp
shows how
\fBdig\fR
could be used from the command line to make three lookups: an ANY query for
-www.isc.org, a reverse lookup of 127.0.0.1 and a query for the NS records of
-isc.org. A global query option of
+www\&.isc\&.org, a reverse lookup of 127\&.0\&.0\&.1 and a query for the NS records of
+isc\&.org\&. A global query option of
\fI+qr\fR
is applied, so that
\fBdig\fR
-shows the initial query it made for each lookup. The final query has a local query option of
+shows the initial query it made for each lookup\&. The final query has a local query option of
\fI+noqr\fR
which means that
\fBdig\fR
will not print the initial query when it looks up the NS records for
-isc.org.
+isc\&.org\&.
.SH "IDN SUPPORT"
.PP
If
\fBdig\fR
-has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names.
+has been built with IDN (internationalized domain name) support, it can accept and display non\-ASCII domain names\&.
\fBdig\fR
-appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server. If you'd like to turn off the IDN support for some reason, defines the
+appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server\&. If you\*(Aqd like to turn off the IDN support for some reason, defines the
\fBIDN_DISABLE\fR
-environment variable. The IDN support is disabled if the variable is set when
+environment variable\&. The IDN support is disabled if the variable is set when
\fBdig\fR
-runs.
+runs\&.
.SH "FILES"
.PP
-\fI/etc/resolv.conf\fR
+/etc/resolv\&.conf
.PP
-\fI${HOME}/.digrc\fR
+${HOME}/\&.digrc
.SH "SEE ALSO"
.PP
\fBhost\fR(1),
\fBnamed\fR(8),
-\fBdnssec\-keygen\fR(8),
-RFC1035.
+\fBdnssec-keygen\fR(8),
+RFC1035\&.
.SH "BUGS"
.PP
-There are probably too many query options.
+There are probably too many query options\&.
.SH "COPYRIGHT"
Copyright \(co 2004\-2009, 2012, 2013 Internet Systems Consortium, Inc. ("ISC")
.br
-Copyright \(co 2000\-2003 Internet Software Consortium.
+Copyright \(co 2004-2011, 2013 Internet Systems Consortium, Inc. ("ISC")
+.br
+Copyright \(co 2000-2003 Internet Software Consortium.
.br
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>dig</title>
-<meta name="generator" content="DocBook XSL Stylesheets V1.71.1">
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en">
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
<a name="man.dig"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
(domain information groper) is a flexible tool
for interrogating DNS name servers. It performs DNS lookups and
displays the answers that are returned from the name server(s) that
- were queried. Most DNS administrators use <span><strong class="command">dig</strong></span> to
+ were queried. Most DNS administrators use <span class="command"><strong>dig</strong></span> to
troubleshoot DNS problems because of its flexibility, ease of use and
clarity of output. Other lookup tools tend to have less functionality
- than <span><strong class="command">dig</strong></span>.
+ than <span class="command"><strong>dig</strong></span>.
</p>
<p>
- Although <span><strong class="command">dig</strong></span> is normally used with
+ Although <span class="command"><strong>dig</strong></span> is normally used with
command-line
arguments, it also has a batch mode of operation for reading lookup
requests from a file. A brief summary of its command-line arguments
and options is printed when the <code class="option">-h</code> option is given.
Unlike earlier versions, the BIND 9 implementation of
- <span><strong class="command">dig</strong></span> allows multiple lookups to be issued
+ <span class="command"><strong>dig</strong></span> allows multiple lookups to be issued
from the
command line.
</p>
<p>
Unless it is told to query a specific name server,
- <span><strong class="command">dig</strong></span> will try each of the servers listed in
+ <span class="command"><strong>dig</strong></span> will try each of the servers listed in
<code class="filename">/etc/resolv.conf</code>. If no usable server addreses
- are found, <span><strong class="command">dig</strong></span> will send the query to the local
+ are found, <span class="command"><strong>dig</strong></span> will send the query to the local
host.
</p>
<p>
When no command line arguments or options are given,
- <span><strong class="command">dig</strong></span> will perform an NS query for "." (the root).
+ <span class="command"><strong>dig</strong></span> will perform an NS query for "." (the root).
</p>
<p>
- It is possible to set per-user defaults for <span><strong class="command">dig</strong></span> via
+ It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via
<code class="filename">${HOME}/.digrc</code>. This file is read and
any options in it
are applied before the command line arguments.
<div class="refsect1" lang="en">
<a name="id2543604"></a><h2>SIMPLE USAGE</h2>
<p>
- A typical invocation of <span><strong class="command">dig</strong></span> looks like:
+ A typical invocation of <span class="command"><strong>dig</strong></span> looks like:
</p>
<pre class="programlisting"> dig @server name type </pre>
<p>
where:
</p>
-<div class="variablelist"><dl>
+<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="constant">server</code></span></dt>
<dd>
<p>
can be an IPv4 address in dotted-decimal notation or an IPv6
address in colon-delimited notation. When the supplied
<em class="parameter"><code>server</code></em> argument is a hostname,
- <span><strong class="command">dig</strong></span> resolves that name before querying
+ <span class="command"><strong>dig</strong></span> resolves that name before querying
that name server.
</p>
<p>
If no <em class="parameter"><code>server</code></em> argument is
- provided, <span><strong class="command">dig</strong></span> consults
+ provided, <span class="command"><strong>dig</strong></span> consults
<code class="filename">/etc/resolv.conf</code>; if an
address is found there, it queries the name server at
that address. If either of the <code class="option">-4</code> or
<code class="option">-6</code> options are in use, then
only addresses for the corresponding transport
will be tried. If no usable addresses are found,
- <span><strong class="command">dig</strong></span> will send the query to the
+ <span class="command"><strong>dig</strong></span> will send the query to the
local host. The reply from the name server that
responds is displayed.
</p>
<em class="parameter"><code>type</code></em> can be any valid query
type. If no
<em class="parameter"><code>type</code></em> argument is supplied,
- <span><strong class="command">dig</strong></span> will perform a lookup for an
+ <span class="command"><strong>dig</strong></span> will perform a lookup for an
A record.
</p></dd>
</dl></div>
class, such as HS for Hesiod records or CH for Chaosnet records.
</p>
<p>
- The <code class="option">-f</code> option makes <span><strong class="command">dig </strong></span>
+ The <code class="option">-f</code> option makes <span class="command"><strong>dig </strong></span>
operate
in batch mode by reading a list of lookup requests to process from the
file <em class="parameter"><code>filename</code></em>. The file contains a
number of
queries, one per line. Each entry in the file should be organized in
the same way they would be presented as queries to
- <span><strong class="command">dig</strong></span> using the command-line interface.
+ <span class="command"><strong>dig</strong></span> using the command-line interface.
</p>
<p>
The <code class="option">-m</code> option enables memory usage debugging.
<p>
If a non-standard port number is to be queried, the
<code class="option">-p</code> option is used. <em class="parameter"><code>port#</code></em> is
- the port number that <span><strong class="command">dig</strong></span> will send its
+ the port number that <span class="command"><strong>dig</strong></span> will send its
queries
instead of the standard DNS port number 53. This option would be used
to test a name server that has been configured to listen for queries
on a non-standard port number.
</p>
<p>
- The <code class="option">-4</code> option forces <span><strong class="command">dig</strong></span>
+ The <code class="option">-4</code> option forces <span class="command"><strong>dig</strong></span>
to only
use IPv4 query transport. The <code class="option">-6</code> option forces
- <span><strong class="command">dig</strong></span> to only use IPv6 query transport.
+ <span class="command"><strong>dig</strong></span> to only use IPv6 query transport.
</p>
<p>
The <code class="option">-t</code> option sets the query type to
address in dotted-decimal notation, or a colon-delimited IPv6 address.
When this option is used, there is no need to provide the
<em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em> and
- <em class="parameter"><code>type</code></em> arguments. <span><strong class="command">dig</strong></span>
+ <em class="parameter"><code>type</code></em> arguments. <span class="command"><strong>dig</strong></span>
automatically performs a lookup for a name like
<code class="literal">11.12.13.10.in-addr.arpa</code> and sets the
query type and
are now experimental and are not attempted.
</p>
<p>
- To sign the DNS queries sent by <span><strong class="command">dig</strong></span> and
+ To sign the DNS queries sent by <span class="command"><strong>dig</strong></span> and
their
responses using transaction signatures (TSIG), specify a TSIG key file
using the <code class="option">-k</code> option. You can also specify the TSIG
multi-user systems as the key can be visible in the output from
<span class="citerefentry"><span class="refentrytitle">ps</span>(1)</span>
or in the shell's history file. When
- using TSIG authentication with <span><strong class="command">dig</strong></span>, the name
+ using TSIG authentication with <span class="command"><strong>dig</strong></span>, the name
server that is queried needs to know the key and algorithm that is
being used. In BIND, this is done by providing appropriate
- <span><strong class="command">key</strong></span> and <span><strong class="command">server</strong></span> statements in
+ <span class="command"><strong>key</strong></span> and <span class="command"><strong>server</strong></span> statements in
<code class="filename">named.conf</code>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2544056"></a><h2>QUERY OPTIONS</h2>
<p><span><strong class="command">dig</strong></span>
- provides a number of query options which affect
the way in which lookups are made and the results displayed. Some of
these set or reset flag bits in the query header, some determine which
sections of the answer get printed, and others determine the timeout
The query options are:
</p>
-<div class="variablelist"><dl>
+<div class="variablelist"><dl class="variablelist">
<dt><span class="term"><code class="option">+[no]tcp</code></span></dt>
<dd><p>
Use [do not use] TCP when querying name servers. The default
Set the search list to contain the single domain
<em class="parameter"><code>somename</code></em>, as if specified in
a
- <span><strong class="command">domain</strong></span> directive in
+ <span class="command"><strong>domain</strong></span> directive in
<code class="filename">/etc/resolv.conf</code>, and enable
search list
processing as if the <em class="parameter"><code>+search</code></em>
</p></dd>
<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
<dd><p>
- When this option is set, <span><strong class="command">dig</strong></span>
+ When this option is set, <span class="command"><strong>dig</strong></span>
attempts to find the
authoritative name servers for the zone containing the name
being
<dd><p>
Toggles the printing of the initial comment in the output
identifying
- the version of <span><strong class="command">dig</strong></span> and the query
+ the version of <span class="command"><strong>dig</strong></span> and the query
options that have
been applied. This comment is printed by default.
</p></dd>
Print records like the SOA records in a verbose multi-line
format with human-readable comments. The default is to print
each record on a single line, to facilitate machine parsing
- of the <span><strong class="command">dig</strong></span> output.
+ of the <span class="command"><strong>dig</strong></span> output.
</p></dd>
<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
<dd><p>
on its own line.
</p>
<p>
- If not specified, <span><strong class="command">dig</strong></span> will look for
+ If not specified, <span class="command"><strong>dig</strong></span> will look for
<code class="filename">/etc/trusted-key.key</code> then
<code class="filename">trusted-key.key</code> in the current directory.
</p>
<dd><p>
Include an EDNS name server ID request when sending a query.
</p></dd>
+<dt><span class="term"><code class="option">+[no]keepopen</code></span></dt>
+<dd><p>
+ Keep the TCP socket open between queries and reuse it rather
+ than creating a new TCP socket for each lookup. The default
+ is <code class="option">+nokeepopen</code>.
+ </p></dd>
</dl></div>
<p>
<div class="refsect1" lang="en">
<a name="id2545191"></a><h2>MULTIPLE QUERIES</h2>
<p>
- The BIND 9 implementation of <span><strong class="command">dig </strong></span>
+ The BIND 9 implementation of <span class="command"><strong>dig </strong></span>
supports
specifying multiple queries on the command line (in addition to
supporting the <code class="option">-f</code> batch file option). Each of those
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
</pre>
<p>
- shows how <span><strong class="command">dig</strong></span> could be used from the
+ shows how <span class="command"><strong>dig</strong></span> could be used from the
command line
to make three lookups: an ANY query for <code class="literal">www.isc.org</code>, a
reverse lookup of 127.0.0.1 and a query for the NS records of
A global query option of <em class="parameter"><code>+qr</code></em> is
applied, so
- that <span><strong class="command">dig</strong></span> shows the initial query it made
+ that <span class="command"><strong>dig</strong></span> shows the initial query it made
for each
lookup. The final query has a local query option of
- <em class="parameter"><code>+noqr</code></em> which means that <span><strong class="command">dig</strong></span>
+ <em class="parameter"><code>+noqr</code></em> which means that <span class="command"><strong>dig</strong></span>
will not print the initial query when it looks up the NS records for
<code class="literal">isc.org</code>.
</p>
<div class="refsect1" lang="en">
<a name="id2545253"></a><h2>IDN SUPPORT</h2>
<p>
- If <span><strong class="command">dig</strong></span> has been built with IDN (internationalized
+ If <span class="command"><strong>dig</strong></span> has been built with IDN (internationalized
domain name) support, it can accept and display non-ASCII domain names.
- <span><strong class="command">dig</strong></span> appropriately converts character encoding of
+ <span class="command"><strong>dig</strong></span> appropriately converts character encoding of
domain name before sending a request to DNS server or displaying a
reply from the server.
If you'd like to turn off the IDN support for some reason, defines
the <code class="envar">IDN_DISABLE</code> environment variable.
The IDN support is disabled if the variable is set when
- <span><strong class="command">dig</strong></span> runs.
+ <span class="command"><strong>dig</strong></span> runs.
</p>
</div>
<div class="refsect1" lang="en">