dig.html revision abe69df9a7de5cda07a2b8e19e8b7c981bcd7a9d
5cd4555ad444fd391002ae32450572054369fd42Rob Austein<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5cd4555ad444fd391002ae32450572054369fd42Rob Austein<!--
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein - Copyright (C) 2000-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC")
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson -
d60212e03fbef1d3dd7f7eb05c0545cc373cb9fcAutomatic Updater - This Source Code Form is subject to the terms of the Mozilla Public
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews - License, v. 2.0. If a copy of the MPL was not distributed with this
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson - file, You can obtain one at http://mozilla.org/MPL/2.0/.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater-->
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<html lang="en">
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<head>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<title>dig</title>
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews</head>
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews<a name="man.dig"></a><div class="titlepage"></div>
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews
072440df4f65033eb058c06f2cc72be450606720Jeremy Reed <div class="refnamediv">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<h2>Name</h2>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein dig
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein &#8212; DNS lookup utility
072440df4f65033eb058c06f2cc72be450606720Jeremy Reed </p>
a8f6b2aa46f882c7c680b7bdab1dfb78a76787eaMark Andrews</div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
072440df4f65033eb058c06f2cc72be450606720Jeremy Reed <div class="refsynopsisdiv">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<h2>Synopsis</h2>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <div class="cmdsynopsis"><p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="command">dig</code>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [@server]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-b <em class="replaceable"><code>address</code></em></code>]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-c <em class="replaceable"><code>class</code></em></code>]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-f <em class="replaceable"><code>filename</code></em></code>]
26e2a07a0b6a3b1eccef82ba31270d0c54ad4f06Mark Andrews [<code class="option">-k <em class="replaceable"><code>filename</code></em></code>]
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews [<code class="option">-m</code>]
030aac3dbc57f99bad1d251b0783890ff0369952Automatic Updater [<code class="option">-p <em class="replaceable"><code>port#</code></em></code>]
d60212e03fbef1d3dd7f7eb05c0545cc373cb9fcAutomatic Updater [<code class="option">-q <em class="replaceable"><code>name</code></em></code>]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-t <em class="replaceable"><code>type</code></em></code>]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-v</code>]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-x <em class="replaceable"><code>addr</code></em></code>]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]name:key</code></em></code>]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-4</code>]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-6</code>]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [name]
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews [type]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [class]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [queryopt...]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p></div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <div class="cmdsynopsis"><p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="command">dig</code>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [<code class="option">-h</code>]
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews </p></div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews <div class="cmdsynopsis"><p>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews <code class="command">dig</code>
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews [global-queryopt...]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein [query...]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p></div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <div class="refsection">
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews<a name="id-1.7"></a><h2>DESCRIPTION</h2>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p><span class="command"><strong>dig</strong></span>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein (domain information groper) is a flexible tool
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein for interrogating DNS name servers. It performs DNS lookups and
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein displays the answers that are returned from the name server(s) that
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein were queried. Most DNS administrators use <span class="command"><strong>dig</strong></span> to
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein troubleshoot DNS problems because of its flexibility, ease of use and
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein clarity of output. Other lookup tools tend to have less functionality
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein than <span class="command"><strong>dig</strong></span>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Although <span class="command"><strong>dig</strong></span> is normally used with
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein command-line
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein arguments, it also has a batch mode of operation for reading lookup
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein requests from a file. A brief summary of its command-line arguments
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and options is printed when the <code class="option">-h</code> option is given.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Unlike earlier versions, the BIND 9 implementation of
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <span class="command"><strong>dig</strong></span> allows multiple lookups to be issued
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein from the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein command line.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Unless it is told to query a specific name server,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <span class="command"><strong>dig</strong></span> will try each of the servers listed in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="filename">/etc/resolv.conf</code>. If no usable server addresses
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein are found, <span class="command"><strong>dig</strong></span> will send the query to the local
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein host.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein When no command line arguments or options are given,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <span class="command"><strong>dig</strong></span> will perform an NS query for "." (the root).
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein It is possible to set per-user defaults for <span class="command"><strong>dig</strong></span> via
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="filename">${HOME}/.digrc</code>. This file is read and
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews any options in it
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews are applied before the command line arguments.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews </p>
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews The IN and CH class names overlap with the IN and CH top level
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews domain names. Either use the <code class="option">-t</code> and
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews <code class="option">-c</code> options to specify the type and class,
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews use the <code class="option">-q</code> the specify the domain name, or
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews use "IN." and "CH." when looking up these top level domains.
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews </p>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews </div>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews <div class="refsection">
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews<a name="id-1.8"></a><h2>SIMPLE USAGE</h2>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews <p>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews A typical invocation of <span class="command"><strong>dig</strong></span> looks like:
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews </p>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews<pre class="programlisting"> dig @server name type </pre>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews<p>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews where:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<div class="variablelist"><dl class="variablelist">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="constant">server</code></span></dt>
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews<dd>
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews <p>
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews is the name or IP address of the name server to query. This
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews can be an IPv4 address in dotted-decimal notation or an IPv6
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews address in colon-delimited notation. When the supplied
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews <em class="parameter"><code>server</code></em> argument is a hostname,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <span class="command"><strong>dig</strong></span> resolves that name before querying
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews that name server.
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews </p>
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews <p>
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews If no <em class="parameter"><code>server</code></em> argument is
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews provided, <span class="command"><strong>dig</strong></span> consults
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews <code class="filename">/etc/resolv.conf</code>; if an
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews address is found there, it queries the name server at
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews that address. If either of the <code class="option">-4</code> or
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews <code class="option">-6</code> options are in use, then
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews only addresses for the corresponding transport
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews will be tried. If no usable addresses are found,
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews <span class="command"><strong>dig</strong></span> will send the query to the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein local host. The reply from the name server that
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews responds is displayed.
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews </p>
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrews </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="constant">name</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein is the name of the resource record that is to be looked up.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews<dt><span class="term"><code class="constant">type</code></span></dt>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews<dd>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews <p>
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews indicates what type of query is required &#8212;
b98225ff8a5721a998ccb440df4d261488fef163Mark Andrews ANY, A, MX, SIG, etc.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <em class="parameter"><code>type</code></em> can be any valid query
f9f11eb54be19b7deedf3978496f71d81432a5eeJeremy Reed type. If no
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <em class="parameter"><code>type</code></em> argument is supplied,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <span class="command"><strong>dig</strong></span> will perform a lookup for an
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein A record.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein</dl></div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews <div class="refsection">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<a name="id-1.9"></a><h2>OPTIONS</h2>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <div class="variablelist"><dl class="variablelist">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-4</span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Use IPv4 only.
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-6</span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Use IPv6 only.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-b <em class="replaceable"><code>address[<span class="optional">#port</span>]</code></em></span></dt>
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews<dd>
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews <p>
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews Set the source IP address of the query.
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews The <em class="parameter"><code>address</code></em> must be a valid address on
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews one of the host's network interfaces, or "0.0.0.0" or "::". An
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews optional port may be specified by appending "#&lt;port&gt;"
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews </p>
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews </dd>
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews<dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews<dd>
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews <p>
9a41f786b167a2a6df498d5e9c699f9835e1e9dcMark Andrews Set the query class. The
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein default <em class="parameter"><code>class</code></em> is IN; other classes
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein are HS for Hesiod records or CH for Chaosnet records.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-f <em class="replaceable"><code>file</code></em></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Batch mode: <span class="command"><strong>dig</strong></span> reads a list of lookup
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein requests to process from the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein given <em class="parameter"><code>file</code></em>. Each line in the file
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein should be organized in the same way they would be
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein presented as queries to
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <span class="command"><strong>dig</strong></span> using the command-line interface.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-i</span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein domain, which is no longer in use. Obsolete bit string
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein label queries (RFC2874) are not attempted.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-k <em class="replaceable"><code>keyfile</code></em></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Sign queries using TSIG using a key read from the given file.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Key files can be generated using
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <span class="citerefentry">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <span class="refentrytitle">tsig-keygen</span>(8)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </span>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein When using TSIG authentication with <span class="command"><strong>dig</strong></span>,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein the name server that is queried needs to know the key and
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein algorithm that is being used. In BIND, this is done by
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein providing appropriate <span class="command"><strong>key</strong></span>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and <span class="command"><strong>server</strong></span> statements in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="filename">named.conf</code>.
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-m</span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Enable memory usage debugging.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-p <em class="replaceable"><code>port</code></em></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Send the query to a non-standard port on the server,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein instead of the default port 53. This option would be used
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein to test a name server that has been configured to listen
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein for queries on a non-standard port number.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-q <em class="replaceable"><code>name</code></em></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The domain name to query. This is useful to distinguish
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein the <em class="parameter"><code>name</code></em> from other arguments.
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-t <em class="replaceable"><code>type</code></em></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The resource record type to query. It can be any valid query type
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein which is
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein supported in BIND 9. The default query type is "A", unless the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="option">-x</code> option is supplied to indicate a reverse lookup.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein A zone transfer can be requested by specifying a type of AXFR. When
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein an incremental zone transfer (IXFR) is required, set the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <em class="parameter"><code>type</code></em> to <code class="literal">ixfr=N</code>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The incremental zone transfer will contain the changes
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein made to the zone since the serial number in the zone's SOA
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein record was
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <em class="parameter"><code>N</code></em>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-v</span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Print the version number and exit.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-x <em class="replaceable"><code>addr</code></em></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Simplified reverse lookups, for mapping addresses to
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein names. The <em class="parameter"><code>addr</code></em> is an IPv4 address
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein in dotted-decimal notation, or a colon-delimited IPv6
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein address. When the <code class="option">-x</code> is used, there is no
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein need to provide
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein the <em class="parameter"><code>name</code></em>, <em class="parameter"><code>class</code></em>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and <em class="parameter"><code>type</code></em>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein arguments. <span class="command"><strong>dig</strong></span> automatically performs a
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein lookup for a name like
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="literal">94.2.0.192.in-addr.arpa</code> and sets the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein query type and class to PTR and IN respectively. IPv6
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein addresses are looked up using nibble format under the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein IP6.ARPA domain (but see also the <code class="option">-i</code>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein option).
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term">-y <em class="replaceable"><code>[<span class="optional">hmac:</span>]keyname:secret</code></em></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Sign queries using TSIG with the given authentication key.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <em class="parameter"><code>keyname</code></em> is the name of the key, and
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <em class="parameter"><code>secret</code></em> is the base64 encoded shared secret.
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews <em class="parameter"><code>hmac</code></em> is the name of the key algorithm;
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein valid choices are <code class="literal">hmac-md5</code>,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="literal">hmac-sha1</code>, <code class="literal">hmac-sha224</code>,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="literal">hmac-sha256</code>, <code class="literal">hmac-sha384</code>, or
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="literal">hmac-sha512</code>. If <em class="parameter"><code>hmac</code></em>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein is not specified, the default is <code class="literal">hmac-md5</code>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein or if MD5 was disabled <code class="literal">hmac-sha256</code>.
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews </p>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews <p>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews NOTE: You should use the <code class="option">-k</code> option and
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews avoid the <code class="option">-y</code> option, because
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews with <code class="option">-y</code> the shared secret is supplied as
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews a command line argument in clear text. This may be visible
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews in the output from
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews <span class="citerefentry">
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews <span class="refentrytitle">ps</span>(1)
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews </span>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews or in a history file maintained by the user's shell.
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews </p>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews </dd>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews</dl></div>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </div>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <div class="refsection">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<a name="id-1.10"></a><h2>QUERY OPTIONS</h2>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p><span class="command"><strong>dig</strong></span>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein provides a number of query options which affect
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews the way in which lookups are made and the results displayed. Some of
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein these set or reset flag bits in the query header, some determine which
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sections of the answer get printed, and others determine the timeout
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and retry strategies.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Each query option is identified by a keyword preceded by a plus sign
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein (<code class="literal">+</code>). Some keywords set or reset an
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein option. These may be preceded
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein by the string <code class="literal">no</code> to negate the meaning of
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein that keyword. Other
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein keywords assign values to options like the timeout interval. They
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein have the form <code class="option">+keyword=value</code>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Keywords may be abbreviated, provided the abbreviation is
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein unambiguous; for example, <code class="literal">+cd</code> is equivalent
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein to <code class="literal">+cdflag</code>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The query options are:
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<div class="variablelist"><dl class="variablelist">
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]aaflag</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein A synonym for <em class="parameter"><code>+[no]aaonly</code></em>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein<dt><span class="term"><code class="option">+[no]aaonly</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Sets the "aa" flag in the query.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]additional</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Display [do not display] the additional section of a
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein reply. The default is to display it.
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]adflag</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein Set [do not set] the AD (authentic data) bit in the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein query. This requests the server to return whether
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein all of the answer and authority sections have all
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein been validated as secure according to the security
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein policy of the server. AD=1 indicates that all records
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein have been validated as secure and the answer is not
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein from a OPT-OUT range. AD=0 indicate that some part
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein of the answer was insecure or not validated. This
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein bit is set by default.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]all</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Set or clear all display flags.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein<dt><span class="term"><code class="option">+[no]answer</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Display [do not display] the answer section of a
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein reply. The default is to display it.
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]authority</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Display [do not display] the authority section of a
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein reply. The default is to display it.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]badcookie</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Retry lookup with the new server cookie if a
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein BADCOOKIE response is received.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]besteffort</code></span></dt>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Attempt to display the contents of messages which are
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein malformed. The default is to not display malformed
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein answers.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+bufsize=B</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Set the UDP message buffer size advertised using EDNS0
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein to <em class="parameter"><code>B</code></em> bytes. The maximum and
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein minimum sizes of this buffer are 65535 and 0 respectively.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Values outside this range are rounded up or down
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein appropriately. Values other than zero will cause a
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein EDNS query to be sent.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]cdflag</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Set [do not set] the CD (checking disabled) bit in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein the query. This requests the server to not perform
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein DNSSEC validation of responses.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]class</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Display [do not display] the CLASS when printing the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein record.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]cmd</code></span></dt>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Toggles the printing of the initial comment in the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein output identifying the version of <span class="command"><strong>dig</strong></span>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and the query options that have been applied. This
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein comment is printed by default.
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]comments</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Toggle the display of comment lines in the output.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The default is to print comments.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]cookie[<span class="optional">=####</span>]</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Send a COOKIE EDNS option, with optional
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein value. Replaying a COOKIE from a previous response will
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein allow the server to identify a previous client. The
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein default is <code class="option">+cookie</code>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <span class="command"><strong>+cookie</strong></span> is also set when +trace
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein is set to better emulate the default queries from a
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein nameserver.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]crypto</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Toggle the display of cryptographic fields in DNSSEC
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein records. The contents of these field are unnecessary
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein to debug most DNSSEC validation failures and removing
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein them makes it easier to see the common failures. The
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein default is to display the fields. When omitted they
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein are replaced by the string "[omitted]" or in the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein DNSKEY case the key id is displayed as the replacement,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein e.g. "[ key id = value ]".
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]defname</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Deprecated, treated as a synonym for
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein <em class="parameter"><code>+[no]search</code></em>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]dnssec</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Requests DNSSEC records be sent by setting the DNSSEC
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein OK bit (DO) in the OPT record in the additional section
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein of the query.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+domain=somename</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Set the search list to contain the single domain
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein <em class="parameter"><code>somename</code></em>, as if specified in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein a <span class="command"><strong>domain</strong></span> directive in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="filename">/etc/resolv.conf</code>, and enable
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein search list processing as if the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <em class="parameter"><code>+search</code></em> option were given.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+dscp=value</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein Set the DSCP code point to be used when sending the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein query. Valid DSCP code points are in the range
8d709e3ee443222cd35e44eadc9a4c0a8d92fec2Rob Austein [0..63]. By default no code point is explicitly set.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]edns[=#]</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Specify the EDNS version to query with. Valid values
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein are 0 to 255. Setting the EDNS version will cause
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews a EDNS query to be sent. <code class="option">+noedns</code>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews clears the remembered EDNS version. EDNS is set to
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews 0 by default.
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews </p>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews </dd>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews<dt><span class="term"><code class="option">+[no]ednsflags[=#]</code></span></dt>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews<dd>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews <p>
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews Set the must-be-zero EDNS flags bits (Z bits) to the
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews specified value. Decimal, hex and octal encodings are
21d493fc392d472086ad3c7c4563b7cadcb06788Mark Andrews accepted. Setting a named flag (e.g. DO) will silently be
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein ignored. By default, no Z bits are set.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]ednsnegotiation</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Enable / disable EDNS version negotiation. By default
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein EDNS version negotiation is enabled.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]ednsopt[=code[:value]]</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Specify EDNS option with code point <code class="option">code</code>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and optionally payload of <code class="option">value</code> as a
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein hexadecimal string. <code class="option">code</code> can be
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein either an EDNS option name (for example,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="literal">NSID</code> or <code class="literal">ECS</code>),
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein or an arbitrary numeric value. <code class="option">+noednsopt</code>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein clears the EDNS options to be sent.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]expire</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Send an EDNS Expire option.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson<dt><span class="term"><code class="option">+[no]fail</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Do not try the next server if you receive a SERVFAIL.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The default is to not try the next server which is
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein the reverse of normal stub resolver behavior.
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews<dt><span class="term"><code class="option">+[no]header-only</code></span></dt>
561a29af8c54a216e7d30b5b4f6e0d21661654ecMark Andrews<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Send a query with a DNS header without a question section.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein The default is to add a question section. The query type
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and query name are ignored when this is set.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]identify</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Show [or do not show] the IP address and port number
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein that supplied the answer when the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <em class="parameter"><code>+short</code></em> option is enabled. If
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein short form answers are requested, the default is not
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein to show the source address and port number of the
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein server that provided the answer.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]idnout</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Convert [do not convert] puny code on output.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein This requires IDN SUPPORT to have been enabled at
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein compile time. The default is to convert output.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]ignore</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Ignore truncation in UDP responses instead of retrying
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein with TCP. By default, TCP retries are performed.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]keepopen</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Keep the TCP socket open between queries and reuse
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein it rather than creating a new TCP socket for each
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein lookup. The default is <code class="option">+nokeepopen</code>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]mapped</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Allow mapped IPv4 over IPv6 addresses to be used. The
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein default is <code class="option">+mapped</code>.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]multiline</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Print records like the SOA records in a verbose
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein multi-line format with human-readable comments. The
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein default is to print each record on a single line, to
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein facilitate machine parsing of the <span class="command"><strong>dig</strong></span>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein output.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+ndots=D</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Set the number of dots that have to appear in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <em class="parameter"><code>name</code></em> to <em class="parameter"><code>D</code></em>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein for it to be considered absolute. The default value
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein is that defined using the ndots statement in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="filename">/etc/resolv.conf</code>, or 1 if no
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein ndots statement is present. Names with fewer dots
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein are interpreted as relative names and will be searched
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein for in the domains listed in the <code class="option">search</code>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein or <code class="option">domain</code> directive in
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="filename">/etc/resolv.conf</code> if
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <code class="option">+search</code> is set.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]nsid</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Include an EDNS name server ID request when sending
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein a query.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]nssearch</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein When this option is set, <span class="command"><strong>dig</strong></span>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein attempts to find the authoritative name servers for
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein the zone containing the name being looked up and
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein display the SOA record that each name server has for
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein the zone.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]onesoa</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Print only one (starting) SOA record when performing
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein an AXFR. The default is to print both the starting
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein and ending SOA records.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]opcode=value</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein Set [restore] the DNS message opcode to the specified
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein value. The default value is QUERY (0).
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </p>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein </dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dt><span class="term"><code class="option">+[no]qr</code></span></dt>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein<dd>
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein <p>
Print [do not print] the query as it is sent. By
default, the query is not printed.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]question</code></span></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><span class="term"><code class="option">+[no]rdflag</code></span></dt>
<dd>
<p>
A synonym for <em class="parameter"><code>+[no]recurse</code></em>.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]recurse</code></span></dt>
<dd>
<p>
Toggle the setting of the RD (recursion desired) bit
in the query. This bit is set by default, which means
<span class="command"><strong>dig</strong></span> normally sends recursive
queries. Recursion is automatically disabled when
the <em class="parameter"><code>+nssearch</code></em> or
<em class="parameter"><code>+trace</code></em> query options are used.
</p>
</dd>
<dt><span class="term"><code class="option">+retry=T</code></span></dt>
<dd>
<p>
Sets the number of times to retry UDP queries to
server to <em class="parameter"><code>T</code></em> instead of the
default, 2. Unlike <em class="parameter"><code>+tries</code></em>,
this does not include the initial query.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]rrcomments</code></span></dt>
<dd>
<p>
Toggle the display of per-record comments in the
output (for example, human-readable key information
about DNSKEY records). The default is not to print
record comments unless multiline mode is active.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]search</code></span></dt>
<dd>
<p>
Use [do not use] the search list defined by the
searchlist or domain directive in
<code class="filename">resolv.conf</code> (if any). The search
list is not used by default.
</p>
<p>
'ndots' from <code class="filename">resolv.conf</code> (default 1)
which may be overridden by <em class="parameter"><code>+ndots</code></em>
determines if the name will be treated as relative
or not and hence whether a search is eventually
performed or not.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]short</code></span></dt>
<dd>
<p>
Provide a terse answer. The default is to print the
answer in a verbose form.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]showsearch</code></span></dt>
<dd>
<p>
Perform [do not perform] a search showing intermediate
results.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]sigchase</code></span></dt>
<dd>
<p>
Chase DNSSEC signature chains. Requires dig be compiled
with -DDIG_SIGCHASE. This feature is deprecated.
Use <span class="command"><strong>delv</strong></span> instead.
</p>
</dd>
<dt><span class="term"><code class="option">+split=W</code></span></dt>
<dd>
<p>
Split long hex- or base64-formatted fields in resource
records into chunks of <em class="parameter"><code>W</code></em>
characters (where <em class="parameter"><code>W</code></em> is rounded
up to the nearest multiple of 4).
<em class="parameter"><code>+nosplit</code></em> or
<em class="parameter"><code>+split=0</code></em> causes fields not to
be split at all. The default is 56 characters, or
44 characters when multiline mode is active.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]stats</code></span></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 behavior is to print the query
statistics.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]subnet=addr[/prefix-length]</code></span></dt>
<dd>
<p>
Send (don't send) an EDNS Client Subnet option with the
specified IP address or network prefix.
</p>
<p>
<span class="command"><strong>dig +subnet=0.0.0.0/0</strong></span>, or simply
<span class="command"><strong>dig +subnet=0</strong></span> for short, sends an EDNS
CLIENT-SUBNET option with an empty address and a source
prefix-length of zero, which signals a resolver that
the client's address information must
<span class="emphasis"><em>not</em></span> be used when resolving
this query.
</p>
</dd>
<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 behavior is to use UDP unless a type
<code class="literal">any</code> or <code class="literal">ixfr=N</code>
query is requested, in which case the default is TCP.
AXFR queries always use TCP.
</p>
</dd>
<dt><span class="term"><code class="option">+timeout=T</code></span></dt>
<dd>
<p>
Sets the timeout for a query to
<em class="parameter"><code>T</code></em> seconds. The default
timeout is 5 seconds.
An attempt to set <em class="parameter"><code>T</code></em> to less
than 1 will result
in a query timeout of 1 second being applied.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]topdown</code></span></dt>
<dd>
<p>
When chasing DNSSEC signature chains perform a top-down
validation. Requires dig be compiled with -DDIG_SIGCHASE.
This feature is deprecated. Use <span class="command"><strong>delv</strong></span> instead.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]trace</code></span></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,
<span class="command"><strong>dig</strong></span> 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> <p>
If @server is also specified, it affects only the
initial query for the root zone name servers.
</p> <p>
<span class="command"><strong>+dnssec</strong></span> is also set when +trace
is set to better emulate the default queries from a
nameserver.
</p>
</dd>
<dt><span class="term"><code class="option">+tries=T</code></span></dt>
<dd>
<p>
Sets the number of times to try UDP queries to server
to <em class="parameter"><code>T</code></em> instead of the default,
3. If <em class="parameter"><code>T</code></em> is less than or equal
to zero, the number of tries is silently rounded up
to 1.
</p>
</dd>
<dt><span class="term"><code class="option">+trusted-key=####</code></span></dt>
<dd>
<p>
Specifies a file containing trusted keys to be used
with <code class="option">+sigchase</code>. Each DNSKEY record
must be on its own line.
</p> <p>
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> <p>
Requires dig be compiled with -DDIG_SIGCHASE.
This feature is deprecated. Use <span class="command"><strong>delv</strong></span> instead.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]ttlid</code></span></dt>
<dd>
<p>
Display [do not display] the TTL when printing the
record.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]ttlunits</code></span></dt>
<dd>
<p>
Display [do not display] the TTL in friendly human-readable
time units of "s", "m", "h", "d", and "w", representing
seconds, minutes, hours, days and weeks. Implies +ttlid.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]unknownformat</code></span></dt>
<dd>
<p>
Print all RDATA in unknown RR type presentation format
(RFC 3597). The default is to print RDATA for known types
in the type's presentation format.
</p>
</dd>
<dt><span class="term"><code class="option">+[no]vc</code></span></dt>
<dd>
<p>
Use [do not use] TCP when querying name servers. This
alternate syntax to <em class="parameter"><code>+[no]tcp</code></em>
is provided for backwards compatibility. The "vc"
stands for "virtual circuit".
</p>
</dd>
<dt><span class="term"><code class="option">+[no]zflag</code></span></dt>
<dd>
<p>
Set [do not set] the last unassigned DNS header flag in a
DNS query. This flag is off by default.
</p>
</dd>
</dl></div>
<p>
</p>
</div>
<div class="refsection">
<a name="id-1.11"></a><h2>MULTIPLE QUERIES</h2>
<p>
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
queries can be supplied with its own set of flags, options and query
options.
</p>
<p>
In this case, each <em class="parameter"><code>query</code></em> 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 <code class="option">+[no]cmd</code> option) can be
overridden by a query-specific set of query options. For example:
</p>
<pre class="programlisting">
dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr
</pre>
<p>
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
<code class="literal">isc.org</code>.
A global query option of <em class="parameter"><code>+qr</code></em> is
applied, so
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 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>
<div class="refsection">
<a name="id-1.12"></a><h2>IDN SUPPORT</h2>
<p>
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 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 class="command"><strong>dig</strong></span> runs.
</p>
</div>
<div class="refsection">
<a name="id-1.13"></a><h2>FILES</h2>
<p><code class="filename">/etc/resolv.conf</code>
</p>
<p><code class="filename">${HOME}/.digrc</code>
</p>
</div>
<div class="refsection">
<a name="id-1.14"></a><h2>SEE ALSO</h2>
<p><span class="citerefentry">
<span class="refentrytitle">delv</span>(1)
</span>,
<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>,
<em class="citetitle">RFC1035</em>.
</p>
</div>
<div class="refsection">
<a name="id-1.15"></a><h2>BUGS</h2>
<p>
There are probably too many query options.
</p>
</div>
</div></body>
</html>