Configure SNTP on GCEMS Server

The IMG runs an SNTP client that sends an SNTP request every 60 seconds and adjusts its time if it receives a valid response. The IMG uses the IP address of the FTP server as the location of the NTP server. SNTP is a subset of the NTP protocol; therefore, the server is referenced as an NTP server. Linux Redhat ES 3.0, 4.0, and 5.0 includes an NTP server that is part of the basic installation. For Windows® users,  Windows XP® includes an NTP service that can be configured easily.

 

Note: Verify that the host time and time zone are correct and in the expected format. Universal Coordinated Time, UTC, is most commonly used. The factory default time zone is set as Eastern Standard Time, EST.

 

 

DG_SNTP.png

 

Linux

These instructions assume that your IMG has been configured to FTP transfer the software from a Linux machine. The next step is to edit the ntp.conf file which is used by the NTP server.

  1. Open a terminal on the Linux machine and Login as root.

  2. Edit the ntp.conf file using vi editor

    Enter:  vi /etc/ntp.conf
     

  3. Add the lines shown in Bold below with the IP addresses of the NTP servers. This will prohibit a SNTP server from adjusting the time on the Linux machine.

    # Prohibit general access to this service.
    restrict default ignore

    #clock2.redhat.com
    restrict 66.187.224.4 mask 255.255.255.255 nomodify notrap noquery

    #bonehed.lcs.mit.edu
    restrict 18.26.4.105 mask 255.255.255.255 nomodify notrap noquery

    #ntp.tmc.edu
    restrict 128.249.1.10 mask 255.255.255.255 nomodify notrap noquery
     

  4. Add the lines in Bold with the IP addresses of the NTP servers.

    # Undisciplined Local Clock. This is a fake driver intended for backup
    # and when no outside source of synchronized time is available. The
    # default stratum is usually 3, but in this case we elect to use stratum
    # 0. Since the server line does not have the prefer keyword, this driver
    # is never used for synchronization, unless no other
    # synchronization source is available. In case the local host is
    # controlled by some external source, such as an external oscillator or
    # another protocol, the prefer keyword would cause the local host to
    # disregard all other synchronization sources, unless the kernel
    # modifications are in use and declare an unsynchronized condition.
    #
    #clock2.redhat.com
    server 66.187.224.4
    #bonehed.lcs.mit.edu
    server 18.26.4.105
    #ntp.tmc.edu
    server 128.249.1.10
     

  5. Add the line in Bold with IP address of the IMG. This will allow the IMG to request time from NTP server.

Note: The behavior of the "notrust" command below has changed between versions 4.1 and 4.2 of NTP. The command below has been updated to encompass commands for both Red Hat Enterprise version 4 and version 5. See commands below:

# -- CLIENT NETWORK -------

# Permit systems on this network to synchronize with this

# time service.  Do not permit those systems to modify the

# configuration of this service.  Also, do not use those

# systems as peers for synchronization.

# restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap

restrict 10.129.45.150 mask 255.255.255.224 notrust nomodify notrap (Red Hat Enterprise version 4)

restrict 10.129.45.150 mask 255.255.255.224 nomodify notrap (Red Hat Enterprise version 5)

 

  1. Save the configuration:

    <ESC>  "Hit Esc Key"
    # wq!  "Save changes"
     

  2. Restart the NTP server:

# /sbin/service ntpd restart

 

OUTPUT       

Shutting down ntpd:                         [  OK  ]

ntpd: Synchronizing with time server:       [  OK  ]

Starting ntpd:                              [  OK  ]

  1. Verify the Linux machine is synchronized with an NTP server

# ntpstat

 

OUTPUT:

synchronized to NTP server (66.187.224.4) at stratum 2 time correct to within 939 ms polling server every 16 s

  1. Verify the correct time on the 1010 via the front panel

  2. To see the NTP packets for debug, enter the following:  

    tethereal port 123    (add –V to get more details)
     

OUTPUT

Capturing on eth0

0.000000 10.129.45.132 -> 66.187.224.4 NTP

0.051050 66.187.224.4 -> 10.129.45.132 NTP