Configure SNTP

The IMG 2020 runs an SNTP Client (Simple Network Time Protocol) that sends an SNTP request every 60 seconds and adjusts its time if it receives a valid response. The IMG 2020 uses the IP address of an 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 Enterprise Linux includes an NTP server that is part of the basic installation. For Windows users,  Windows XP includes an NTP service that can be configured. The procedure below is an example using a server running Red Hat Enterprise Linux.

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.

 

Modify ntp.conf file as needed

 

The instructions below assume that the ntp.conf file has already been created or copied and the FTP protocol has been configured to transfer information between the IMG 2020 and the server running the NTP protocol. The next step is to verify/edit the ntp.conf file as needed. This file will be used by the NTP server to retrieve the time from a host of time servers configured in the ntp.conf file.

  • Edit the ntp.conf file using vi editor or some other text editor.

[root@rootuser]#vi /etc/ntp.conf
  • Under the General Configuration section of the ntp.conf file, verify the lines displayed in Bold below correspond to the IP addresses of the NTP servers (TimeServers) that your FTP/NTP server will communicate with. These lines prohibit an SNTP (Timeserver) server from adjusting the time on your NTP/FTP server. Modify or add the lines if not already part of the ntp.conf file:

# 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
  •  Verify the lines below in bold are in the ntp.conf file along with the correct IP addresses of the NTP servers (TimeServers) . Add the server IP's if not already there.

server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 server 66.187.224.4 server 18.26.4.105 server 128.249.1.10
  • Verify the lines in bold below are in the ntp.conf file. These lines display the IP address of the IMG 2020's. This allows the IMG 2020 to request time from your NTP/FTP server. Add the IP address of the IMG 2020's if not already there.

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

 

  • Save the configuration:

OUTPUT       

Shutting down ntpd:                              [  OK  ]

ntpd: Synchronizing with time server:       [  OK  ]

Starting ntpd:                                      [  OK  ]

  • Verify the Linux machine is synchronized with an NTP server

OUTPUT

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

  • To see the NTP packets for debug, enter the following: 

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

Return to Documentation Home I Return to Sangoma Support