Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

IMG 1010 - 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. Red Hat Linux ES 3.0, 4.0, 5.0, and 6.7 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.

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.

 

 

Linux

The instructions below assume that the 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. If setting up SNTP for the first time, a script was created that will generate an ntp.conf file. See link to create the ntp.conf. If ntp.conf file has already been created, then follow instructions below to edit it.

  • Open a terminal on the Linux machine and Login as root user. The script will create the ntp.conf file for use.

  • Edit the ntp.conf file using vi editor. Enter:

    vi /etc/ntp.conf
  • Add the lines starting with "restrict" shown below with the IP addresses of the NTP servers. This will prohibit an 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
  • Add the lines starting with "server" 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
  • Add the line starting with "restrict" with IP address of the IMG. This will allow the IMG to request time from NTP server.
    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)
  • Save the configuration:

    <ESC>   "Hit Esc Key"
    wq!     "Save changes"
  • Restart the NTP server:  

    # /sbin/service ntpd restart 
    OUTPUT      
    Shutting down ntpd:                          [  OK  ]
    ntpd: Synchronizing with time server:        [  OK  ]
    Starting ntpd:                               [  OK  ]
  • 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
  • Verify the correct time on the 1010 via the front panel.

  • 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

  • No labels