dig.html revision fb84f9014321c5f33c4682de5661b579fcde318f
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff<!--
ca41b452ede6feaa9d8739ec3cae19389a7b0d03Bob Halley - Copyright (C) 2000, 2001 Internet Software Consortium.
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff -
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - Permission to use, copy, modify, and distribute this software for any
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - purpose with or without fee is hereby granted, provided that the above
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - copyright notice and this permission notice appear in all copies.
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff -
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff-->
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff<HTML
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff><HEAD
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff><TITLE
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>dig</TITLE
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff><META
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael GraffNAME="GENERATOR"
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael GraffCONTENT="Modular DocBook HTML Stylesheet Version 1.61
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff"></HEAD
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff><BODY
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffCLASS="REFENTRY"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffBGCOLOR="#FFFFFF"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffTEXT="#000000"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffLINK="#0000FF"
7df0472d8a76c83d2137bd9549414a30787d58cfBrian WellingtonVLINK="#840084"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffALINK="#0000FF"
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff><H1
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff><A
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael GraffNAME="AEN1"
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff>dig</A
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff></H1
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff><DIV
74889a341cac183d477e15cfead391a8f7bdba95Michael GraffCLASS="REFNAMEDIV"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><A
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffNAME="AEN8"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></A
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><H2
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>Name</H2
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>dig&nbsp;--&nbsp;DNS lookup utility</DIV
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><DIV
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="REFSYNOPSISDIV"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><A
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffNAME="AEN11"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></A
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><H2
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>Synopsis</H2
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><P
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><B
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="COMMAND"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>dig</B
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff> [@server] [<TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="OPTION"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>-b <TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="REPLACEABLE"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>address</I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>] [<TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="OPTION"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>-c <TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="REPLACEABLE"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>class</I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>] [<TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="OPTION"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>-f <TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="REPLACEABLE"
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff><I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>filename</I
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff></TT
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff></TT
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff>] [<TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="OPTION"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>-k <TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="REPLACEABLE"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>filename</I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>] [<TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="OPTION"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>-p <TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="REPLACEABLE"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><I
62e4837585f2d48ce9ef3ad6880d8fb75a578e58Andreas Gustafsson>port#</I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>] [<TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="OPTION"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>-t <TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="REPLACEABLE"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>type</I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>] [<TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="OPTION"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>-x <TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="REPLACEABLE"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>addr</I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>] [<TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="OPTION"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>-y <TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="REPLACEABLE"
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>name:key</I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff>] [name] [type] [class] [queryopt...]</P
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff><P
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff><B
c05e003dce672b2f8555a3e56857f29ce89c1677Michael GraffCLASS="COMMAND"
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff>dig</B
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff> [<TT
c05e003dce672b2f8555a3e56857f29ce89c1677Michael GraffCLASS="OPTION"
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff>-h</TT
62e4837585f2d48ce9ef3ad6880d8fb75a578e58Andreas Gustafsson>]</P
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff><P
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff><B
c05e003dce672b2f8555a3e56857f29ce89c1677Michael GraffCLASS="COMMAND"
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff>dig</B
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff> [global-queryopt...] [query...]</P
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff></DIV
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff><DIV
c05e003dce672b2f8555a3e56857f29ce89c1677Michael GraffCLASS="REFSECT1"
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff><A
c05e003dce672b2f8555a3e56857f29ce89c1677Michael GraffNAME="AEN51"
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff></A
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff><H2
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff>DESCRIPTION</H2
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff><P
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff><B
c05e003dce672b2f8555a3e56857f29ce89c1677Michael GraffCLASS="COMMAND"
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff>dig</B
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff> (domain information groper) is a flexible tool
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Grafffor interrogating DNS name servers. It performs DNS lookups and
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graffdisplays the answers that are returned from the name server(s) that
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graffwere queried. Most DNS administrators use <B
c05e003dce672b2f8555a3e56857f29ce89c1677Michael GraffCLASS="COMMAND"
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff>dig</B
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff> to
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Grafftroubleshoot DNS problems because of its flexibility, ease of use and
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graffclarity of output. Other lookup tools tend to have less functionality
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graffthan <B
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael GraffCLASS="COMMAND"
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff>dig</B
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff>.</P
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff><P
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff>Although <B
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael GraffCLASS="COMMAND"
d736db6dc53e615e3f2d66d1ddbe28473694d107Michael Graff>dig</B
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff> is normally used with command-line
291b0d910d115e41a4b69d0603c3376aebf0c630Michael Graffarguments, it also has a batch mode of operation for reading lookup
e24f605ad64182532640dc6721070456b13112d5Michael Graffrequests from a file. A brief summary of its command-line arguments
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graffand options is printed when the <TT
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael GraffCLASS="OPTION"
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff>-h</TT
291b0d910d115e41a4b69d0603c3376aebf0c630Michael Graff> option is given.
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael GraffUnlike earlier versions, the BIND9 implementation of
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff<B
4e675038a097065ff13944232cd7c89ac5961984Michael GraffCLASS="COMMAND"
4e675038a097065ff13944232cd7c89ac5961984Michael Graff>dig</B
4e675038a097065ff13944232cd7c89ac5961984Michael Graff> allows multiple lookups to be issued from the
4e675038a097065ff13944232cd7c89ac5961984Michael Graffcommand line.</P
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff><P
4e675038a097065ff13944232cd7c89ac5961984Michael Graff>Unless it is told to query a specific name server,
291b0d910d115e41a4b69d0603c3376aebf0c630Michael Graff<B
291b0d910d115e41a4b69d0603c3376aebf0c630Michael GraffCLASS="COMMAND"
291b0d910d115e41a4b69d0603c3376aebf0c630Michael Graff>dig</B
291b0d910d115e41a4b69d0603c3376aebf0c630Michael Graff> will try each of the servers listed in
291b0d910d115e41a4b69d0603c3376aebf0c630Michael Graff<TT
291b0d910d115e41a4b69d0603c3376aebf0c630Michael GraffCLASS="FILENAME"
291b0d910d115e41a4b69d0603c3376aebf0c630Michael Graff>/etc/resolv.conf</TT
d736db6dc53e615e3f2d66d1ddbe28473694d107Michael Graff>.</P
291b0d910d115e41a4b69d0603c3376aebf0c630Michael Graff><P
d736db6dc53e615e3f2d66d1ddbe28473694d107Michael Graff>When no command line arguments or options are given, will perform an
d736db6dc53e615e3f2d66d1ddbe28473694d107Michael GraffNS query for "." (the root).</P
d736db6dc53e615e3f2d66d1ddbe28473694d107Michael Graff></DIV
d736db6dc53e615e3f2d66d1ddbe28473694d107Michael Graff><DIV
e24f605ad64182532640dc6721070456b13112d5Michael GraffCLASS="REFSECT1"
e24f605ad64182532640dc6721070456b13112d5Michael Graff><A
d736db6dc53e615e3f2d66d1ddbe28473694d107Michael GraffNAME="AEN65"
e24f605ad64182532640dc6721070456b13112d5Michael Graff></A
e24f605ad64182532640dc6721070456b13112d5Michael Graff><H2
d736db6dc53e615e3f2d66d1ddbe28473694d107Michael Graff>SIMPLE USAGE</H2
d736db6dc53e615e3f2d66d1ddbe28473694d107Michael Graff><P
291b0d910d115e41a4b69d0603c3376aebf0c630Michael Graff>A typical invocation of <B
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael GraffCLASS="COMMAND"
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff>dig</B
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff> looks like:
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff<PRE
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffCLASS="PROGRAMLISTING"
e24f605ad64182532640dc6721070456b13112d5Michael Graff> dig @server name type </PRE
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff> where:
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff<P
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff></P
e24f605ad64182532640dc6721070456b13112d5Michael Graff><DIV
e24f605ad64182532640dc6721070456b13112d5Michael GraffCLASS="VARIABLELIST"
e24f605ad64182532640dc6721070456b13112d5Michael Graff><DL
e24f605ad64182532640dc6721070456b13112d5Michael Graff><DT
e24f605ad64182532640dc6721070456b13112d5Michael Graff><TT
e24f605ad64182532640dc6721070456b13112d5Michael GraffCLASS="CONSTANT"
e24f605ad64182532640dc6721070456b13112d5Michael Graff>server</TT
e24f605ad64182532640dc6721070456b13112d5Michael Graff></DT
e24f605ad64182532640dc6721070456b13112d5Michael Graff><DD
e24f605ad64182532640dc6721070456b13112d5Michael Graff><P
e24f605ad64182532640dc6721070456b13112d5Michael Graff>is the name or IP address of the name server to query. An IPv4
e24f605ad64182532640dc6721070456b13112d5Michael Graffaddress can be provided in dotted-decimal notation. When the supplied
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff<TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffCLASS="PARAMETER"
e24f605ad64182532640dc6721070456b13112d5Michael Graff><I
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff>server</I
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff></TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff> argument is a hostname,
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff<B
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffCLASS="COMMAND"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>dig</B
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff> resolves that name before querying that name
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graffserver. If no <TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffCLASS="PARAMETER"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff><I
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>server</I
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff></TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff> argument is provided,
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff<B
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffCLASS="COMMAND"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>dig</B
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff> consults <TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffCLASS="FILENAME"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>/etc/resolv.conf</TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graffand queries the name servers listed there. The reply from the name
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graffserver that responds is displayed.</P
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff></DD
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff><DT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff><TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffCLASS="CONSTANT"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>name</TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff></DT
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff><DD
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff><P
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff>is the name of the resource record that is to be looked up.</P
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff></DD
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff><DT
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff><TT
74889a341cac183d477e15cfead391a8f7bdba95Michael GraffCLASS="CONSTANT"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>type</TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff></DT
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff><DD
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff><P
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff>indicates what type of query is required &mdash;
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael GraffANY, A, MX, SIG, etc.
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff<TT
74889a341cac183d477e15cfead391a8f7bdba95Michael GraffCLASS="PARAMETER"
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff><I
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>type</I
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff></TT
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff> can be any valid query type. If no
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff<TT
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael GraffCLASS="PARAMETER"
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff><I
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>type</I
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff></TT
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff> argument is supplied,
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff<B
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael GraffCLASS="COMMAND"
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff>dig</B
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff> will perform a lookup for an A record.</P
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff></DD
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff></DL
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff></DIV
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff></P
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff></DIV
7dbf5a0b64237aa3052f04f4c8f7d56be8ec5d79Michael Graff><DIV
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael GraffCLASS="REFSECT1"
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff><A
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael GraffNAME="AEN94"
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff></A
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff><H2
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff>OPTIONS</H2
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff><P
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff>The <TT
e24f605ad64182532640dc6721070456b13112d5Michael GraffCLASS="OPTION"
4e675038a097065ff13944232cd7c89ac5961984Michael Graff>-b</TT
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff> option sets the source IP address of the query
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graffto <TT
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael GraffCLASS="PARAMETER"
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff><I
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff>address</I
e24f605ad64182532640dc6721070456b13112d5Michael Graff></TT
e24f605ad64182532640dc6721070456b13112d5Michael Graff>. This must be a valid address on
e24f605ad64182532640dc6721070456b13112d5Michael Graffone of the host's network interfaces.</P
c05e003dce672b2f8555a3e56857f29ce89c1677Michael Graff><P
2311073ce0ef26c0250e91e4a083d7cc94fa7d33Michael Graff>The default query class (IN for internet) is overridden by the
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff<TT
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael GraffCLASS="OPTION"
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff>-c</TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff> option. <TT
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael GraffCLASS="PARAMETER"
74889a341cac183d477e15cfead391a8f7bdba95Michael Graff><I
ae7d0a4375abaecfd5c5b0816616d9882831e69bMichael Graff>class</I
e4f074a2c2340ea80099beebecc3b89aa234fa8fMichael Graff></TT
a3ab70dae26d009bf78b0594b2ab5eb9208f4b91Michael Graff> is any valid
class, such as HS for Hesiod records or CH for CHAOSNET records.</P
><P
>The <TT
CLASS="OPTION"
>-f</TT
> option makes <B
CLASS="COMMAND"
>dig </B
> operate
in batch mode by reading a list of lookup requests to process from the
file <TT
CLASS="PARAMETER"
><I
>filename</I
></TT
>. The file contains a number of
queries, one per line. Each entry in the file should be organised in
the same way they would be presented as queries to
<B
CLASS="COMMAND"
>dig</B
> using the command-line interface.</P
><P
>If a non-standard port number is to be queried, the
<TT
CLASS="OPTION"
>-p</TT
> option is used. <TT
CLASS="PARAMETER"
><I
>port#</I
></TT
> is
the port number that <B
CLASS="COMMAND"
>dig</B
> 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 <TT
CLASS="OPTION"
>-t</TT
> option sets the query type to
<TT
CLASS="PARAMETER"
><I
>type</I
></TT
>. It can be any valid query type which is
supported in BIND9. The default query type "A", unless the
<TT
CLASS="OPTION"
>-x</TT
> 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,
<TT
CLASS="PARAMETER"
><I
>type</I
></TT
> is set to <TT
CLASS="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 the IP6.ARPA domain and binary labels as defined in
RFC2874. To use the older RFC1886 method using the IP6.INT domain and
"nibble" labels, specify the <TT
CLASS="OPTION"
>-n</TT
> (nibble) option.</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="AEN144"
></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 compatibilty 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]recursive</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=A</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, 3. If
<TT
CLASS="PARAMETER"
><I
>T</I
></TT
> is less than or equal to zero, the number of
retries is silently rounded up to 1.</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
></DL
></DIV
>&#13;</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN314"
></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 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="AEN331"
></A
><H2
>FILES</H2
><P
><TT
CLASS="FILENAME"
>/etc/resolv.conf</TT
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN335"
></A
><H2
>SEE ALSO</H2
><P
><SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>host</SPAN
>(1)</SPAN
>,
<SPAN
CLASS="CITEREFENTRY"
><SPAN
CLASS="REFENTRYTITLE"
>resolver</SPAN
>(5)</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="AEN351"
></A
><H2
>BUGS </H2
><P
>There are probably too many query options. </P
></DIV
></BODY
></HTML
>