--- wikisrc/guide/dns.mdwn 2013/03/10 09:58:15 1.2 +++ wikisrc/guide/dns.mdwn 2019/09/02 20:48:36 1.5 @@ -1,3 +1,7 @@ +**Contents** + +[[!toc levels=3]] + # The Domain Name System Use of the Domain Name System has been discussed in previous chapters, without @@ -5,7 +9,7 @@ going into detail on the setup of the se describes setting up a simple, small domain with one Domain Name System (DNS) nameserver on a NetBSD system. It includes a brief explanation and overview of the DNS; further information can be obtained from the DNS Resources Directory -(DNSRD) at [http://www.dns.net/dnsrd/](http://www.dns.net/dnsrd/). +(DNSRD) at . ## DNS Background and Concepts @@ -455,7 +459,7 @@ Following are the rest of the params: * `listen-on port` -- This option defined the port and associated IP addresses this server will run - [named(8)](http://netbsd.gw.com/cgi-bin/man-cgi?named+8+NetBSD-5.0.1+i386) + [[!template id=man name="named" section="8"]] on. Again, the "external" interface is not listened here, to prevent queries getting received from "outside". @@ -665,7 +669,7 @@ operating system's "etc" set. This section has described the most important files and settings for a DNS server. Please see the BIND documentation in `/usr/src/dist/bind/doc/bog` and -[named.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?named.conf+5+NetBSD-5.0.1+i386) +[[!template id=man name="named.conf" section="5"]] for more information. ## Using DNS @@ -682,9 +686,9 @@ In addition to being able to startup "na controlled with the `ndc` command. In a nutshell the `ndc` command can stop, start or restart the named server process. It can also do a great many other things. Before use, it has to be setup to communicate with the "named" process, -see the [ndc(8)](http://netbsd.gw.com/cgi-bin/man-cgi?ndc+8+NetBSD-5.0.1+i386) +see the [[!template id=man name="ndc" section="8"]] and -[named.conf(5)](http://netbsd.gw.com/cgi-bin/man-cgi?named.conf+5+NetBSD-5.0.1+i386) +[[!template id=man name="named.conf" section="5"]] man pages for more details on setting up communication channels between "ndc" and the "named" process. @@ -743,12 +747,12 @@ As can be seen, the domain was appended www.yahoo.akadns.net has address 68.142.226.32 Other commands for debugging DNS besides -[host(1)](http://netbsd.gw.com/cgi-bin/man-cgi?host+1+NetBSD-5.0.1+i386) are -[nslookup(8)](http://netbsd.gw.com/cgi-bin/man-cgi?nslookup+8+NetBSD-5.0.1+i386) +[[!template id=man name="host" section="1"]] are +[[!template id=man name="nslookup" section="8"]] and -[dig(1)](http://netbsd.gw.com/cgi-bin/man-cgi?dig+1+NetBSD-5.0.1+i386). Note +[[!template id=man name="dig" section="1"]]. Note that -[ping(8)](http://netbsd.gw.com/cgi-bin/man-cgi?ping+8+NetBSD-5.0.1+i386) +[[!template id=man name="ping" section="8"]] is *not* useful for debugging DNS, as it will use whatever is configured in `/etc/nsswitch.conf` to do the name-lookup. @@ -780,7 +784,7 @@ Now we can start named: ### Testing the server Now that the server is running we can test it using the -[nslookup(8)](http://netbsd.gw.com/cgi-bin/man-cgi?nslookup+8+NetBSD-5.0.1+i386) +[[!template id=man name="nslookup" section="8"]] program: $ nslookup @@ -816,8 +820,8 @@ the cache of our own server. The results of this first test confirm that the server is working correctly. We can also try the -[host(1)](http://netbsd.gw.com/cgi-bin/man-cgi?host+1+NetBSD-5.0.1+i386) and -[dig(1)](http://netbsd.gw.com/cgi-bin/man-cgi?dig+1+NetBSD-5.0.1+i386) commands, +[[!template id=man name="host" section="1"]] and +[[!template id=man name="dig" section="1"]] commands, which give the following result. $ host www.NetBSD.org @@ -849,7 +853,7 @@ which give the following result. ;; MSG SIZE sent: 32 rcvd: 175 As you can see -[dig(1)](http://netbsd.gw.com/cgi-bin/man-cgi?dig+1+NetBSD-5.0.1+i386) gives +[[!template id=man name="dig" section="1"]] gives quite a bit of output, the expected answer can be found in the "ANSWER SECTION". The other data given may be of interest when debugging DNS problems.