HP TCP/IP Services for OpenVMS
Management


Previous Contents Index

13.7.9.1.6 Using the GQ scheme

The GQ parameter generation process produces a key file that is shared between all members of an NTP Trust Group.

Perform the following steps to use the GQ scheme:

  1. On both Alice and Bob, add two lines to TCPIP$NTP.CONF :


    keysdir SYS$SPECIFIC:[TCPIP$NTP] 
    crypto pw littlesecret
    

  2. On Bob, add the server line for Alice to Bob's TCPIP$NTP.CONF :


    server alice autokey 
    

  3. On Alice, generate the GQ parameters:


    ALICE>ntp_keygen -"T" -"G" -p littlesecret
    

  4. On Bob, generate the client parameters using the server password:


    BOB>ntp_keygen -"H" -p littlesecret
    

  5. Copy the GQ group key tcpip$ntpkey_gqpar_alice.timestamp from Alice to Bob's keysdir.
  6. On Bob, create a symbolic link to the file, using the -r option to specify the server name:


    BOB>ntp_keygen -"G" -r alice -l tcpip$ntpkey_gqpar_alice.timestamp 
    

  7. Start NTP on Alice and Bob:


    ALICE>@sys$startup:tcpip$ntp_startup 
    BOB>@sys$startup:tcpip$ntp_startup 
    

13.7.9.1.7 Using the MV scheme

The MV parameter generation process produces a server key which must not be distributed to other members of the NTP Trust Group, and a number of client keys.

Perform the following steps to use the MV scheme:

  1. On both Alice and Bob, add two lines to TCPIP$NTP.CONF :


    keysdir SYS$SPECIFIC:[TCPIP$NTP] 
    crypto pw littlesecret
    

  2. On Bob, add the server line for Alice to Bob's TCPIP$NTP.CONF :


    server alice autokey 
    

  3. On Alice, generate the MV parameters. The MV parameter generation process produces a server key and a number of client keys. When choosing the number of client keys avoid factors of 512 and do not exceed 30. The following command generates four keys (N-1, where N is 5):


    ALICE>ntp_keygen -"T" -"V" 5 -p littlesecret
    

  4. On Bob, generate the client parameters using the server password:


    BOB>ntp_keygen -"H" -p littlesecret
    

  5. Copy any one of the MV client keys tcpip$ntpkey_mvkeyN_alice.timestamp from Alice to Bob's keysdir.
  6. On Bob, create a symbolic link to the file. Specify 1 after the -"V" option so it does not complain that the -"V" option requires a value. The 1 will be ignored.


    BOB>ntp_keygen -"V" 1 -l tcpip$ntpkey_mvkeyN_alice.timestamp 
    

  7. Start NTP on Alice and Bob:


    ALICE>@sys$startup:tcpip$ntp_startup 
    BOB>@sys$startup:tcpip$ntp_startup 
    

13.7.9.1.8 Broadcast and Multicast Autokey

Append autokey to the broadcast line in tcpip$ntp.conf for the broadcast/multicast address that you want to authenticate with Autokey:


broadcast my.broadcast.or.multicast.address autokey 

The assigned NTP Multicast address is 224.0.1.1, but other valid multicast addresses may be used.

13.7.9.1.9 Monitoring Authentication Status

Use ntpq -c assoc to check the authentication status of ntp associations.

Authenticated associations display ok in the auth column:


ind assID status  conf reach auth condition  last_event cnt 
=========================================================== 
  1    60  9614   yes   yes    ok   sys.peer   reachable  1 

Use ntpq -c readvar to view the Autokey certificates help by the NTP Server.

13.7.9.2 Updating the Client and Server Parameters

The client and server key and certificate are valid for only one year and should be updated periodically (e.g., monthly).

Update the server(s) with the following command:


$ntp_keygen -"T" -q serverpassword

Update the client(s) with the following command:


$ntp_keygen -q clientpassword

13.8 NTP Utilities

NTP provides several utility programs that help you manage and make changes to the NTP server. These utilities include:

13.8.1 Setting the Date and Time with NTPDATE

The NTPDATE program sets the local date and time by polling a specified server or servers to determine the correct time. A number of samples are obtained from each of the servers specified, and a subset of the NTP clock filter and selection algorithms are applied to select the best samples. The accuracy and reliability of NTPDATE depends on the number of servers it polls, the number of polls it makes each time it runs, and the interval length between runs.

Run NTPDATE manually to set the host clock or from the host startup file to set the clock at boot time. In some cases, it is useful to set the clock manually before you start NTP. The NTPDATE program makes time adjustments (called "stepping the time") by calling the OpenVMS routine SYS$SETIME.

Note

NTPDATE does not set the date and time if an NTP server is running on the same host.

Enter specific commands using the following format:


NTPDATE [option...] host [host...] 

For example, the following command sets the clock based on the time provided from one of the specified hosts (BIRDY, OWL, or FRED):


$ NTPDATE BIRDY OWL FRED 

NTP sets the date and time by polling the servers you specify as arguments to the command. Samples are obtained from each of the specified servers. NTP then analyzes the results to select the best server to use as a time source. Table 13-4 describes the NTPDATE command options.

Table 13-4 NTPDATE Options
Option Description
-d Prints information useful for debugging. Does not change the time.
-o version Specifies the NTP version (1, 2, or 3) for outgoing packets (for compatibility with older versions of NTP). Version 4 is the default.
-p n Specifies the number of samples NTPDATE acquires from each server. The default is 4. You can specify from 1 to 8.
-q Specifies a query only; does not set the clock.

13.8.2 Tracing a Time Source with NTPTRACE

Use the NTPTRACE utility to determine the source from which an NTP server obtains its time. NTPTRACE follows the chain of time servers back to the master time source.

Use the following syntax when entering commands:


NTPTRACE [option...] 

The following example shows output from an NTPTRACE command. In the following example, the chain of servers is from the local host to the stratum 1 server FRED, which is synchronizing to a GPS reference clock:


 
$ NTPTRACE 
 
LOCALHOST: stratum 3, offset -0.000000, synch distance1.50948 
parrot.birds.com: stratum 2, offset -0.126774, synch distance 0.00909 
fred.birds.com: stratum 1, offset -0.129567, synch distance 0.00168, 
refid 'GPS' 
 

All times are in seconds. The output fields on each line are as follows:

Table 13-5 describes the NTPTRACE command options.

Table 13-5 NTPTRACE Options
Option Description
-d Enables debugging output.
-n Displays IP addresses instead of host names. This may be necessary if a name server is down.
-r retries Sets the number of retransmission attempts for each host. The default is 5.
-t timeout Sets the retransmission timeout (in seconds). The default is 2.
-v Displays additional information about the NTP servers.

13.8.3 Making Run-Time Requests with NTPDC

You can make run-time changes to NTP with query commands by running the NTPDC utility. NTPDC displays time values in seconds.

Run-time requests are always authenticated requests. Authentication not only provides verification that the requester has permission to make such changes, but also gives an extra degree of protection against transmission errors.

The reconfiguration facility works well with a server on the local host and between time-synchronized hosts on the same LAN. The facility works poorly for more distant hosts. Authenticated requests include a timestamp. The server compares the timestamp to its receive timestamp. If they differ by more than a small amount, the request is rejected for the following reasons:

To run NTPDC, enter the following command:


$ NTPDC 
NTPDC> 

At the NTPDC> prompt, enter the appropriate type of command from the following list:

The following sections describe the NTPDC commands.

13.8.3.1 NTPDC Interactive Commands

Interactive commands consist of a command name followed by one or more keywords. The interactive commands include:

13.8.3.2 NTPDC Control Message Commands

Control message commands request information about the server. These are read-only commands in that they make no modification of the server configuration state.

The NTPDC control message commands include:

13.8.3.3 NTPDC Request Commands

The following commands make authenticated requests:

Use the following syntax to enter the NTPDC foreign command:


NTPDC [-i] [-l] [-n] [-p] [-s] [-c command][host1,host2,...] 

Table 13-6 describes the NTPDC options.

Table 13-6 NTPDC Options
Option Description
-c command The command argument is interpreted as an interactive format command and is added to the list of commands to be executed on the specified hosts. You can specify multiple -c options.
-i Forces NTPDC to operate in interactive mode.
-l Obtains a list of peers that are known to the servers.
-n Displays all host addresses in numeric format rather than converting them to host names.
-p Displays a list of the peers known to the server as well as a summary of their state.
-s Displays a list of the peers known to the server as well as a summary of their state. Uses a slightly different format than the -p option.


Previous Next Contents Index