Pages

Tuesday, October 6, 2015

NTP Settings on the Cloud Server.

NTP Settings on the Cloud Server.
Operating systems, there are many services that the normal functioning of which depends on the accuracy of the system clock. If the server does not set the exact time, it can cause various problems.

For example, the local network is needed to watch machines sharing files synchronized - otherwise it will be impossible to establish the correct file modification time. This in turn can cause version conflicts or rewriting of important data.

If the server does not set the exact time, there are problems with jobs Cron - it is unclear when it will start. It will be very difficult to analyze system event logs for reasons diagostiki failures and faults...

You can continue for long...

To avoid all the problems described above, you need to configure the synchronization of the system clock. On Linux it uses the protocol NTP (Network Time Protocol). In this article we describe in detail how to carry out the server installation and configuration of NTP. Start with a small theoretical introduction.

How does the NTP protocol

The NTP protocol is based on the hierarchical structure of time servers, which are allocated different levels (Eng. Strata). By level 0 are reference clock (atomic clock or a watch GPS). On the ground level NTP-servers are down.

With reference clock synchronized NTP-tier servers that are sources for servers Servers level 2. Level 2 is synchronized with the server level 1, but can also be synchronized with each other. Similarly, the server is running Level 3 and below. It totals up to 256 levels.

The hierarchical structure of the NTP protocol is characterized by fault tolerance and redundancy. In the case of failures connection with upstream servers backup servers take over the synchronization process. Due to redundancy provides continuous availability of NTP-servers. Synchronizing with multiple servers, NTP uses data from all sources to get the most accurate time.

Installing and configuring the NTP-Server

The most famous and popular software tool for time synchronization is a daemon ntpd. Depending on the settings specified in the configuration file (this will be discussed below), it can act as a server and as a client (i.e., can both take time from remote hosts, and distribute it to other hosts). Below, we describe in detail how to implement the installation and configuration of the demon in the OC Ubuntu.