dig.html revision 3970098dcd2a7122541667b4b56cea8abce8ccf2
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews<!--
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Copyright (C) 2000, 2001 Internet Software Consortium.
32098293b78922a5fbd10906afa28624820d3756Tinderbox User -
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Permission to use, copy, modify, and distribute this software for any
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - purpose with or without fee is hereby granted, provided that the above
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User - copyright notice and this permission notice appear in all copies.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User -
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein-->
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User<HTML
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><HEAD
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><TITLE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>dig</TITLE
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><META
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox UserNAME="GENERATOR"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONTENT="Modular DocBook HTML Stylesheet Version 1.73
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein"></HEAD
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><BODY
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REFENTRY"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBGCOLOR="#FFFFFF"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTEXT="#000000"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinLINK="#0000FF"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinVLINK="#840084"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinALINK="#0000FF"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><H1
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User><A
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserNAME="AEN1"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User>dig</A
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt></H1
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><DIV
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="REFNAMEDIV"
0b89eee6167201843c9a46b7e7c63cb1e4e09ba3Tinderbox User><A
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntNAME="AEN8"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt></A
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><H2
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>Name</H2
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User>dig&nbsp;--&nbsp;DNS lookup utility</DIV
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User><DIV
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCLASS="REFSYNOPSISDIV"
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User><A
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserNAME="AEN11"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt></A
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><H2
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt>Synopsis</H2
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><P
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><B
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCLASS="COMMAND"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>dig</B
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User> [@server] [<TT
f9ce6280cec79deb16ff6d9807aa493ff23e10d9Tinderbox UserCLASS="OPTION"
0b89eee6167201843c9a46b7e7c63cb1e4e09ba3Tinderbox User>-b <TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="REPLACEABLE"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User><I
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt>address</I
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt></TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User></TT
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User>] [<TT
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox UserCLASS="OPTION"
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User>-c <TT
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox UserCLASS="REPLACEABLE"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><I
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>class</I
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User></TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User></TT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt>] [<TT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCLASS="OPTION"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>-f <TT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCLASS="REPLACEABLE"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User><I
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt>filename</I
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt></TT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt></TT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt>] [<TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="OPTION"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>-k <TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="REPLACEABLE"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><I
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>filename</I
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User></TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User></TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>] [<TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="OPTION"
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>-p <TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="REPLACEABLE"
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User><I
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User>port#</I
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User></TT
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User></TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>] [<TT
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox UserCLASS="OPTION"
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User>-t <TT
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox UserCLASS="REPLACEABLE"
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User><I
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>type</I
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User></TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User></TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>] [<TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="OPTION"
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>-x <TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="REPLACEABLE"
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User><I
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>addr</I
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User></TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User></TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User>] [<TT
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="OPTION"
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User>-y <TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="REPLACEABLE"
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User><I
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User>name:key</I
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User></TT
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User></TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>] [name] [type] [class] [queryopt...]</P
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User><P
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User><B
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox UserCLASS="COMMAND"
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User>dig</B
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User> [<TT
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox UserCLASS="OPTION"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>-h</TT
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User>]</P
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User><P
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User><B
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox UserCLASS="COMMAND"
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User>dig</B
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User> [global-queryopt...] [query...]</P
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User></DIV
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User><DIV
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox UserCLASS="REFSECT1"
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User><A
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox UserNAME="AEN51"
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User></A
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User><H2
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>DESCRIPTION</H2
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User><P
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User><B
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox UserCLASS="COMMAND"
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User>dig</B
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User> (domain information groper) is a flexible tool
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox Userfor interrogating DNS name servers. It performs DNS lookups and
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox Userdisplays the answers that are returned from the name server(s) that
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox Userwere queried. Most DNS administrators use <B
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox UserCLASS="COMMAND"
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User>dig</B
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User> to
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox Usertroubleshoot DNS problems because of its flexibility, ease of use and
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntclarity of output. Other lookup tools tend to have less functionality
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox Userthan <B
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox UserCLASS="COMMAND"
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User>dig</B
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User>.</P
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User><P
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User>Although <B
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox UserCLASS="COMMAND"
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox User>dig</B
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User> is normally used with command-line
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userarguments, it also has a batch mode of operation for reading lookup
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox Userrequests from a file. A brief summary of its command-line arguments
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox Userand options is printed when the <TT
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox UserCLASS="OPTION"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>-h</TT
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User> option is given.
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox UserUnlike earlier versions, the BIND9 implementation of
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User<B
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox UserCLASS="COMMAND"
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User>dig</B
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User> allows multiple lookups to be issued from the
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox Usercommand line.</P
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User><P
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User>Unless it is told to query a specific name server,
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User<B
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="COMMAND"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>dig</B
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User> will try each of the servers listed in
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<TT
d253648fe3331622cebea02d60aaecca3082d78dTinderbox UserCLASS="FILENAME"
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User>/etc/resolv.conf</TT
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User>.</P
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User><P
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User>When no command line arguments or options are given, will perform an
d253648fe3331622cebea02d60aaecca3082d78dTinderbox UserNS query for "." (the root).</P
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User><P
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User>It is possible to set per-user defaults for <B
d253648fe3331622cebea02d60aaecca3082d78dTinderbox UserCLASS="COMMAND"
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User>dig</B
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User> via
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User<TT
d253648fe3331622cebea02d60aaecca3082d78dTinderbox UserCLASS="FILENAME"
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User>${HOME}/.digrc</TT
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User>. This file is read and any options in it
d253648fe3331622cebea02d60aaecca3082d78dTinderbox Userare applied before the command line arguments.</P
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User></DIV
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User><DIV
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCLASS="REFSECT1"
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User><A
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox UserNAME="AEN68"
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User></A
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User><H2
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User>SIMPLE USAGE</H2
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User><P
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User>A typical invocation of <B
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCLASS="COMMAND"
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User>dig</B
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User> looks like:
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User<PRE
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCLASS="PROGRAMLISTING"
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User> dig @server name type </PRE
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User> where:
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User<P
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User></P
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User><DIV
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox UserCLASS="VARIABLELIST"
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User><DL
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User><DT
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User><TT
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCLASS="CONSTANT"
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User>server</TT
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User></DT
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User><DD
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><P
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User>is the name or IP address of the name server to query. This can be an IPv4
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox Useraddress in dotted-decimal notation or an IPv6
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox Useraddress in colon-delimited notation. When the supplied
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User<TT
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox UserCLASS="PARAMETER"
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User><I
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User>server</I
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User></TT
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User> argument is a hostname,
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User<B
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox UserCLASS="COMMAND"
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User>dig</B
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User> resolves that name before querying that name
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox Userserver. If no <TT
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox UserCLASS="PARAMETER"
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User><I
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User>server</I
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User></TT
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User> argument is provided,
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User<B
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox UserCLASS="COMMAND"
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User>dig</B
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User> consults <TT
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox UserCLASS="FILENAME"
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User>/etc/resolv.conf</TT
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User>
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox Userand queries the name servers listed there. The reply from the name
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox Userserver that responds is displayed.</P
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User></DD
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User><DT
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User><TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="CONSTANT"
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User>name</TT
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User></DT
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User><DD
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User><P
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User>is the name of the resource record that is to be looked up.</P
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User></DD
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User><DT
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User><TT
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox UserCLASS="CONSTANT"
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User>type</TT
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User></DT
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User><DD
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User><P
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User>indicates what type of query is required &mdash;
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox UserANY, A, MX, SIG, etc.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User<TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="PARAMETER"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User><I
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt>type</I
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User></TT
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User> can be any valid query type. If no
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User<TT
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox UserCLASS="PARAMETER"
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User><I
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User>type</I
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User></TT
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User> argument is supplied,
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User<B
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox UserCLASS="COMMAND"
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User>dig</B
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User> will perform a lookup for an A record.</P
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User></DD
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User></DL
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User></DIV
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User></P
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User></DIV
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User><DIV
8c7245514646663b25d8b186186ebede41903fa3Tinderbox UserCLASS="REFSECT1"
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User><A
421ba11f3f07cbcb12c288ef7f4e7bad13fcc28fTinderbox UserNAME="AEN97"
421ba11f3f07cbcb12c288ef7f4e7bad13fcc28fTinderbox User></A
421ba11f3f07cbcb12c288ef7f4e7bad13fcc28fTinderbox User><H2
421ba11f3f07cbcb12c288ef7f4e7bad13fcc28fTinderbox User>OPTIONS</H2
421ba11f3f07cbcb12c288ef7f4e7bad13fcc28fTinderbox User><P
421ba11f3f07cbcb12c288ef7f4e7bad13fcc28fTinderbox User>The <TT
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox UserCLASS="OPTION"
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User>-b</TT
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox User> option sets the source IP address of the query
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox Userto <TT
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox UserCLASS="PARAMETER"
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox User><I
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox User>address</I
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox User></TT
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User>. This must be a valid address on
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox Userone of the host's network interfaces or "0.0.0.0" or "::". An optional port
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox Usermay be specified by appending "#&lt;port&gt;"</P
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox User><P
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox User>The default query class (IN for internet) is overridden by the
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox User<TT
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox UserCLASS="OPTION"
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox User>-c</TT
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox User> option. <TT
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox UserCLASS="PARAMETER"
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User><I
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User>class</I
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User></TT
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User> is any valid
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox Userclass, such as HS for Hesiod records or CH for CHAOSNET records.</P
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User><P
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User>The <TT
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox UserCLASS="OPTION"
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User>-f</TT
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User> option makes <B
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox UserCLASS="COMMAND"
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User>dig </B
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User> operate
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox Userin batch mode by reading a list of lookup requests to process from the
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox Userfile <TT
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox UserCLASS="PARAMETER"
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox User><I
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox User>filename</I
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox User></TT
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox User>. The file contains a number of
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox Userqueries, one per line. Each entry in the file should be organised in
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox Userthe same way they would be presented as queries to
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox User<B
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox UserCLASS="COMMAND"
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User>dig</B
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User> using the command-line interface.</P
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User><P
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User>If a non-standard port number is to be queried, the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt<TT
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="OPTION"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt>-p</TT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt> option is used. <TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="PARAMETER"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><I
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>port#</I
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User></TT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt> is
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntthe port number that <B
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="COMMAND"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>dig</B
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt> will send its queries
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntinstead of the standard DNS port number 53. This option would be used
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntto test a name server that has been configured to listen for queries
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Useron a non-standard port number.</P
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt><P
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>The <TT
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCLASS="OPTION"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>-t</TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> option sets the query type to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="PARAMETER"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>type</I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>. It can be any valid query type which is
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewssupported in BIND9. The default query type "A", unless the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>-x</TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> option is supplied to indicate a reverse lookup.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinA zone transfer can be requested by specifying a type of AXFR. When
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox Useran incremental zone transfer (IXFR) is required,
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User<TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="PARAMETER"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein><I
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>type</I
0b89eee6167201843c9a46b7e7c63cb1e4e09ba3Tinderbox User></TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> is set to <TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="LITERAL"
>ixfr=N</TT
>.
The incremental zone transfer will contain the changes made to the zone
since the serial number in the zone's SOA record was
<TT
CLASS="PARAMETER"
><I
>N</I
></TT
>.</P
><P
>Reverse lookups - mapping addresses to names - are simplified by the
<TT
CLASS="OPTION"
>-x</TT
> option. <TT
CLASS="PARAMETER"
><I
>addr</I
></TT
> 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
<TT
CLASS="PARAMETER"
><I
>name</I
></TT
>, <TT
CLASS="PARAMETER"
><I
>class</I
></TT
> and
<TT
CLASS="PARAMETER"
><I
>type</I
></TT
> arguments. <B
CLASS="COMMAND"
>dig</B
>
automatically performs a lookup for a name like
<TT
CLASS="LITERAL"
>11.12.13.10.in-addr.arpa</TT
> 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 <TT
CLASS="OPTION"
>-i</TT
> option. Bit string labels (RFC2874)
are now experimental and are not attempted.</P
><P
>To sign the DNS queries sent by <B
CLASS="COMMAND"
>dig</B
> and their
responses using transaction signatures (TSIG), specify a TSIG key file
using the <TT
CLASS="OPTION"
>-k</TT
> option. You can also specify the TSIG
key itself on the command line using the <TT
CLASS="OPTION"
>-y</TT
> option;
<TT
CLASS="PARAMETER"
><I
>name</I
></TT
> is the name of the TSIG key and
<TT
CLASS="PARAMETER"
><I
>key</I
></TT
> is the actual key. The key is a base-64
encoded string, typically generated by <SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>dnssec-keygen</SPAN
>(8)</SPAN
>.
Caution should be taken when using the <TT
CLASS="OPTION"
>-y</TT
> option on
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 <B
CLASS="COMMAND"
>dig</B
>, 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
<B
CLASS="COMMAND"
>key</B
> and <B
CLASS="COMMAND"
>server</B
> statements in
<TT
CLASS="FILENAME"
>named.conf</TT
>.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN147"
></A
><H2
>QUERY OPTIONS</H2
><P
><B
CLASS="COMMAND"
>dig</B
> 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.</P
><P
>Each query option is identified by a keyword preceded by a plus sign
(<TT
CLASS="LITERAL"
>+</TT
>). Some keywords set or reset an option. These may be preceded
by the string <TT
CLASS="LITERAL"
>no</TT
> to negate the meaning of that keyword. Other
keywords assign values to options like the timeout interval. They
have the form <TT
CLASS="OPTION"
>+keyword=value</TT
>.
The query options are:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="OPTION"
>+[no]tcp</TT
></DT
><DD
><P
>Use [do not use] TCP when querying name servers. The default
behaviour is to use UDP unless an AXFR or IXFR query is requested, in
which case a TCP connection is used.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]vc</TT
></DT
><DD
><P
>Use [do not use] TCP when querying name servers. This alternate
syntax to <TT
CLASS="PARAMETER"
><I
>+[no]tcp</I
></TT
> is provided for backwards
compatibility. The "vc" stands for "virtual circuit".</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]ignore</TT
></DT
><DD
><P
>Ignore truncation in UDP responses instead of retrying with TCP. By
default, TCP retries are performed.</P
></DD
><DT
><TT
CLASS="OPTION"
>+domain=somename</TT
></DT
><DD
><P
>Set the search list to contain the single domain
<TT
CLASS="PARAMETER"
><I
>somename</I
></TT
>, as if specified in a
<B
CLASS="COMMAND"
>domain</B
> directive in
<TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
>, and enable search list
processing as if the <TT
CLASS="PARAMETER"
><I
>+search</I
></TT
> option were given.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]search</TT
></DT
><DD
><P
>Use [do not use] the search list defined by the searchlist or domain
directive in <TT
CLASS="FILENAME"
>resolv.conf</TT
> (if any).
The search list is not used by default.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]defname</TT
></DT
><DD
><P
>Deprecated, treated as a synonym for <TT
CLASS="PARAMETER"
><I
>+[no]search</I
></TT
></P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]aaonly</TT
></DT
><DD
><P
>This option does nothing. It is provided for compatibility with old
versions of <B
CLASS="COMMAND"
>dig</B
> where it set an unimplemented
resolver flag.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]adflag</TT
></DT
><DD
><P
>Set [do not set] the AD (authentic data) bit in the query. The AD bit
currently has a standard meaning only in responses, not in queries,
but the ability to set the bit in the query is provided for
completeness.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]cdflag</TT
></DT
><DD
><P
>Set [do not set] the CD (checking disabled) bit in the query. This
requests the server to not perform DNSSEC validation of responses.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]cl</TT
></DT
><DD
><P
>Display [do not display] the CLASS when printing the record.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]ttlid</TT
></DT
><DD
><P
>Display [do not display] the TTL when printing the record.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]recurse</TT
></DT
><DD
><P
>Toggle the setting of the RD (recursion desired) bit in the query.
This bit is set by default, which means <B
CLASS="COMMAND"
>dig</B
>
normally sends recursive queries. Recursion is automatically disabled
when the <TT
CLASS="PARAMETER"
><I
>+nssearch</I
></TT
> or
<TT
CLASS="PARAMETER"
><I
>+trace</I
></TT
> query options are used.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]nssearch</TT
></DT
><DD
><P
>When this option is set, <B
CLASS="COMMAND"
>dig</B
> 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.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]trace</TT
></DT
><DD
><P
>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, <B
CLASS="COMMAND"
>dig</B
> 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.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]cmd</TT
></DT
><DD
><P
>toggles the printing of the initial comment in the output identifying
the version of <B
CLASS="COMMAND"
>dig</B
> and the query options that have
been applied. This comment is printed by default.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]short</TT
></DT
><DD
><P
>Provide a terse answer. The default is to print the answer in a
verbose form.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]identify</TT
></DT
><DD
><P
>Show [or do not show] the IP address and port number that supplied the
answer when the <TT
CLASS="PARAMETER"
><I
>+short</I
></TT
> 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.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]comments</TT
></DT
><DD
><P
>Toggle the display of comment lines in the output. The default is to
print comments.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]stats</TT
></DT
><DD
><P
>This query option toggles the printing of statistics: when the query
was made, the size of the reply and so on. The default behaviour is
to print the query statistics.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]qr</TT
></DT
><DD
><P
>Print [do not print] the query as it is sent.
By default, the query is not printed.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]question</TT
></DT
><DD
><P
>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.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]answer</TT
></DT
><DD
><P
>Display [do not display] the answer section of a reply. The default
is to display it.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]authority</TT
></DT
><DD
><P
>Display [do not display] the authority section of a reply. The
default is to display it.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]additional</TT
></DT
><DD
><P
>Display [do not display] the additional section of a reply.
The default is to display it.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]all</TT
></DT
><DD
><P
>Set or clear all display flags.</P
></DD
><DT
><TT
CLASS="OPTION"
>+time=T</TT
></DT
><DD
><P
>&#13;Sets the timeout for a query to
<TT
CLASS="PARAMETER"
><I
>T</I
></TT
> seconds. The default time out is 5 seconds.
An attempt to set <TT
CLASS="PARAMETER"
><I
>T</I
></TT
> to less than 1 will result
in a query timeout of 1 second being applied.</P
></DD
><DT
><TT
CLASS="OPTION"
>+tries=T</TT
></DT
><DD
><P
>Sets the number of times to try UDP queries to server to
<TT
CLASS="PARAMETER"
><I
>T</I
></TT
> instead of the default, 3. If
<TT
CLASS="PARAMETER"
><I
>T</I
></TT
> is less than or equal to zero, the number of
tries is silently rounded up to 1.</P
></DD
><DT
><TT
CLASS="OPTION"
>+retry=T</TT
></DT
><DD
><P
>Sets the number of times to retry UDP queries to server to
<TT
CLASS="PARAMETER"
><I
>T</I
></TT
> instead of the default, 2. Unlike
<TT
CLASS="PARAMETER"
><I
>+tries</I
></TT
>, this does not include the initial
query.</P
></DD
><DT
><TT
CLASS="OPTION"
>+ndots=D</TT
></DT
><DD
><P
>Set the number of dots that have to appear in
<TT
CLASS="PARAMETER"
><I
>name</I
></TT
> to <TT
CLASS="PARAMETER"
><I
>D</I
></TT
> for it to be
considered absolute. The default value is that defined using the
ndots statement in <TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
>, 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
<TT
CLASS="OPTION"
>search</TT
> or <TT
CLASS="OPTION"
>domain</TT
> directive in
<TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
>.</P
></DD
><DT
><TT
CLASS="OPTION"
>+bufsize=B</TT
></DT
><DD
><P
>Set the UDP message buffer size advertised using EDNS0 to
<TT
CLASS="PARAMETER"
><I
>B</I
></TT
> bytes. The maximum and minimum sizes of this
buffer are 65535 and 0 respectively. Values outside this range are
rounded up or down appropriately.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]multiline</TT
></DT
><DD
><P
>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 <B
CLASS="COMMAND"
>dig</B
> output.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]fail</TT
></DT
><DD
><P
>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
behaviour.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]besteffort</TT
></DT
><DD
><P
>Attempt to display the contents of messages which are malformed.
The default is to not display malformed answers.</P
></DD
><DT
><TT
CLASS="OPTION"
>+[no]dnssec</TT
></DT
><DD
><P
>Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO)
in the OPT record in the additional section of the query.</P
></DD
></DL
></DIV
>&#13;</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN355"
></A
><H2
>MULTIPLE QUERIES</H2
><P
>The BIND 9 implementation of <B
CLASS="COMMAND"
>dig </B
> supports
specifying multiple queries on the command line (in addition to
supporting the <TT
CLASS="OPTION"
>-f</TT
> batch file option). Each of those
queries can be supplied with its own set of flags, options and query
options.</P
><P
>In this case, each <TT
CLASS="PARAMETER"
><I
>query</I
></TT
> 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.</P
><P
>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 <TT
CLASS="OPTION"
>+[no]cmd</TT
> option) can be
overridden by a query-specific set of query options. For example:
<PRE
CLASS="PROGRAMLISTING"
>dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr</PRE
>
shows how <B
CLASS="COMMAND"
>dig</B
> could be used from the command line
to make three lookups: an ANY query for <TT
CLASS="LITERAL"
>www.isc.org</TT
>, a
reverse lookup of 127.0.0.1 and a query for the NS records of
<TT
CLASS="LITERAL"
>isc.org</TT
>.
A global query option of <TT
CLASS="PARAMETER"
><I
>+qr</I
></TT
> is applied, so
that <B
CLASS="COMMAND"
>dig</B
> shows the initial query it made for each
lookup. The final query has a local query option of
<TT
CLASS="PARAMETER"
><I
>+noqr</I
></TT
> which means that <B
CLASS="COMMAND"
>dig</B
>
will not print the initial query when it looks up the NS records for
<TT
CLASS="LITERAL"
>isc.org</TT
>.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN373"
></A
><H2
>FILES</H2
><P
><TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
></P
><P
><TT
CLASS="FILENAME"
>${HOME}/.digrc</TT
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN379"
></A
><H2
>SEE ALSO</H2
><P
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>host</SPAN
>(1)</SPAN
>,
<SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>named</SPAN
>(8)</SPAN
>,
<SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>dnssec-keygen</SPAN
>(8)</SPAN
>,
<I
CLASS="CITETITLE"
>RFC1035</I
>.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN392"
></A
><H2
>BUGS </H2
><P
>There are probably too many query options. </P
></DIV
></BODY
></HTML
>