DIGITAL TCP/IP Services for OpenVMS
Management


Previous Contents Index


Chapter 9
Configuring the Portmapper

The Portmapper service eliminates the need to preconfigure all client and server remote procedure call (RPC) applications with the port numbers they use. The Portmapper "listens" at port 111 and maintains a database of registered server programs, their unique program numbers, and assigned port numbers.

You must run the Portmapper if you intend to use the following applications:

This chapter describes how to:

For information about programming with the DIGITAL TCP/IP Services for OpenVMS RPC application programming interface (API), see the DIGITAL TCP/IP Services for OpenVMS ONC RPC Programming manual.

9.1 Configuring Services to Use the Portmapper

The SET SERVICE command configures the applications so they are known to the Portmapper. To set RPC-related parameters, use the /RPC qualifier. Enter:


TCPIP> SET SERVICE service -
_TCPIP> /RPC=(PROGRAM_NUMBER=n, VERSION_NUMBER=(LOWEST=n, HIGHEST=n))
 

The TCPIP services that use the Portmapper have the following default values for the /RPC qualifier:

9.2 Displaying Portmapper Information

The SHOW SERVICE command with the /RPC and /PERMANENT qualifiers displays the current RPC options.

Example 1:
The following example displays the RPC options for these running services: MOUNT, NFS, PC-NFS, and the Portmapper:


TCPIP> SHOW SERVICE /RPC /PERMANENT
                         RPC              Protocol Versions 
Service             Program Number         Lowest / Highest 
 
MOUNT                     100005                 1        1 
NFS                       100003                 2        2 
PCNFS                     150001                 1        2 
PORTMAPPER                100000                 2        2 
TCPIP> 

Example 2:
In the next example, the /FULL and /PERMANENT qualifiers display the RPC options for the NFS server, whose program number is 100003, lowest version is 2, and highest version is 2:


TCPIP> SHOW SERVICE NFS /FULL /PERMANENT
Service: NFS 
 
Port:             2049     Protocol:  UDP             Address:  0.0.0.0 
Inactivity:          0     User_name: TCPIP$NFS         Process:  TCPIP$NFS 
Limit:               1 
 
File:         TCPIP$SYSTEM:TCPIP$NFS_RUN.COM 
Flags:        TCPIP 
 
Socket Opts:  Rcheck Scheck 
 Receive:        64000     Send:           64000 
 
Log Opts:     Acpt Actv Dactv Conn Error Exit Logi Logo Mdfy Rjct TimO Addr 
 File:        SYS$SYSDEVICE:[TCPIP$NFS]TCPIP$NFS_RUN.LOG 
 
RPC Opts 
 Program number:      100003  Low version:      2   High version:      2 
 
Security 
 Reject msg:  not defined 
 Accept host: 0.0.0.0 
 Accept netw: 0.0.0.0 
TCPIP> 

To list information about all the registered applications, for example, enter the SHOW PORTMAPPER command.


TCPIP> SHOW PORTMAPPER
    Program Number     Version  Protocol  Port-number  Process   Service-name 
---------------------  -------  --------  -----------  --------  ------------ 
000186A0 (    100000)        2  TCP         111        24800126  PORTMAPPER 
000186A0 (    100000)        2  UDP         111        24800126  PORTMAPPER 
000186A3 (    100003)        2  UDP        2049        24800125  NFS 
2C30B587 ( 741389703)        1  UDP        2049        24800125 
000186A5 (    100005)        1  UDP          10        24800125  MOUNT 

To monitor the server, enter the SHOW SERVICE PORTMAPPER command. For example:


TCPIP> SHOW SERVICE PORTMAPPER
Service     Port      Protocol        Process     Address     State 
 
PORTMAPPER   111       TCP,UDP      TCPIP$PORTM     0.0.0.0     Enabled 


Chapter 10
Configuring and Managing NTP

The Network Time Protocol (NTP)1 provides a means to synchronize time and coordinate time distribution throughout a TCP/IP network. NTP aims to provide accurate and dependable timekeeping for hosts on TCP/IP networks.

NTP provides synchronization traceable to clocks of high absolute accuracy and avoids synchronization to clocks keeping incorrect time.

Time synchronization is important in client/server computing. For example, systems that share common databases require coordinated transaction processing and timestamping of instrumental data.

This chapter reviews key NTP concepts and provides guidelines for configuring and administering NTP software on your OpenVMS system. This chapter also describes NTP utility programs NTPQ and NTPDC; a local clock-setting program called NTPDATE; and a traceback utility called NTPTRACE that locates suitable synchronization sources.

Note

1 In version 5.0, the DIGITAL TCP/IP Services for OpenVMS NTP software is an implementation of the NTP Version 3 specification and maintains compatibility with NTP versions 1 and 2.

10.1 Reviewing Key Concepts

Synchronized timekeeping means that hosts with accurate system timestamps send time quotes to each other. Hosts running NTP may be either time servers or clients although they are often both servers and clients.

NTP does not attempt to synchronize clocks to each other. Rather, each server attempts to synchronize to Universal Coordinated Time (UTC) using the best available source and best available transmission paths to that source. NTP expects that the time being distributed from the root of the synchronization subnet will be derived from some external source of UTC (for example, a radio clock)

If your network is isolated and you cannot access other NTP servers on the internet, you can designate one of your nodes as the reference clock to which all other hosts will synchronize.

10.1.1 Time Distributed Through a Hierarchy of Servers

In the NTP environment, time is distributed through a hierarchy of NTP time servers. Each server adopts a stratum that indicates how far away it is operating from an external source of UTC.2 Stratum 1 servers have access to an external time source, usually a radio clock. A stratum 2 server is one that is currently obtaining time from a stratum 1 server; a stratum 3 server gets its time from a stratum 2 server, and so on. To avoid long-lived synchronization loops, the number of strata is limited to 15.

Stratum 2 (and higher) hosts might be company or campus servers that obtain time from some number of primary servers and provide time to many local clients. In general:

Internet time servers are stratum 1 servers. Other hosts connected to an internet time server have stratum numbers of 2 or higher and may act as time servers for other hosts on the network. Clients choose one of the available servers with which to synchronize. Usually this is one from among the lowest stratum servers to which it has access.

10.1.2 How Hosts Negotiate Synchronization

Each host has its identifying stratum number encoded within UDP datagrams. Peers communicate by exchanging these timestamped UDP datagrams. NTP uses these exchanges to construct a list of possible synchronization sources then sorts them according to stratum and synchronization distance. Peers are accepted or rejected leaving only the most accurate and precise sources.

NTP evaluates any new peer to determine if it qualifies as a new (more suitable) synchronization source.

NTP rejects the peer under the following conditions:

NTP accepts the peer under the following conditions:

10.1.3 How the OpenVMS System Maintains the System Clock

The OpenVMS system clock is maintained as a software timer with a resolution of 100 nanoseconds, updated at 10 millisecond intervals. A clock update is triggered when a register, loaded with a predefined value, has decremented to zero. Upon reaching zero, an interrupt is triggered that reloads the register, thus repeating the process.

The smaller the value loaded into this register, the more quickly it reaches zero and triggers an update. The clock runs more quickly in such an instance. A larger value means more time between updates; therefore, the clock runs more slowly.

10.1.4 How NTP Makes Adjustments to System Time

Once NTP has selected a suitable synchronization source, NTP compares the source's time with that of the local clock. If NTP determines that the local clock is running ahead of or behind the synchronization source, NTP uses a general drift mechanism to slow down or speed up the clock as needed. NTP accomplishes this by issuing a series of new ticks. For example, if NTP detects that the local clock is drifting ahead by +0.1884338 second, it issues a series of new ticks in an effort to reduce the difference between the synchronization source and the local clock.

NTP maintains a record of the resets it makes along with informational messages in the NTP log file, TCPIP$NTP.LOG. See Section 10.5 for more details about event logging and help in interpreting an NTP log file.

10.1.5 Configuring the Local Host

As the system manager of the local host, you determine which network hosts to use for synchronization and populate an NTP configuration file with a list of the participating hosts.

NTP hosts may be configured in one or more of the following modes:

10.1.6 Using NTP with Another Time Service

A local host may run more than one time service. For example, a host may have both NTP and DTSS (Digital Time Synchronization Service) installed. However, only one of these time services is allowed to set the system clock.

If you are running a time service in addition to NTP, you must stop NTP from setting the system clock by adding the following statements in the configuration file:


server 127.127.0 prefer 
fudge 127.127.1.0 stratum 0 

These statements dupe NTP into using its own system clock as a reference clock. The host continues to respond to NTP time queries but won't make any adjustments to the system clock, allowing the other time service to make those changes.

Note

2 NTP times are an offset of UTC, formerly Greenwich Mean Time (GMT).

10.2 Configuring Your NTP Host

The NTP configuration file TCPIP$NTP.CONF contains a list of hosts your system will use for time synchronization. Before configuring your host, you must:

  1. Select time sources.
  2. Obtain the IP addresses or host names of the time sources.
  3. Obtain the version number of NTP that the hosts are running.

To ensure reliable synchronization, select multiple time sources that you are certain provide accurate time and are synchronized to an Internet time server.

To minimize common points of failure, avoid synchronizing:

To simplify configuration file maintenance, avoid configuring peer associations with higher stratum servers.

10.2.1 Creating the Configuration File

To create a configuration file for your local host, edit a copy of the file TCPIP$NTP.TEMPLATE (located in SYS$SPECIFIC:[TCPIP$NTP]) to add the names of participating hosts, then save the file as SYS$SPECIFIC:[TCPIP$NTP]TCPIP$NTP.CONF.

Note

If you had a previous version of NTP configured on your system, your TCPIP$NTP.CONF file is created automatically and is populated with entries from the file UCX$NTP.CONF when you run TCPIP$CONFIG.

10.2.2 Valid Configuration Statements and Options

The following are valid NTP configuration statements:

10.2.3 Sample NTP Configuration File

A sample of the NTP configuration template follows:


#       Copyright (c) Digital Equipment Corporation, 1998 
# 
#                  Example NTP Configuration File 
# 
# Rename this template to TCPIP$NTP.CONF. 
# 
# See the DIGITAL TCP/IP Services for OpenVMS Management manual for 
# additional commands and detailed instructions on using this 
# configuration file. 
# 
# The Network Time Protocol (NTP) provides synchronized timekeeping 
# among  a set of distributed time servers and clients. The local 
# OpenVMS host  maintains an NTP configuration file, TCPIP$NTP.CONF, of 
# participating peers. TCPIP$NTP.CONF is maintained in the 
# SYS$SPECIFIC:[TCPIP$NTP] directory. 
# 
# As the system manager populating this file, you must determine the 
# peer hosts with which the local hosts should negotiate and 
# synchronize.  Include at least one (but preferably three) 
# hosts that you are  certain have the following characteristics: 
# 
#       * provide accurate time 
#       * synchronize to Internet Time Servers (if they are not 
#   themselves Internet Time Servers) 
# 
# The NTP configuration file is not dynamic, and therefore requires 
# restarting NTP  after being edited to make the changes take effect. 
# However, you can make run-time configuration requests interactively 
# using the TCPIP$NTPDC utility. 
 
# Your NTP configuration file should always include the following 
# driftfile entry.  The driftfile is the name of the file that stores 
# the clock drift (also known as frequency error) of the system clock. 
 
 
driftfile SYS$SPECIFIC:[TCPIP$NTP]TCPIP$NTP.DRIFT 
 
# Sample peer entries follow.  Replace them with your own list of 
# hosts and identify the appropriate association mode.  If you 
# specify multiple hosts, NTP can choose the best source with which to 
# synchronize. This also provides reliability in case one of the hosts 
# becomes unavailable. 
 
 
# Identify each peer with a DNS host name or with an IP address 
# in dotted-quad notation. 
 
peer 18.72.0.3 
peer 130.43.2.2 
peer 16.1.0.22 
peer parrot 
 
# The following commands let you use NTP with 
# another time service  such as DTSS.  If enabled (by removing #), 
# NTP will not set the system clock. 
 
# server 127.127.1.0 prefer 
# fudge 127.127.1.0 stratum 0 
 


Previous Next Contents Index