HP OpenVMS Systems Documentation

Content starts here HP TCP/IP Services for OpenVMS

HP TCP/IP Services for OpenVMS
Management


Previous Contents Index

6.6.2.2 Zone File Directives

While the master file format itself is class independent, all records in a master file must be of the same class. The master file directives are described in the following list:

  • $ORIGIN domain-name [comment ]
    Sets the domain name that is appended to any unqualified records. When a zone is first read, an implicit $ORIGIN zone-name directive is applied.
    If domain specified is not absolute, the current $ORIGIN is appended to it.
    For example, the following are interpreted the same way:


    $ORIGIN example.com
    WWW     CNAME   MAIN-SERVER
    

    And:


    WWW.EXAMPLE.COM. CNAME MAIN-SERVER.EXAMPLE.COM.
    
  • $INCLUDE filename [ origin ] [ comment ]
    Reads and processes the specified file as if it were included into the file at this point. If origin is specified, the file is processed with $ORIGIN set to that value; otherwise, the current $ORIGIN is used.
    Once the file has been read, the origin and the current domain name revert to the values they had prior to the $INCLUDE.
  • $TTL default-ttl [comment]
    Sets the default time to live (TTL) for subsequent records with undefined TTLs. Valid TTLs are in the range of 0---2147483647 seconds.

6.6.3 Saving Backup Copies of Zone Data

A slave name server saves backup copies of the zone data in SYS$SPECIFIC:[TCPIP$BIND]. Do not delete these backup copies. When the master server is down and the slave server is running, the slave server cannot perform a zone transfer until the master server comes back up. However, with backup copies, the slave server has some data (though possibly out of date) to perform its basic tasks.

6.6.4 Sample Database Files

The following sections provide sample BIND database files.

6.6.4.1 Local Loopback

In the LOCALHOST.DB file, 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:


;
; File name:      LOCALHOST.DB
; Product:        HP TCP/IP Services for OpenVMS
; Version:        V5.4
;
; © Copyright 1976, 2003 Hewlett-Packard Development Company, L.P.
;
; BIND data file for local loopback interface (forward translation).
;
;
$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:


;
; File name:      127_0_0.DB
; Product:        HP TCP/IP Services for OpenVMS
; Version:        V5.4
;
; © Copyright 1976, 2003 Hewlett-Packard Development Company, L.P.
;
;
; BIND data file for local loopback interface (forward translation)
;
$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 reverse 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.

6.6.4.2 Hint 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 hint file.

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


;
; File name:      ROOT.HINT
; Product:        HP TCP/IP Services for OpenVMS
; Version:        V5.4
;
; © Copyright 1976, 2003 Hewlett-Packard Development Company, L.P.
;
;
; DESCRIPTION:
;
;    Data file for initial cache data for root domain servers.
;
; <<>> DiG 9.2.1 <<>>
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11672
;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13

;; QUESTION SECTION:
;.                              IN      NS

;; ANSWER SECTION:
.                       102059  IN      NS      A.ROOT-SERVERS.NET.
.                       102059  IN      NS      B.ROOT-SERVERS.NET.
.                       102059  IN      NS      C.ROOT-SERVERS.NET.
.                       102059  IN      NS      D.ROOT-SERVERS.NET.
.                       102059  IN      NS      E.ROOT-SERVERS.NET.
.                       102059  IN      NS      F.ROOT-SERVERS.NET.
.                       102059  IN      NS      G.ROOT-SERVERS.NET.
.                       102059  IN      NS      H.ROOT-SERVERS.NET.
.                       102059  IN      NS      I.ROOT-SERVERS.NET.
.                       102059  IN      NS      J.ROOT-SERVERS.NET.
.                       102059  IN      NS      K.ROOT-SERVERS.NET.
.                       102059  IN      NS      L.ROOT-SERVERS.NET.
.                       102059  IN      NS      M.ROOT-SERVERS.NET.

;; ADDITIONAL SECTION:
A.ROOT-SERVERS.NET.     188459  IN      A       198.41.0.4
B.ROOT-SERVERS.NET.     188459  IN      A       128.9.0.107
C.ROOT-SERVERS.NET.     188459  IN      A       192.33.4.12
D.ROOT-SERVERS.NET.     188459  IN      A       128.8.10.90
E.ROOT-SERVERS.NET.     188459  IN      A       192.203.230.10
F.ROOT-SERVERS.NET.     188459  IN      A       192.5.5.241
G.ROOT-SERVERS.NET.     188459  IN      A       192.112.36.4
H.ROOT-SERVERS.NET.     188459  IN      A       128.63.2.53
I.ROOT-SERVERS.NET.     188459  IN      A       192.36.148.17
J.ROOT-SERVERS.NET.     188459  IN      A       192.58.128.30
K.ROOT-SERVERS.NET.     188459  IN      A       193.0.14.129
L.ROOT-SERVERS.NET.     188459  IN      A       198.32.64.12
M.ROOT-SERVERS.NET.     188459  IN      A       202.12.27.33

;; Query time: 1069 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue May  6 11:06:27 2003
;; MSG SIZE  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:

  1. Run TCPIP$CONFIG.
  2. Select the Server Components menu.
  3. Select the BIND server.
  4. Enable the BIND server.

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

6.6.4.3 Forward Translation File

The forward translation file, domain_name.DB, stores host-name-to-address mapping. For example, the database file UCX_ERN_SEA_COM.DB is created for the domain UCX.ERN.SEA.COM.

The following example shows a domain_name.DB file:


$TTL 86400
$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 or 90
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 and has the following characteristics:

  • Begins with an SOA record and a few NS records that define the domain and its servers.
  • Maps host names to IP addresses.
  • Contains A, MX, CNAME, and other records.

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.

6.6.4.4 Reverse Translation File

The reverse translation file, address.DB, stores address-to-host-name mapping (reverse mapping) information. For example, the database file 208_20_9_IN-ADDR_ARPA.DB is created for the domain 208.20.9.IN-ADDR.ARPA.

The following example shows an address.DB file:


$TTL 86400
$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 predominate in this file because they are used to translate addresses to host names.

6.7 Examining Name Server Statistics

The BIND server collects statistics that record server activity. To examine BIND statistics, use one of the following commands:

  • The TCP/IP management command SHOW NAME_SERVICE /STATISTICS
  • The rndc stats command

Statistics are logged to the TCPIP$BIND.STATS file, located in SYS$SPECIFIC:[TCPIP$BIND].

The following sample shows a statistics log:


+++ Statistics Dump +++ (1004986341)
success 17
referral 0
nxrrset 1
nxdomain 1
recursion 6
failure 0
--- Statistics Dump --- (1004986341)

The statistics dump begins with the line +++ Statistics Dump +++ (973798949) . The number in parentheses is a standard UNIX timestamp, measured as seconds since January 1, 1970. Following that line are a series of lines containing a counter type, the value of the counter, a zone name (optional), and a view name (optional).

The lines without view and zone listed are global statistics for the entire server. Lines with a zone and view name are for the given view and zone. (The view name is omitted for the default view.)

The statistics dump ends with the line --- Statistics Dump --- (973798949) The number in parentheses is identical to the number in the beginning line.

The following statistics counters are maintained:

  • success
    The number of successful queries made to the server or zone. A successful query is defined as query that returns a NOERROR response other than a referral response.
  • referral
    The number of queries that resulted in referral responses.
  • nxrrset
    The number of queries that resulted in NOERROR responses with no data.
  • nxdomain
    The number of queries that resulted in NXDOMAIN responses.
  • recursion
    The number of queries that caused the server to perform recursion in order to find the final answer.
  • failure
    The number of queries that resulted in a failure response other than those described in the previous counters.

6.8 Configuring BIND with the SET CONFIGURATION Command

The following sections describe how to set up BIND servers manually using the TCP/IP management command SET CONFIGURATION BIND.

Note

This command creates a UCX Version 4.x configuration. If you set up your BIND name server using this command, you must also use the TCP/IP management command CONVERT/CONFIGURATION BIND command to convert the databases to the BIND Version 9 format. If you omit this step, your changes will not take effect.

6.8.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, use the SET CONFIGURATION BIND command. Use the SHOW CONFIGURATION BIND command to display BIND information from the configuration database (TCPIP$CONFIGURATION.DAT).

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, use the SHOW CONFIGURATION BIND command.

6.8.2 Setting Up a Secondary (Slave) Name Server

You can configure a secondary server to populate itself by copying the DNS database files from the master server.

To configure a secondary server, enter the following commands:


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, -
_TCPIP> FILE:UCX_ERN_SEA_COM.DB,HOST:OWL)


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

6.8.3 Setting Up a Cache-Only Server

To configure a cache-only server, enter the following command:


TCPIP> SET CONFIGURATION BIND /CACHE

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

6.8.4 Setting Up a Forwarder Name Server

To configure a forwarder server, enter the following command:



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

In this command, host specifies the forwarding server.

Note

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

6.9 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 the information is not found, the resolver then queries the BIND name server for host information.

Note

The BIND resolver is based on the BIND Version 8 implementation of DNS.

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


TCPIP> SHOW NAME_SERVICE

TCP/IP Services displays the following data:


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 the default name server. To add records to the local hosts database, use the SET HOST command. For example, the following command adds host birdy to the local hosts database. (For more information about using SET commands, see the HP TCP/IP Services for OpenVMS Management Command Reference manual.)



TCPIP> SET HOST birdy /ADDRESS=9.20.208.47

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


TCPIP> SET NAME_SERVICE /NOSERVER=LARK /SYSTEM

This command modifies the volatile database. To make a change to the permanent database, enter the SET CONFIGURATION NAME_SERVICE command.

To view the results, enter the SHOW CONFIGURATION NAME_SERVICE command.

6.9.1 Changing the Default Configuration

To add a new server and enable the BIND resolver, enter the following command:


TCPIP> SET NAME_SERVICE /SERVER=host /ENABLE /SYSTEM

For host, specify the host name or IP address of the BIND server or servers that the BIND resolver is to query.

To specify multiple hosts, list them by request preference. The BIND resolver sends the first lookup request to the first host on the list.

If you define a server list and then add a new server with the SET NAME_SERVICE /SERVER command, the new server is added to the end of the list.

SET commands affect the volatile database. To save your changes to the permanent database, use the SET CONFIGURATION commands. The changes you make with the SET CONFIGURATION commands take effect the next time the software starts up. For example:


TCPIP> SET CONFIGURATION NAME_SERVICE /SERVER=host /ENABLE


TCPIP> SHOW CONFIGURATION NAME_SERVICE

BIND Resolver Configuration

  Transport:  UDP
  Domain:     ucx.ern.sea.com
  Retry:         4
  Timeout:       4
  Servers:    9.20.208.47, 9.20.208.53
  Path:       No values defined

6.9.2 Examples

The following command defines hosts PARROT, SORA, and JACANA as systemwide BIND servers and enables the BIND resolver:


PARROT> TCPIP
TCPIP> SET NAME_SERVICE /SERVER=(PARROT,SORA,JACANA) /SYSTEM /ENABLE

The following example defines, for the current login session, host OSPREY as the BIND server. As a result, the servers that are defined systemwide are not queried.


TCPIP> SET NAME_SERVICE /SERVER=OSPREY

6.9.3 Resolver Default Search Behavior

By default, if no search list is defined and the host name as you typed it has no dot (.) in the name, the BIND resolver performs a lookup using the following forms of the host name (in this order):

  1. The host name, with the default domain appended
  2. Just the host name

For example, suppose you enter the following command:


TCPIP> SHOW HOST OWL

Assuming that the default domain is ucx.ern.sea.com , the resolver performs lookups as follows:

  1. On the host name and domain owl.ucx.ern.sea.com .
  2. If that lookup was unsuccessful, the resolver searches for host owl .

This behavior is different than the resolver lookup behavior in previous releases (UCX BIND Version 4.x.). The following section provides more information.


Previous Next Contents Index