version 1.3, 2013/03/21 11:11:20
|
version 1.5, 2019/09/02 20:48:36
|
Line 9 going into detail on the setup of the se
|
Line 9 going into detail on the setup of the se
|
describes setting up a simple, small domain with one Domain Name System (DNS) |
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 |
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 |
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 <http://www.dns.net/dnsrd/>. |
|
|
## DNS Background and Concepts |
## DNS Background and Concepts |
|
|
Line 459 Following are the rest of the params:
|
Line 459 Following are the rest of the params:
|
|
|
* `listen-on port` -- This option defined the port and associated IP addresses |
* `listen-on port` -- This option defined the port and associated IP addresses |
this server will run |
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 |
on. Again, the "external" interface is not listened here, to prevent queries |
getting received from "outside". |
getting received from "outside". |
|
|
Line 669 operating system's "etc" set.
|
Line 669 operating system's "etc" set.
|
|
|
This section has described the most important files and settings for a DNS |
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 |
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. |
for more information. |
|
|
## Using DNS |
## Using DNS |
Line 686 In addition to being able to startup "na
|
Line 686 In addition to being able to startup "na
|
controlled with the `ndc` command. In a nutshell the `ndc` command can stop, |
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 |
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, |
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 |
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" |
man pages for more details on setting up communication channels between "ndc" |
and the "named" process. |
and the "named" process. |
|
|
Line 747 As can be seen, the domain was appended
|
Line 747 As can be seen, the domain was appended
|
www.yahoo.akadns.net has address 68.142.226.32 |
www.yahoo.akadns.net has address 68.142.226.32 |
|
|
Other commands for debugging DNS besides |
Other commands for debugging DNS besides |
[host(1)](http://netbsd.gw.com/cgi-bin/man-cgi?host+1+NetBSD-5.0.1+i386) are |
[[!template id=man name="host" section="1"]] are |
[nslookup(8)](http://netbsd.gw.com/cgi-bin/man-cgi?nslookup+8+NetBSD-5.0.1+i386) |
[[!template id=man name="nslookup" section="8"]] |
and |
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 |
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 |
is *not* useful for debugging DNS, as it will use whatever is configured in |
`/etc/nsswitch.conf` to do the name-lookup. |
`/etc/nsswitch.conf` to do the name-lookup. |
|
|
Line 784 Now we can start named:
|
Line 784 Now we can start named:
|
### Testing the server |
### Testing the server |
|
|
Now that the server is running we can test it using the |
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: |
program: |
|
|
$ nslookup |
$ nslookup |
Line 820 the cache of our own server.
|
Line 820 the cache of our own server.
|
The results of this first test confirm that the server is working correctly. |
The results of this first test confirm that the server is working correctly. |
|
|
We can also try the |
We can also try the |
[host(1)](http://netbsd.gw.com/cgi-bin/man-cgi?host+1+NetBSD-5.0.1+i386) and |
[[!template id=man name="host" section="1"]] and |
[dig(1)](http://netbsd.gw.com/cgi-bin/man-cgi?dig+1+NetBSD-5.0.1+i386) commands, |
[[!template id=man name="dig" section="1"]] commands, |
which give the following result. |
which give the following result. |
|
|
$ host www.NetBSD.org |
$ host www.NetBSD.org |
Line 853 which give the following result.
|
Line 853 which give the following result.
|
;; MSG SIZE sent: 32 rcvd: 175 |
;; MSG SIZE sent: 32 rcvd: 175 |
|
|
As you can see |
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". |
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. |
The other data given may be of interest when debugging DNS problems. |
|
|