Technical article 107297

How do I set up a primary nameserver and nameserver clients?

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

What files need to be configured to set up a Nameserver?

NOTE:     Starting with OpenServer 5.0.0, the default directory for nameserver
          configuration files is /etc/named.d.  There are sample files
          available for reference in both the /etc directory and the
          /etc/named.d directory.  You can still use the directory
          /usr/lib/named to hold the nameserver configuration files,
          but all the sample files are in the new location.

From SCO OpenServer 5.0.5, a new version of bind is used - version 8.1.1. This version requires the use of a named.conf file instead of named.boot. The syntax of named.conf is very different from the syntax of named.boot. If configuring SCO OpenServer 5.0.5 nameservers, use the README file and sample named.* files in /etc/named.d for information.

Solution

The following is a list of files that need to be configured on both the Nameserver (Section 1) and the client (Section 2), as well as some sample entries. These instructions outline the steps needed to configure a primary Nameserver.

This is for OpenServer 5.0.4 and below:

Section 1: Configuring the Nameserver:
(1) Log in as root onto the system that is going to be the
    Name Server.  For this example we assume that it is called
    "namesrvr". In this example, the IP address of "namesrvr" is
    192.1.1.10.
(2) Create the file /etc/named.boot. (See the NOTE section above
    if you are using OpenServer 5.0.5) This file is read when
    named starts up.  If this file does not exist, named will not
    start.  The entries in this file on "namesrvr" are:
directory       /usr/lib/named
cache           .                       root.cache
domain          company.COM
primary         company.COM             named.hosts
primary         1.1.192.in-addr.arpa    named.rev
primary         0.0.127.in-addr.arpa    named.local
forwarders      xxx.yyy.zzz.www xxx.yyy.zzz.www
where:

root.cache - contains data to be kept in a backup cache, such as names of root domain servers; named.hosts - contains authoritative data for the "sco.COM" domain in the master file format of RFC1035; named.rev - contains data for the domain 1.1.192.in-addr.arpa which is used to translate addresses in the 192.1.1 network to hostnames' named.local - contains data to translate the address for the special interface lo0 to hostname "localhost". forwarders - contact another DNS server on the Internet or provided by your ISP to resolve names that your Intranet server is not aware of on the Internet. This implies that there must be a router available to route the requests to on the network.

(3) Create the file /usr/lib/named/named.hosts.  The entries
    in this file are:
$INCLUDE        named.soa
localhost       IN A    127.0.0.1
host1           IN A    192.1.1.2
host2           IN A    192.1.1.3
.
.
.
where:

host1, host2, etc are the other hosts on the local network.

(4) Create the file /usr/lib/named/named.rev.  The entries in this
    file are:
$INCLUDE        named.soa
2       IN PTR          host1.company.COM.
3       IN PTR          host2.company.COM.
.                       .
.                       .
.                       .
where:

2, 3, ... are the host ids in the network 192.1.1. For example, host1 is 192.1.1.2, host2 is 192.1.1.3. IN is the object address type for objects connected to the DARPA internet. PTR indicates that it is a domain name pointer.

** NOTE **: The trailing dots after the host names above are significant and must be included in the file!

(5) Create the file /usr/lib/named/named.local.   The entries in
    this file are:
$INCLUDE        named.soa
1               IN PTR localhost.

** NOTE **: The trailing dots after the host names above are significant and must be included in the file!

(6) Create the file /usr/lib/named/named.soa.  The entries in this
    file are:
@       IN SOA  namesrvr.company.com.   root.namesrvr.company.com. (
                100000  ;       Serial
                10800   ;       Refresh
                1800    ;       Retry
                36000000;       Expire
                86400 ) ;       Minimum
IN NS   namesrvr.company.com.
The Serial field should be changed each time the master file is
changed.  Secondary servers check the serial number at intervals
specified by the refresh time in seconds.  For further information
on these values, see the manual page for named(ADMN) in the SCO
TCP/IP Administrator's Guide.

** NOTE **: The trailing dots after the host names above are significant and must be included in the file!

(7) Reboot the server system.
Section 2:  Configuring the Client system:
On a client, the resolver configuration file /etc/resolv.conf
contains information that is read by the resolver routines the
first time they are invoked by a process.  If /etc/resolv.conf
exists on a system, hostnames are resolved by querying a remote
name server as specified by this file, using gethostbyname(SLIB)
or gethostbyaddr(SLIB), instead of using the local /etc/hosts file.

(1) Log in as root on the client.

(2) Create the file /etc/resolv.conf on host1.  The entries in
    this file are:
domain          company.com
nameserver      192.1.1.10
hostresorder    local bind
search          intranet.company.com company.com

where 192.1.1.10 is the IP address of "namesrvr".

where hostresorder defines that names will be resolved locally in /etc/hosts first then via the DNS entries

where search defines that names can be resolved without the intranet.company.com or company.com part of the fully qualified domain name (FQDN).

To check if the Nameserver is working correctly use the
nslookup(TC) command.  nslookup queries the name server for
information regarding a specific host. nslookup should function
the same way on both the server and client systems.

"nslookup host1" should return the name and IP address of host1 as follows:

Server:         namesrvr.company.com
Address:        192.1.1.10
Name:           host1.company.com
Address:        192.1.1.2
You will need to have a /etc/resolv.conf on the Primary Nameserver so
that the Nameserver can resolve queries.  For example:
domain          company.com
nameserver      192.1.1.10

Alternatively, you could use 127.0.0.1 or 0.0.0.0 denoting localhost.

You may wish to include a number of internal nameserver's should the
primary nameserver not be contactable.  You could then set these
nameservers up as "Secondary" nameservers which would obtain their
DNS information from the Primary nameserver.  You can also have
"Cached" nameservers that record the Fully Qualified Domain Names &
IP Addresses locally on the server to save the client from going to
a Primary or Secondary nameserver to resolve them. ie. the entries
are cached, like a Proxy Web Server.

See also

This article in no way represents a complete description of the functionality of Domain Name Service and its use. For a more complete description and explanation, see the book _DNS and BIND_, Paul Albitz and Cricket Liu, O'Reilly and Associates Inc, 1993.

TA109375, "How do I determine the version of BIND that is running on OpenServer 5?"

TA110029, "SCOhelp section on setting up DNS for SCO OpenServer 5.0.5 refers to nonexistent files."

TA110272, "After upgrading from a system running BIND 4.9 to one running BIND 8.1, the complete zone will not load."

TA110903, "What do the named statistics mean in /usr/adm/syslog?"

From the Xinuos technical article database, record 107297. Reproduced with permission. The original is at www.sco.com/ta/107297, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.