# Compaq TCP/IP Services for OpenVMS
Management

Previous | Contents | Index

# 5.6 Configuring BIND with SET CONFIGURATION Commands

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

Important These commands create a UCX Version 4.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.6.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:

Example 5-9 Reading Database 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.

## 5.6.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 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, -
    _TCPIP>            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))

## 5.6.3 Setting Up a Cache-Only Server

To configure a cache-only server, enter:

    TCPIP> SET CONFIGURATION BIND /CACHE

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

## 5.6.4 Setting Up a Forwarder Name Server

To configure a forwarder, 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.

# 5.7 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

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 host database. (See the Compaq TCP/IP Services for OpenVMS Management 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, enter 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 a SHOW CONFIGURATION NAME_SERVICE command to view the results.

## 5.7.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

## 5.7.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

## 5.7.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:

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

For example, suppose you enter the 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.

## 5.7.4 Resolver Search Behavior in Earlier Releases

In previous releases, the resolver performed lookups as follows:

1. Appended the default domain to the host name and performed a lookup.
2. If the previous lookup failed, the resolver removed the leftmost label from the default domain name, appended the result to the host name and performed the lookup.
3. If that lookup failed, the resolver again removed the leftmost label from the default domain name, appended the result to the host name, and performed the lookup.

For each unsuccessful lookup, this procedure was repeated until only two labels remained in the resulting domain name.

If all these attempts failed, the resolver tried just the host name as typed (as long as it contained at least one dot).

For example, suppose you entered the command:

    TCPIP> SHOW HOST OWL

Assuming the default domain was `ucx.ern.sea.com` , the resolver performed lookups as follows:

1. On `owl.ucx.ern.sea.com` .
2. If the previous lookup was unsuccessful, the resolver searched for `owl.ern.sea.com` .
3. If that lookup was unsuccessful, the resolver searched for `owl.sea.com` .
4. Finally, if the preceding lookup was unsuccessful, the resolver searched for `owl` .

## 5.7.5 Setting the Resolver's Domain Search List

The search list is provided to make entering lookup commands easier by not requiring you to type fully qualified domain names. The search list consists of domain names that the resolver uses when performing lookups. By default, the search list consists of only the default domain, which is stored in the TCPIP$CONFIGURATION.DAT file.

You can change the elements in the search list by entering the SET NAME_SERVICE command, as shown in the following example:

    TCPIP> SET NAME_SERVICE /PATH=(ucx.ern.sea.com,dux.sea.com,mux.ern.sea.com)/SYSTEM

For example, if you enter the command:

    TCPIP> SHOW HOST CANARY

The resolver performs lookups in the following sequence:

1. On `canary.ucx.ern.sea.com` .
2. If the previous lookup was unsuccessful, the resolver searches for `canary.dux.sea.com` .
3. If that lookup was unsuccessful, the resolver searches for `canary.mux.ern.sea.com` .
4. If that lookup was unsuccessful, the resolver searches for `canary` .

In the following output of the SHOW NAME_SERVICE command, the PATH: label shows the search list information entered with the SET NAME_SERVICE /PATH command. This command displays systemwide information and process-specific information (if process-specific information is set).

    TCPIP> SHOW NAME_SERVICE

    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:   ucx, lemng, 16.99.0.10
    Path:      ucx.ern.sea.com, dux.ern.sea.com, mux.ern.sea.com

    Process

    State:     Enabled
    Transport:
    Domain:
    Retry:
    Timeout:
    Servers:
    Path:
    $

Any additions you make are appended to the end of the search list.

To remove an element from the search list, enter the following command:

    TCPIP> SET NAME_SERVICE /NOPATH=dux.ern.sea.com /SYSTEM

Note When you execute TCPIP$CONFIG.COM after upgrading from UCX to TCP/IP Services for OpenVMS, the system creates a domain search list that is consistent with the UCX default lookup behavior. TCPIP$CONFIG.COM uses the default domain to create a search list consisting of each parent domain. For example, if the default domain is `ucx.ern.sea.com` , the resulting search list is `ucx.ern.sea.com,ern.sea.com,sea.com` . You can modify the current search list by using the SET CONFIGURATION NAME_SERVER /PATH command.

# 5.8 Using NSLOOKUP to Query a Name Server

NSLOOKUP is a debugging tool provided with BIND that allows anyone to directly query a name server and retrieve information. Use NSLOOKUP to determine whether your local name server is running correctly or to retrieve information from remote servers.

NSLOOKUP makes direct queries to name servers around the world to obtain DNS information, which includes:

- Host names and addresses on the local domain
- Host names and addresses on remote domains
- Host names that serve as mail exchange (MX records)
- Name servers for a specific zone

## 5.8.1 Invoking NSLOOKUP

Table 5-12 shows how to start and stop NSLOOKUP.

Table 5-12 Starting and Stopping NSLOOKUP
Task | Command
--- | ---
Run NSLOOKUP. | `$ RUN SYS$SYSTEM:TCPIP$NSLOOKUP.EXE`
Terminate NSLOOKUP from within interactive mode. | `> EXIT`
Terminate the current NSLOOKUP session. | `> Ctrl/Z`

To run NSLOOKUP as a foreign command, enter the following command at the DCL prompt ($), or place the command in your LOGIN.COM file:

    $ NSLOOKUP :== SYS$SYSTEM:TCPIP$NSLOOKUP.EXE

You can then run an interactive NSLOOKUP session by entering:

    $ NSLOOKUP
    >

You can put NSLOOKUP `set` commands in an initialization file named SYS$LOGIN:NSLOOKUPINIT.INI. The commands are executed when you start NSLOOKUP.

## 5.8.2 Obtaining Help

You can obtain help by:

- Entering the following DCL command:

      $ HELP TCPIP_SERVICES NSLOOKUP

- Entering one of the following NSLOOKUP commands:

      > ?

  or

      > help

The following example shows the information available with the NSLOOKUP `help` (?) command:

    $ NSLOOKUP
    Default Server:  condor.lgk.dec.com
    Address:  16.99.208.53

    > ?

      Information available:

      <host>     About_nslookup        exit       finger     ls         lserver
      root       server     set

    Topic?

## 5.8.3 NSLOOKUP Commands

NSLOOKUP interprets unrecognized commands as host names. When using NSLOOKUP, apply these syntax rules:

- The command line must be fewer than 256 characters.
- Commands must be either all uppercase or all lowercase. NSLOOKUP does not accept commands in mixed case.

When NSLOOKUP first starts, you see the name and address of the default BIND server, followed by the NSLOOKUP prompt. In the following example, the default server is `condor.lgk.dec.com` .

    $ NSLOOKUP
    Default Server:  condor.lgk.dec.com
    Address:  16.99.208.53

    >

Table 5-13 lists the NSLOOKUP commands.

Table 5-13 NSLOOKUP Commands
Command | Function
--- | ---
host [ server] | Looks up information using the current default server or the server you specify. Enter the name of the host for which you need an IP address. For example, the following command searches for `www.whitehouse.gov` using the default server:
    > www.whitehouse.gov

    Server: condor.lgk.dec.com

    Address: 16.99.208.53

    Name: www.whitehouse.gov

    Addresses: 198.137.240.92, 198.137.240.91
The following command uses the server with IP address 128.45.45.40 to look up the host `snowy.frozen.weather.com` :
    > snowy.frozen.weather.com 128.45.45.40
`server domain` | Changes the default server to the domain you specify. The following command changes the default server using the current default server to look up information for the new default server, 128.45.35.40:
    > server 128.45.35.40
`lserver domain` | Changes the default server. The following command changes the default server using the initial default server to find information about 128.45.35.40:
    > lserver 128.45.35.40
`root` | Changes the default server to the server specified by the root option.
    > root
`ls` | Lists information about hosts in the domain you specify. The default output contains host names and their IP addresses. The options for `ls` are listed in Table 5-15. The following example redirects the output from the screen to the file `NSLOOKUP.temp` in the current directory.
    > ls -a frozen.weather.com > NSLOOKUP.temp
`help` or `?` | Displays a summary of the available commands.
`exit` | Exits NSLOOKUP.
`set` | Selects the type of information that NSLOOKUP displays. Table 5-14 lists the available options.

## 5.8.4 Default Option Values

NSLOOKUP has options that influence the type of information you receive from a query and the way NSLOOKUP behaves. Some of the options take a value and others are Boolean options. The options have default values and can be changed by using the `set` command.

You obtain a list of the options and their default values by entering the `set all` command immediately after starting an interactive NSLOOKUP session, as shown in the following example:

    $ NSLOOKUP
    Default Server:  condor.lgk.dec.com       (1)
    Address:  16.99.208.53

    > set all                                 (2)
    Default Server:  condor.lgk.dec.com
    Address:  16.99.208.53

    Set options:
      nodebug             defname         search          recurse  (3)
      nod2                novc            noignoretc      port=53  (4)
      querytype=A  (5)     class=IN        timeout=4       retry=4
      root=a.root-servers.net.
      domain=xyz.prq.dec.com                  (6)
      srchlist=xyz.prq.dec.com                (7)

    >

1. The current default name server. This option is initially set to the name server configured for your local system (client).
2. The `set all` command displays the current value of each option. When NSLOOKUP starts, it initializes the options with default values. If you enter the `set all` command immediately after starting up NSLOOKUP, you see the default values.
3. Boolean options are those that have an on/off state. Boolean options that are in the off state are prefixed with the character string NO. For example, `nodebug` .
4. NSLOOKUP displays options that take a value with an equal sign (=) and the option's current value. For example, `port=53` .
5. The `querytype` option specifies the type of information returned on a query. The default query type is A, which returns the host's IP address.
6. The domain option specifies a default domain. When you query with a host name, the default domain is appended to the host name before issuing the query. The `defname` and `search` options affect how NSLOOKUP appends the default domain name.
7. The `srchlist` option specifies 1 to 6 domains to search by default. NSLOOKUP sets the `domain` option to the first domain listed in the search list.

For a description of other `set` options, see Table 5-14.

Table 5-14 Options to the NSLOOKUP `set` Command
Option | Function
--- | ---
`all` | Displays the current values of the options you can set as well as information about the current default server. For example:
    > set all
`class= value` | Changes the query class to one of the following: IN --- The Internet class (default) CHAOS --- The Chaos class ANY --- Wildcard The class specifies the protocol group of the information. You can use the abbreviated form of the keyword `cl` . The following command tells NSLOOKUP to resolve both `internet` and `chaos` class queries (you can enter INTERNET and CHAOS):
    > set class=ANY
`querytype` | Specifies the type of information you want. For example:
    > set querytype=A

    > set querytype=ANY
Valid types include:
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.
ANY | Defines all available resource records for a given name.
PTR | Pointer. Maps an address to a host name.
MX | Identifies where to deliver mail for a given domain.
CNAME | Defines an alias host name.
HINFO | Host information. Describes a host's hardware and operating system.
WKS | Well-known service. Advertises network services.
`[no]debug` | Turns on debugging (default is `nodebug` ). NSLOOKUP displays both detailed information about the packet sent to the server and the answer. You can use the abbreviations `nodeb` and `deb` . For example:
    > set debug
`[no]d2` | Returns all-inclusive debugging information (default is `nod2` ). Displays all the fields of every packet. For example:
    > set d2
`recurse` | Tells the BIND server to contact other servers if it does not have the information you want. The servers carry out a complete (recursive) resolution for each query. For example:
    > set recurse
`retry` | Number of times that NSLOOKUP attempts to contact a BIND server if repeated tries fail. For example:
    > set retry=8
`timeout` | Length of time (in seconds) to wait for a reply from each attempt. For example:
    > set timeout=9
`root= value` | Changes the root server. For example, the following command changes the root server to `ns.nasa.gov` .
    > set root=ns.nasa.gov
`ignoretc` | Tells NSLOOKUP to ignore packet truncation errors. For example:
    > set ignoretc
`domain name` | Changes the default domain to the domain you specify. How the default domain name is appended to lookup requests depends on the settings of the `defname` and `search` options. The domain search list contains the parents of the default domain if it has at least two components in its name. The default value is set in the TCP/IP configuration database. To specify the default, type the abbreviation `do` . For example, if the default domain is `CC.Berkeley.EDU` , the search list is `CC.Berkeley.EDU` and `Berkeley.EDU` .
`srchlist` | If set, NSLOOKUP appends each of the domain names specified in the `srchlist` option to an unqualified host name and performs a query until an answer is received.
`srchlist= names` | Changes the default domain name to the first name you specify and the domain search list to all the names you specify. Specify a maximum of six names separated by slashes (/). In the following example, the command sets the default domain to `lcs.MIT.EDU` and the search list to the three specified domains. The command overrides the default domain name and associated search list for the `set domain` command.
    > set srchlist=lcs.MIT.EDU/ai.MIT.EDU/MIT.EDU
The default is the domain name specified in the TCP/IP configuration database. The abbreviated form of the command is `srchl` .
`[no]defname` | Tells NSLOOKUP to append a default domain name to a not fully qualified 1 DNS name lookup request. The abbreviated form is `[no]def` . For example, an NSLOOKUP query for the host `rainy` becomes `rainy.cc.berkeley.edu` .
`[no]search` | Tells NSLOOKUP to append the domain names in the search list to a not fully qualified domain name 1 lookup request. The default is `search` . The abbreviated form is `[no]sea` .

1A fully qualified domain name is a name that ends with a trailing period, as in host.domain.

Previous | Next | Contents | Index