------------------------------------------------------------ revno: 3635 committer: Adam Sommer <[EMAIL PROTECTED]> branch nick: ubuntu-hardy timestamp: Fri 2007-11-30 08:48:59 -0500 message: Testing and Common Record type sections. modified: generic/server/C/dns.xml
=== modified file 'generic/server/C/dns.xml' --- a/generic/server/C/dns.xml 2007-11-29 14:13:52 +0000 +++ b/generic/server/C/dns.xml 2007-11-30 13:48:59 +0000 @@ -182,7 +182,7 @@ If you make multiple changes before restarting BIND9, simply increment the Serial once. </para> <para> - Now, you can add DNS records to the bottom of the zone file. + Now, you can add DNS records to the bottom of the zone file. See <xref linkend="dns-record-types"/> for details. </para> <note> <para> @@ -329,11 +329,201 @@ </note> </sect2> </sect1> + <sect1 id="dns-troubleshooting" status="review"> + <title>Troubleshooting</title> + <para> + This section covers ways to help determine the cause when problems happen with DNS and <application>BIND9</application>. + </para> + <sect2 id="dns-testing" status="review"> + <title>Testing</title> + <sect3 id="dns-resolv.conf" status="review"> + <title>resolv.conf</title> + <para> + The first step in testing <application>BIND9</application> is to add the nameserver's IP Address to a hosts resolver. + The Primary nameserver should be configured as well as another host to double check things. + Simply edit <filename>/etc/resolv.conf</filename> and add the following: + </para> +<programlisting> +nameserver 192.168.1.10 +nameserver 192.168.1.11 +</programlisting> + <note> + <para> + You should also add the IP Address of the Secondary nameserver in case the Primary becomes unavailable. + </para> + </note> + </sect3> + <sect3 id="dns-testing-ping" status="review"> + <title>ping</title> + <para> + Once a host has been configured to use the new nameserver one of the simplest tests is the + <application>ping</application> utility. From a terminal prompt enter: + </para> +<screen> +<command>ping example.com</command> +</screen> + <para> + This tests if the nameserver can resolve the name <emphasis>example.com</emphasis> to an IP Address. + The command output should resemble: + </para> +<programlisting> +PING example.com (192.168.1.10) 56(84) bytes of data. +64 bytes from ns (192.168.1.10): icmp_seq=1 ttl=64 time=0.800 ms +64 bytes from ns (192.168.1.10): icmp_seq=2 ttl=64 time=0.813 ms +</programlisting> + </sect3> + <sect3 id="dns-testing-dig" status="review"> + <title>dig</title> + <para> + If you installed the <application>dnsutils</application> package you can test your setup using the DNS lookup utility + <application>dig</application>: + </para> + <itemizedlist> + <listitem> + <para> + After installing <application>BIND9</application> use <application>dig</application> against the + loopback interface to make sure it is listening on port 53. From a terminal prompt: + </para> +<screen> +<command>dig -x 127.0.0.1</command> +</screen> + <para> + You should see lines similar to the following in the command output: + </para> +<programlisting> +;; Query time: 1 msec +;; SERVER: 192.168.1.10#53(192.168.1.10) +</programlisting> + </listitem> + <listitem> + <para> + If you have configured <application>BIND9</application> as a <emphasis>Caching</emphasis> nameserver "dig" an outside + domain to check the query time: + </para> +<screen> +<command>dig ubuntu.com</command> +</screen> + <para> + Note the query time toward the end of the command output: + </para> +<programlisting> +;; Query time: 49 msec +</programlisting> + <para> + After a second dig there should be improvement: + </para> +<programlisting> +;; Query time: 1 msec +</programlisting> + </listitem> + </itemizedlist> + </sect3> + <sect3 id="dns-testing-configuration" status="review"> + <title>named-checkzone</title> + <para> + A great way to test your zone files is by using the <application>named-checkzone</application> utility installed with the + <application>bind9</application> package. This utility allows you to make sure the configuration is correct + before restarting <application>BIND9</application> and making the changes live. + </para> + <itemizedlist> + <listitem> + <para> + To test our example Forward zone file enter the following from a command prompt: + </para> +<screen> +<command>named-checkzone example.com /etc/bind/db.example.com</command> +</screen> + <para> + If everything is configured correclty you should see output similar to: + </para> +<programlisting> +zone example.com/IN: loaded serial 6 +OK +</programlisting> + </listitem> + <listitem> + <para> + Similarly, to test the Reverse zone file enter the following: + </para> +<screen> +<command>named-checkzone example.com /etc/bind/db.192</command> +</screen> + <para> + The output should be similar to: + </para> +<programlisting> +zone example.com/IN: loaded serial 3 +OK +</programlisting> + </listitem> + </itemizedlist> + <note> + <para> + The <emphasis>Serial Number</emphasis> of your zone file will probably be different. + </para> + </note> + </sect3> + </sect2> + <sect2 id="dns-log-files" status="review"> + <title>Log Files</title> + <para> + To Do: add information about BIND9 logging capabilities. + </para> + </sect2> + </sect1> <sect1 id="dns-references" status="complete"> <title>References</title> + <sect2 id="dns-record-types" status="review"> + <title>Common Record Types</title> + <para> + This section covers some of the most common DNS record types. + </para> + <itemizedlist> + <listitem> + <para> + <emphasis>A</emphasis> record: This record maps an IP Address to a hostname. + </para> +<programlisting> +www IN A 192.168.1.12 +</programlisting> + </listitem> + <listitem> + <para> + <emphasis>CNAME</emphasis> record: Used to create an alias to an existing A record. You cannot create a CNAME record pointing to another CNAME record. + </para> +<programlisting> +web IN CNAME www +</programlisting> + </listitem> + <listitem> + <para> + <emphasis>MX</emphasis> record: Used to define where email should be sent to. Must point to an A record, not a CNAME. + </para> +<programlisting> + IN MX mail.example.com. +mail IN A 192.168.1.13 +</programlisting> + </listitem> + <listitem> + <para> + <emphasis>NS</emphasis> record: Used to define which servers serve copies of a zone. It must point to an A record, not a CNAME. + This is where Primary and Secondary servers are defined. + </para> +<programlisting> + IN NS ns.example.com. + IN NS ns2.example.com. +ns IN A 192.168.1.10 +ns2 IN A 192.168.1.11 +</programlisting> + </listitem> + </itemizedlist> + </sect2> + <sect2 id="dns-more-info" status="review"> + <title>More Information</title> <para> <ulink url="http://www.tldp.org/HOWTO/DNS-HOWTO.html">DNS HOWTO</ulink> </para> + </sect2> </sect1> </chapter> -- https://code.launchpad.net/~ubuntu-core-doc/ubuntu-doc/ubuntu-hardy You are receiving this branch notification because you are subscribed to it. To unsubscribe from this branch go to https://code.launchpad.net/~ubuntu-core-doc/ubuntu-doc/ubuntu-hardy/+subscription/ubuntu-core-doc. -- ubuntu-doc-commits mailing list ubuntu-doc-commits@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-doc-commits