DIGITAL TCP/IP Services for OpenVMS
Management


Previous Contents Index

5.5 Populating the BIND Server Databases

To populate the BIND server database files, use one of the following methods:

5.5.1 Using Existing Databases

To populate the BIND server database by copying information from the hosts database and other database files, enter the CONVERT/UNIX BIND command. This command:

If the BIND server's directory is SYS$SPECIFIC:[TCPIP$BIND] and you have specified domain abc.def.com, the default output file is named:

SYS$SPECIFIC:[TCPIP$BIND]ABC_DEF_COM.DB

Compaq suggests that you do not change the default directory. If you do, the file is created in your current directory.

On the command line, specify the full OpenVMS file specification. Do not specify a version number, and do not use wildcards. The following example uses the domain ucx.ern.sea.com, creates a UCX_ERN_SEA_COM.DB file, creates a 208_20_9_IN-ADDR_ARPA.DB file, and checks the results by displaying directory listings with the new file.


TCPIP>  CONVERT/UNIX BIND /DOMAIN=UCX.ERN.SEA.COM 
TCPIP>  CONVERT/UNIX BIND /DOMAIN=208.20.9.IN-ADDR.ARPA 
"local and cache files exists/can be 
   retrieved from internet hosts". 
 
$ 
 
TCPIP>  SET DEFAULT SYS$SPECIFIC:[TCPIP$BIND] 
$ DIRECTORY 
Directory SYS$SPECIFIC:[TCPIP$BIND] 
 
127_0_0.DB;1        208_20_9_IN-ADDR_ARPA.DB;1             
LOCALHOST.DB;1 
LOGIN.COM;1         ROOT.HINT;1         TCPIP$BIND.CONF;1 
TCPIP$BIND_CONF.TEMPLATE;1              TCPIP$BIND_RUN.LOG;4339 
TCPIP$BIND_SERVER.PID;1                 UCX_ERN_SEA_COM.DB;5 
 

5.5.2 Manually Editing Zone Files

All name server zone files use the same type of records to define domain database information. Compaq recommends that you review these resource records before editing any BIND files. The standard resource records (RR) are summarized in Table 5-11.

Table 5-11 Standard Resource Record Types
Record Type Description
SOA Start of authority. Marks the beginning of a zone's data and defines parameters that affect the entire zone.
NS Name server. Identifies a domain's name server.
A Address. Maps a host name to an address.
PTR Pointer. Maps an address to a host name.
MX Mail exchange. Identifies where to deliver mail for a given domain.
CNAME Canonical name. Defines an alias host name.
HINFO Host Information. Describes a host's hardware and operating system.
WKS Well-known service. Advertises network services.

The format of DNS records is as follows:

[name] [ttl] IN type data

where:
name Specifies the name of the domain object referenced by a resource record. The string entered for name is the current domain unless it ends with a dot. If the name field is blank, the record applies to the domain object last named.
ttl Defines the length of time, in seconds, that the information in this resource record should be kept in cache. Usually, the time-to-live field is left blank, and the default ttl, set for the entire zone SOA record, is used.
IN Identifies the record as an Internet DNS resource record.
type Identifies what kind of resource record this is. (See Table 5-11 for the available record types you can specify.)
data Information specific to this type of resource record. For example, in an A record, this is the field that contains the actual IP address.

5.5.3 Saving Backup Copies of Zone Data

The name server saves backup copies of the zone data in SYS$SPECIFIC:[TCPIP$BIND]. Do not delete your backup copies. When the master server is down and the secondary server is started, the secondary server cannot perform a zone transfer until the master server is up. However, with backup copies, the secondary server has some data, though possibly out of date, to perform its basic tasks.

5.5.4 Sample Database Files

The following sections provide sample BIND database files.

5.5.4.1 Local Loopback: Forward and Reverse Translation Files

In the LOCALHOST.DB file, the network address is usually 127.0.0, and the local host address is usually 127.0.0.1. The following sample LOCALHOST.DB file shows the forward translation for the local loopback interface.


; 
; BIND data file for local loopback interface (forward 
translation). 
; 
; Provided for DIGITAL TCP/IP Services for OpenVMS. 
; 
$ORIGIN localhost. 
@                 1D IN SOA       @ root ( 
                                  42              ;Serial 
                                  3H              ;Refresh 
                                  15M             ;Retry 
                                  1W              ;Expiry 
                                  1D )            ;Minimum 
; 
                  1D IN NS        @ 
                  1D IN A         127.0.0.1 
 
 

The following sample 127_0_0.DB file shows the reverse translation for the local loopback interface.


; 
; BIND data file for local loopback interface (reverse 
translation). 
; 
; Provided for DIGITAL TCP/IP Services for OpenVMS. 
; 
$ORIGIN 0.0.127.in-addr.arpa. 
@                 1D IN SOA       localhost. 
root.localhost. ( 
                                  42              ;Serial 
                                  3H              ;Refresh 
                                  15M             ;Retry 
                                  1W              ;Expiry 
                                  1D )            ;Minimum 
; 
                  1D IN NS        localhost. 
1                 1D IN PTR       localhost. 
 

These local host databases provide forward and inverse translation for the widely used LOCALHOST name. The LOCALHOST name is always associated with the IP address 127.0.0.1 and is used for local loopback traffic.

5.5.5 The Hints File

This file contains root name server hints. Any name server running on a host without direct Internet connectivity should list the internal roots in its hints file.

The following sample shows a ROOT.HINT file. In earlier releases, this file was called NAMED.CA.


; Data file for initial cache data for root domain servers. 
; 
; Provided for DIGITAL TCP/IP Services for OpenVMS. 
; 
; <<>> DiG 8.1 <<>> @192.5.5.241 
; (1 server found) 
;; res options: init recurs defnam dnsrch 
;; got answer: 
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10 
;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13 
;; QUERY SECTION: 
;;      ., type = NS, class = IN 
; 
;; ANSWER SECTION: 
.             6D IN NS H.ROOT-SERVERS.NET. 
.             6D IN NS B.ROOT-SERVERS.NET. 
.             6D IN NS C.ROOT-SERVERS.NET. 
.             6D IN NS D.ROOT-SERVERS.NET. 
.             6D IN NS E.ROOT-SERVERS.NET. 
.             6D IN NS I.ROOT-SERVERS.NET. 
.             6D IN NS F.ROOT-SERVERS.NET. 
.             6D IN NS G.ROOT-SERVERS.NET. 
.             6D IN NS J.ROOT-SERVERS.NET. 
.             6D IN NS K.ROOT-SERVERS.NET. 
.             6D IN NS L.ROOT-SERVERS.NET. 
.             6D IN NS M.ROOT-SERVERS.NET. 
.             6D IN NS A.ROOT-SERVERS.NET. 
; 
;; ADDITIONAL SECTION: 
H.ROOT-SERVERS.NET.     5w6d16h IN A    128.63.2.53 
B.ROOT-SERVERS.NET.     5w6d16h IN A    128.9.0.107 
C.ROOT-SERVERS.NET.     5w6d16h IN A    192.33.4.12 
D.ROOT-SERVERS.NET.     5w6d16h IN A    128.8.10.90 
E.ROOT-SERVERS.NET.     5w6d16h IN A    192.203.230.10 
I.ROOT-SERVERS.NET.     5w6d16h IN A    192.36.148.17 
F.ROOT-SERVERS.NET.     5w6d16h IN A    192.5.5.241 
G.ROOT-SERVERS.NET.     5w6d16h IN A    192.112.36.4 
J.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.10 
K.ROOT-SERVERS.NET.     5w6d16h IN A    193.0.14.129 
L.ROOT-SERVERS.NET.     5w6d16h IN A    198.32.64.12 
M.ROOT-SERVERS.NET.     5w6d16h IN A    202.12.27.33 
A.ROOT-SERVERS.NET.     5w6d16h IN A    198.41.0.4 
; 
;; Total query time: 608 msec 
;; FROM: ucx.ern.sea.com to SERVER: 192.5.5.241 
;; WHEN: Mon May 18 15:26:19 1998 
;; MSG SIZE  sent: 17  rcvd: 436 
 
 

This cache initialization file contains NS records that name root servers and A records that provide the addresses of root servers.

To create a ROOT.HINT file:

This procedure creates the ROOT.HINT file and places the file in the SYS$SPECIFIC:{TCPIP$BIND] directory.

5.5.6 Forward Translation File

The forward translation file, domain_name.DB, stores host-name-to-address mapping. For example, for the domain ROBIN.BIRD.COM, the following database file is created. ROBIN_BIRD_COM.DB. The following example shows a domain_name.DB file:


$ORIGIN ucx.ern.sea.com. 
@               IN      SOA     owl.ucx.ern.sea.com. pmaster.owl.ern.sea.com. 
( 
                                23      ; Serial 
                                600     ; Refresh 
                                300     ; Retry 
                                172800  ; Expire 
                                43200 ) ; Minimum 
; 
                IN      NS      owl.ucx.ern.sea.com. 
                IN      NS      condor.ucx.ern.sea.com. 
; 
thrush          IN      A       9.20.208.53 
condor          IN      A       9.20.208.10 
birdy           IN      A       9.20.208.47 
                IN      MX      10 birdy.ucx.ern.sea.com. 
                IN      MX      100 inet-gw-1.pa.emu.com. 
                IN      MX      100 mts-gw.pa.emu.com. 
                IN      MX      200 crl.emu.com. 
                IN      MX      300 nester.emu.com. 
seagull         IN      A       9.20.208.30 
                IN      MX      10 seagull.ucx.ern.sea.com. 
                IN      MX      100 inet-gw-1.pa.emu.com. 
                IN      MX      100 mts-gw.pa.emu.com. 
                IN      MX      200 crl.emu.com. 
                IN      MX      300 nester.emu.com. 
owl             IN      A       9.20.208.72 
                IN      MX      10 owl.ucx.ern.sea.com. 
                IN      MX      100 inet-gw-1.pa.emu.com. 
                IN      MX      100 mts-gw.pa.emu.com. 
                IN      MX      200 crl.emu.com. 
                IN      MX      300 nester.emu.com. 
peacock         IN      A       9.20.208.73 
                IN      MX      10 pultdown.ucx.ern.sea.com. 
                IN      MX      100 inet-gw-1.pa.emu.com. 
                IN      MX      100 mts-gw.pa.emu.com. 
                IN      MX      200 crl.emu.com. 
                IN      MX      300 nester.emu.com. 
redwing         IN      A       9.20.208.79 
                IN      MX      10 redwing.ucx.ern.sea.com. 
                IN      MX      100 inet-gw-1.pa.emu.com. 
                IN      MX      100 mts-gw.pa.emu.com. 
                IN      MX      200 crl.emu.com. 
                IN      MX      300 nester.emu.com. 
robin           IN      A       9.20.208.47 
                IN      A       9.20.208.30 
                IN      A       9.20.208.72 

This file is created only for the master server. All other servers obtain this information from the master server. This file contains most of the domain information. Note, this file

MX records identify the servers in a domain that are used for forwarding mail. Use MX records and preference numbers to define the order in which mail servers are used. The lower the preference number, the more desirable the server.

5.5.7 Reverse Translation File

The reverse translation file, address.DB, stores address-to-host-name mapping (reverse mapping) information. For example, for the same domain, a file with the name 208_20_9_IN-ADDR_ARPA.DB is created.

The following example shows an address.DB file.


$ORIGIN 208.20.9.in-addr.arpa. 
@     IN   SOA   owl.ucx.ern.sea.com. pmaster.owl.ucx.ern.sea.com. 
( 
                          1       ; Serial 
                          600     ; Refresh 
                          300     ; Retry 
                          172800  ; Expire 
                          43200 ) ; Minimum 
; 
      IN      NS      owl.ucx.ern.sea.com. 
      IN      NS      condor.ucx.ern.sea.com. 
; 
53              IN      PTR     thrush.ucx.ern.sea.com. 
10              IN      PTR     condor.ucx.ern.sea.com. 
47              IN      PTR     birdy.ucx.ern.sea.com. 
30              IN      PTR     seagull.ucx.ern.sea.com. 
72              IN      PTR     owl.ucx.ern.sea.com. 
73              IN      PTR     peacock.ucx.ern.sea.com. 
79              IN      PTR     redwing.ucx.ern.sea.com. 

PTR records dominate this file because they are used to translate addresses to host names.

5.6 Examining Name Server Statistics

The BIND server collects statistics that record server activity. To examine BIND statistics, enter the SHOW NAME_SERVICE/STATISTICS command. This command logs statistics to the file TCPIP$BIND_SERVER_STATISTICS.LOG, located in SYS$SPECIFIC:[TCPIP$BIND]. (In previous versions of the TCP/IP services product, the SHOW NAME_SERVICE /STATISTICS command was used to display name server statistics such as the number of queries, failed responses, and incoming and outgoing packets.)

The following sample shows a statistics log:


 
34250   time since boot (secs) 
15670   time since reset (secs) 
12      Unknown query types 
20000   A queries 
540     SOA queries 
2399    MX queries 
867     ANY queries 
3       AXFR queries 
 
++ Name Server Statistics ++ 
(Legend) 
        RR      RNXD    RFwdR   RDupR   RFail 
        RFErr   RErr    RAXFR   RLame   ROpts 
        SSysQ   SAns    SFwdQ   SDupQ   SErr 
        RQ      RIQ     RFwdQ   RDupQ   RTCP 
        SFwdR   SFail   SFErr   SNaAns  SNXD 
(Global) 
        2 0 0 0 0  0 0 0 0 0  2 0 0 0 0  0 0 0 0 5  0 0 0 0 0 
-- Name Server Statistics -- 
++ Memory Statistics ++ 
      3:           9 gets,           2 rem 
      4:           7 gets,           0 rem (1 bl, 1022 
      5:          16 gets,           1 rem 
      6:           7 gets,           5 rem 
      7:          10 gets,           5 rem 
      8:          97 gets,          16 rem (1 bl, 485 ff) 
     13:           6 gets,           4 rem 
. 
. 
. 
    664:           5 gets,           1 rem (1 bl, 5 ff) 
    732:           2 gets,           0 rem (1 bl, 5 ff) 
   1040:           1 gets,           1 rem (1 bl, 2 ff) 
>= 1100:          23 gets,           9 rem 
-- Memory Statistics -- 
--- Statistics Dump --- (907337687) Fri Jan 2  10:14:47 1999 
 

5.7 Configuring BIND with SET CONFIGURATION Commands

The following sections describe how to manually set up BIND servers by entering SET CONFIGURATION BIND commands.

Important

These commands create a UCX V4.x configuration. If you set up your BIND name server using these commands, you must also use the CONVERT/CONFIGURATION BIND command to convert the databases to the BIND 8.1 format. If you omit this step, your changes will not take effect.

5.7.1 Setting Up a Master Name Server

To instruct the master name server to read the appropriate database files using the information in TCPIP$CONFIGURATION.DAT, enter SET CONFIGURATION BIND commands. Enter the SHOW CONFIGURATION BIND command to display BIND information from the configuration database (TCPIP$CONFIGURATION.DAT).

Example

The following commands tell the name server to read the appropriate files:


TCPIP>  SET CONFIGURATION BIND /CACHE 
 
TCPIP>  SET CONFIGURATION BIND - 
_TCPIP>  /PRIMARY=(DOMAIN:0.0.127.IN-ADDR.ARPA, FILE:NAMED.LOCAL) 
 
TCPIP>  SET CONFIGURATION BIND - 
_TCPIP>  /PRIMARY=(DOMAIN:UCX.ERN.SEA.COM, FILE:UCX_ERN_SEA_COM.DB) 
 
TCPIP>  SET CONFIGURATION BIND - 
_TCPIP>  /PRIMARY=(DOMAIN:208.20.9.IN-ADDR.ARPA, FILE:208_20_9_IN-ADDR_ARPA.DB) 

To view these settings, enter the SHOW CONFIGURATION BIND command.

5.7.2 Setting Up a Secondary (Slave) Name Server

Configure a secondary server to populate itself by copying the DNS database files from the master server.

To configure a secondary server, enter:


TCPIP> SET CONFIGURATION BIND /CACHE 
 
TCPIP> SET CONFIGURATION BIND - 
_TCPIP> /PRIMARY=(DOMAIN:0.0.127.IN-ADDR.ARPA, FILE:NAMED.LOCAL) 
 
TCPIP> SET CONFIGURATION BIND - 
_TCPIP> /SECONDARY=(DOMAIN:UCX.ERN.SEA.COM, - 
                    FILE:UCX_ERN_SEA_COM.DB, - 
                    HOST:OWL:UCX.ERN.SEA.COM)) 
 
TCPIP> SET CONFIGURATION BIND - 
_TCPIP> /SECONDARY=(DOMAIN:208.20.9.IN-ADDR.ARPA, - 
                    FILE:208_20_9_IN-ADDR_ARPA.DB, - 
                    HOST:OWL.UCX.ERN.SEA.COM)) 

5.7.3 Setting Up a Cache-only Server

To configure a cache-only server, enter:


 
SET CONFIGURATION BIND /CACHE 
 

This command points the server to the file NAMED.CA.

5.7.4 Setting Up a Forwarder Name Server

To configure a forwarder, enter:


 
TCPIP>  SET CONFIGURATION BIND /FORWARDER=(HOST:host) 
 

Note

You cannot set up a server to be both a forwarder and caching server.

5.8 Configuring the BIND Resolver

Your host uses the BIND resolver to obtain information from a name server. When a request for name translation arrives, the resolver first searches the local host database for the host information. If not found, the resolver then queries the BIND name server for host information.

The resolver is automatically configured by TCPIP$CONFIG when you choose "Option 1 --- Core Environment." To display your resolver configuration, enter the following command:


TCPIP> SHOW NAME_SERVICE 
 

The following displays:


 
BIND Resolver Parameters 
 
 Local domain: ucx.ern.sea.com 
 
 System 
 
  State:     Started, Enabled 
 
  Transport: UDP 
  Domain:    ucx.ern.sea.com 
  Retry:     4 
  Timeout:   4 
  Servers:   lark 
  Path:      ucx.ern.sea.com,ern.sea.com,sea.com 
 
 Process 
 
  State:     Enabled 
 
  Transport: 
  Domain: 
  Retry: 
  Timeout: 
  Servers: 
  Path:      

Here, host LARK in the current domain is used as the default name server. To add records to the local host database, use SET commands. For example, the following command adds host birdy to the local host database. (See the DIGITAL TCP/IP Services for OpenVMS Command Reference manual for more information on using SET commands.)


 
TCPIP> SET HOST birdy /ADDRESS=9.20.208.47 

To delete server entries from the configuration database (or to add new entries), use the following command:


TCPIP> SET NAME_SERVICE /NOSERVER=LARK /SYSTEM 

This command modifies the volatile database. To make changes permanent, also enter a SET CONFIGURATION NAME_SERVICE command to add the change to the permanent database. Enter another SHOW NAME_SERVICE command to view the results.


Previous Next Contents Index