dig.html revision 3970098dcd2a7122541667b4b56cea8abce8ccf2
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein - Copyright (C) 2000, 2001 Internet Software Consortium.
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.
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.
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox UserNAME="GENERATOR"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONTENT="Modular DocBook HTML Stylesheet Version 1.73
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="REFENTRY"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBGCOLOR="#FFFFFF"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsTEXT="#000000"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinLINK="#0000FF"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinVLINK="#840084"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinALINK="#0000FF"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="REFNAMEDIV"
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox User>dig -- DNS lookup utility</DIV
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCLASS="REFSYNOPSISDIV"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt>Synopsis</H2
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCLASS="COMMAND"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User> [@server] [<TT
f9ce6280cec79deb16ff6d9807aa493ff23e10d9Tinderbox UserCLASS="OPTION"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="REPLACEABLE"
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox UserCLASS="OPTION"
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox UserCLASS="REPLACEABLE"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCLASS="OPTION"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCLASS="REPLACEABLE"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="OPTION"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="REPLACEABLE"
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="OPTION"
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="REPLACEABLE"
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox UserCLASS="OPTION"
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox UserCLASS="REPLACEABLE"
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="OPTION"
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="REPLACEABLE"
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserCLASS="OPTION"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="REPLACEABLE"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>] [name] [type] [class] [queryopt...]</P
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox UserCLASS="COMMAND"
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox UserCLASS="OPTION"
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox UserCLASS="COMMAND"
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox User> [global-queryopt...] [query...]</P
8a48b6b9b6fa8486f24b22d1972b2b6ebb36a4a4Tinderbox UserCLASS="REFSECT1"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User>DESCRIPTION</H2
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox UserCLASS="COMMAND"
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 Usertroubleshoot DNS problems because of its flexibility, ease of use and
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntclarity of output. Other lookup tools tend to have less functionality
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox UserCLASS="COMMAND"
550d3276d0490c4918f089ccb1528a3eb0951b0aTinderbox UserCLASS="COMMAND"
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"
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User> option is given.
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox UserUnlike earlier versions, the BIND9 implementation of
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox UserCLASS="COMMAND"
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User> allows multiple lookups to be issued from the
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox Usercommand line.</P
51da15c88648a9e47d0cddff4b2b782665e99401Tinderbox User>Unless it is told to query a specific name server,
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="COMMAND"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User> will try each of the servers listed in
d253648fe3331622cebea02d60aaecca3082d78dTinderbox UserCLASS="FILENAME"
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User>When no command line arguments or options are given, will perform an
d253648fe3331622cebea02d60aaecca3082d78dTinderbox UserNS query for "." (the root).</P
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User>It is possible to set per-user defaults for <B
d253648fe3331622cebea02d60aaecca3082d78dTinderbox UserCLASS="COMMAND"
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
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCLASS="REFSECT1"
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User>SIMPLE USAGE</H2
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User>A typical invocation of <B
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCLASS="COMMAND"
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCLASS="PROGRAMLISTING"
dfae459e8c4f794f8a239e74aa9d5e11cce6ea5bTinderbox User> dig @server name type </PRE
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox UserCLASS="VARIABLELIST"
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCLASS="CONSTANT"
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 UserCLASS="PARAMETER"
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox User> argument is a hostname,
f14ce68ee54a5a4587fbde4ffacb117946df2d73Tinderbox UserCLASS="COMMAND"
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User> resolves that name before querying that name
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox Userserver. If no <TT
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox UserCLASS="PARAMETER"
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox User> argument is provided,
0d6a6642b2be93cffa651c54a9b8810dd2d31392Tinderbox UserCLASS="COMMAND"
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox User> consults <TT
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox UserCLASS="FILENAME"
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox Userand queries the name servers listed there. The reply from the name
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox Userserver that responds is displayed.</P
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="CONSTANT"
164ade1482251e1da962b42e5bf0d3aa02a11e03Tinderbox User>is the name of the resource record that is to be looked up.</P
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox UserCLASS="CONSTANT"
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User>indicates what type of query is required —
abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9dTinderbox UserANY, A, MX, SIG, etc.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="PARAMETER"
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User> can be any valid query type. If no
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox UserCLASS="PARAMETER"
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox User> argument is supplied,
a0fb6a0980359165a4459723f52d5d7b5725f9c6Tinderbox UserCLASS="COMMAND"
8c7245514646663b25d8b186186ebede41903fa3Tinderbox User> will perform a lookup for an A record.</P
8c7245514646663b25d8b186186ebede41903fa3Tinderbox UserCLASS="REFSECT1"
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox UserCLASS="OPTION"
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox User> option sets the source IP address of the query
3b15473cedf41d48904f5b07bdc5e87afff6b58cTinderbox UserCLASS="PARAMETER"
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 "#<port>"</P
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox User>The default query class (IN for internet) is overridden by the
99b30e26a6beb9092557cc9e5370b517309bff6eTinderbox UserCLASS="OPTION"
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox UserCLASS="PARAMETER"
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox User> is any valid
c48fdfda7a8ae8973aadfeb88cbeaab013024a6cTinderbox Userclass, such as HS for Hesiod records or CH for CHAOSNET records.</P
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox UserCLASS="OPTION"
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox User> option makes <B
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox UserCLASS="COMMAND"
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox Userin batch mode by reading a list of lookup requests to process from the
666b453b37f9ccfe3c7984fb0b31b70a3ceb918fTinderbox UserCLASS="PARAMETER"
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
9efd8fc7e811d3c0c160adeb5552c2df7e49df67Tinderbox UserCLASS="COMMAND"
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User> using the command-line interface.</P
ffe29868b4bbc64953fc5d0de51f988c20158967Tinderbox User>If a non-standard port number is to be queried, the
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="OPTION"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt> option is used. <TT
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCLASS="PARAMETER"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntthe port number that <B
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCLASS="COMMAND"
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 HuntCLASS="OPTION"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> option sets the query type to
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="PARAMETER"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein>. It can be any valid query type which is
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewssupported in BIND9. The default query type "A", unless the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="OPTION"
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,
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="PARAMETER"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein> is set to <TT
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCLASS="LITERAL"
looked up using nibble format under the IP6.ARPA domain.
To use the older RFC1886 method using the IP6.INT domain