|
Domain Name Service
Introduction to DNSLinux comes with two ways of setting up a name service. The first way is a throwback to Unix, but is no longer used much, but still exists, and requires a minimalistic configuration. The information is stored in the file /etc/hosts, and two lines of information are sufficient :-
These two lines are created by the Linux installation process. When the name service is requested by a local application, this file is looked at first, if the required information is not there, then Linux goes and looks for a DNS server. First of all, Linux looks in a file /etc/resolv.conf - this file contains a pointer to a DNS server. Again, the installation of Linux creates the required information in this file, and the essential information is in three lines :-
Since 127.0.0.1 is the loopback address, it advises that the DNS server is on this host. Some documentation on the internet suggests that it is wrong to have both the domain line and the search line in this file. However since the installation of Linux creates this file, it may be preferable to leave it as it was created.
Configuring DNSOn Linux, the application that performs the DNS service is a daemon called "named". When the server is booted and "named" is started, it goes and looks in a file called /etc/named.conf. This file specifies to "named" where it will find the information it requires to offer a naming service. It starts by advising "named" where the relevant files are located, and then presents the information in a number of "zones".
The information above is sufficient for an isolated network, but if a network is connected to the outside world, there would have to be another zone which pointed to DNS servers in the outside world. The "named.for" file contains the main forward lookup table, and for this network it could look like
The "named.rev" file contains the information for reverse lookups, and for this network could look like
The "named.local" file provides reverse lookup for the local host, and again, for this network could look like
Configuring "named" is quite demanding - the information in the various files has to be in a very precise layout. It can take several shots to get it to load without errors. Then it can be tested with "nslookup" entered at the server console, and it should all be working okay. Thereafter it should also be functional okay for the other hosts on the network. However there is a more rigorous testing programme called "Dig". Dig is packaged with Caldera Linux 1.3 as standard, and looks more critically at all the file configurations. Even though "nslookup" suggests everything is working fine, Dig may refuse to work. A common type of error may exist - to do with dots at the end of domain names, which are either there when they should not be, or are missing when they should be present. In the file /etc/named.conf, there should be no dots after the domain names. In the /var/named/named.* files, there should be dots after all domain names. It is also worth mentioning that the names and the locations of the zone files are not fixed. In Caldera Linux 1.3, the directory /var/named/ is created by the installation process, but you don`t have to use it. The files can go elsewhere, and they can be called whatever you like - as long as the information in the /etc/named.conf matches.
© 2002 Ron Turner Return to the Linux index page
|
|