[deployment-guide/comm-rel: 426/727] Added the Using the dig Utility section.

Jaromir Hradilek jhradile at fedoraproject.org
Tue Oct 19 13:00:35 UTC 2010


commit 34989d1e88b2ab300a26601cf8929d9903f75149
Author: Jaromir Hradilek <jhradile at redhat.com>
Date:   Wed Aug 18 18:54:40 2010 +0200

    Added the Using the dig Utility section.
    
    This is the initial version, and will be probably rewritten/extended
    after the consultation with SME.

 en-US/The_BIND_DNS_Server.xml |  124 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 123 insertions(+), 1 deletions(-)
---
diff --git a/en-US/The_BIND_DNS_Server.xml b/en-US/The_BIND_DNS_Server.xml
index 7999a5f..73e8384 100644
--- a/en-US/The_BIND_DNS_Server.xml
+++ b/en-US/The_BIND_DNS_Server.xml
@@ -177,7 +177,6 @@
       <para>
         BIND consists of a set of DNS-related programs. It contains a monolithic nameserver called <systemitem class="service">named</systemitem>, an administration utility called <command>rndc</command>, and a debugging tool called <command>dig</command>. Refer to <xref linkend="ch-Controlling_Access_to_Services" /> for more information on how to run a service in &MAJOROS;.
       </para>
-      <!-- TODO: Add "dig" utility decription -->
     </section>
   </section>
   <section id="s1-bind-namedconf">
@@ -1755,6 +1754,129 @@ The zone reload and thaw was successful.</screen>
       </para>
     </section>
   </section>
+  <section id="s1-bind-dig">
+    <title>Using the <command>dig</command> Utility</title>
+    <para>
+      The <command>dig</command> utility is a command line tool that allows you to perform DNS lookups and debug a nameserver configuration. Its typical usage is as follows:
+    </para>
+    <screen><command>dig</command> [@<replaceable>server</replaceable>] [<replaceable>option</replaceable>...] <replaceable>name</replaceable> <replaceable>type</replaceable></screen>
+    <para>
+      Refer to <xref linkend="s3-bind-zone-rr" /> for a list of common <replaceable>type</replaceable>s.
+    </para>
+    <section id="s2-bind-dig-ns">
+      <title>Looking Up a Nameserver</title>
+      <para>
+        To look up a nameserver for a particular domain, use the command in the following form:
+      </para>
+      <screen><command>dig</command> <replaceable>name</replaceable> NS</screen>
+      <para>
+        In <xref linkend="example-bind-dig-ns" />, the <command>dig</command> utility is used to display nameservers for <systemitem class="domainname">example.com</systemitem>.
+      </para>
+      <example id="example-bind-dig-ns">
+        <title>A Sample Nameserver Lookup</title>
+        <screen>~]$ <command>dig example.com NS</command>
+
+; &lt;&lt;&gt;&gt; DiG 9.7.1-P2-RedHat-9.7.1-2.P2.fc13 &lt;&lt;&gt;&gt; example.com NS
+;; global options: +cmd
+;; Got answer:
+;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 57883
+;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
+
+;; QUESTION SECTION:
+;example.com.                   IN      NS
+
+;; ANSWER SECTION:
+example.com.            99374   IN      NS      a.iana-servers.net.
+example.com.            99374   IN      NS      b.iana-servers.net.
+
+;; Query time: 1 msec
+;; SERVER: 10.34.255.7#53(10.34.255.7)
+;; WHEN: Wed Aug 18 18:04:06 2010
+;; MSG SIZE  rcvd: 77</screen>
+      </example>
+    </section>
+    <section id="s2-bind-dig-a">
+      <title>Looking Up an IP Address</title>
+      <para>
+        To look up an IP address assigned to a particular domain, use the command in the following form:
+      </para>
+      <screen><command>dig</command> <replaceable>name</replaceable> A</screen>
+      <para>
+        In <xref linkend="example-bind-dig-a" />, the <command>dig</command> utility is used to display the IP address of <systemitem class="domainname">example.com</systemitem>.
+      </para>
+      <example id="example-bind-dig-a">
+        <title>A Sample IP Address Lookup</title>
+        <screen>~]$ <command>dig example.com A</command>
+
+; &lt;&lt;&gt;&gt; DiG 9.7.1-P2-RedHat-9.7.1-2.P2.fc13 &lt;&lt;&gt;&gt; example.com A
+;; global options: +cmd
+;; Got answer:
+;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 4849
+;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
+
+;; QUESTION SECTION:
+;example.com.                   IN      A
+
+;; ANSWER SECTION:
+example.com.            155606  IN      A       192.0.32.10
+
+;; AUTHORITY SECTION:
+example.com.            99175   IN      NS      a.iana-servers.net.
+example.com.            99175   IN      NS      b.iana-servers.net.
+
+;; Query time: 1 msec
+;; SERVER: 10.34.255.7#53(10.34.255.7)
+;; WHEN: Wed Aug 18 18:07:25 2010
+;; MSG SIZE  rcvd: 93</screen>
+      </example>
+    </section>
+    <section id="s2-bind-dig-x">
+      <title>Looking Up a Hostname</title>
+      <para>
+        To look up a hostname for a particular IP address, use the command in the following form:
+      </para>
+      <screen><command>dig</command> <option>-x</option> <replaceable>address</replaceable></screen>
+      <para>
+        In <xref linkend="example-bind-dig-x" />, the <command>dig</command> utility is used to display the hostname assigned to <systemitem class="ipaddress">192.0.32.10</systemitem>.
+      </para>
+      <example id="example-bind-dig-x">
+        <title>A Sample Hostname Lookup</title>
+        <screen>~]$ <command>dig -x 192.0.32.10</command>
+
+; &lt;&lt;&gt;&gt; DiG 9.7.1-P2-RedHat-9.7.1-2.P2.fc13 &lt;&lt;&gt;&gt; -x 192.0.32.10
+;; global options: +cmd
+;; Got answer:
+;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 29683
+;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 5, ADDITIONAL: 6
+
+;; QUESTION SECTION:
+;10.32.0.192.in-addr.arpa.      IN      PTR
+
+;; ANSWER SECTION:
+10.32.0.192.in-addr.arpa. 21600 IN      PTR     www.example.com.
+
+;; AUTHORITY SECTION:
+32.0.192.in-addr.arpa.  21600   IN      NS      b.iana-servers.org.
+32.0.192.in-addr.arpa.  21600   IN      NS      c.iana-servers.net.
+32.0.192.in-addr.arpa.  21600   IN      NS      d.iana-servers.net.
+32.0.192.in-addr.arpa.  21600   IN      NS      ns.icann.org.
+32.0.192.in-addr.arpa.  21600   IN      NS      a.iana-servers.net.
+
+;; ADDITIONAL SECTION:
+a.iana-servers.net.     13688   IN      A       192.0.34.43
+b.iana-servers.org.     5844    IN      A       193.0.0.236
+b.iana-servers.org.     5844    IN      AAAA    2001:610:240:2::c100:ec
+c.iana-servers.net.     12173   IN      A       139.91.1.10
+c.iana-servers.net.     12173   IN      AAAA    2001:648:2c30::1:10
+ns.icann.org.           12884   IN      A       192.0.34.126
+
+;; Query time: 156 msec
+;; SERVER: 10.34.255.7#53(10.34.255.7)
+;; WHEN: Wed Aug 18 18:25:15 2010
+;; MSG SIZE  rcvd: 310</screen>
+      </example>
+    </section>
+  </section>
   <section id="s1-bind-features">
     <title>Advanced Features of BIND</title>
     <indexterm>


More information about the docs-commits mailing list