NTP Fundamentals


Computers have to maintain a clocking mechanism to be able to maintain the time, although it's not very accurate. In a Sun system, the non-volatile RAM (NVRAM) chip keeps time when Solaris is not running, and when the system starts up, the time value is copied into a counter that the Solaris 9 kernel uses. For most Ultra-based systems, the counter is 64 bits in length. The clock is not very accurate because it relies on an oscillator generating regular interrupts that need to be processed by the CPU, so if the CPU is very busy, this could be delayed and cause drift (explained later).

graphics/alert_icon.gif

The 32-bit counter present in older systems is scheduled to reach its limit of values in the year 2038. The 64-bit counter will not reach its limit of values for about another 300 million years . Unix time started at midnight, January 1, 1970.


It is commonly thought that NTP is used to synchronize the system clock on different hosts in a network. This is not what NTP does; it is the end result. NTP is actually the mechanism by which all systems on a network try to get as close as possible to having the correct time. For example, if there are three NTP servers on the network, all acting as peers to each other, they calculate, between them, which is the best time source ”having agreed, all three servers synchronize to that source.

NTP operates in a hierarchy, called strata , with stratum levels ranging from 1 “15, where a stratum-1 server is the most accurate and reliable, and is connected to a reference source, such as a GPS signal, or a UTC (coordinated universal time) source (based on GMT). A few servers provide the time for many clients, some of which may be servers for other clients and so on.

graphics/note_icon.gif

A time reference source, such as a GPS signal clock, is referred to as a stratum-0 server. Clients do not synchronize to these servers; they synchronize to the stratum-1 server that is connected to the reference clock.


NTP has a wide variety of uses within the Solaris operating environment. The following are instances of where it is used:

  • System logs ” The syslog function needs to log accurately when events occur; the clock needs to be as accurate as possible so that the system administrator can analyze problems later.

  • File system times ” When a file is created or modified, an accurate timestamp is needed to know when it happened . This is particularly important in shared file systems.

  • Network management tools ” These need accurate timestamping to report the exact time an event occurred. The network management master system might also be a remote computer, so the time needs to be synchronized.

  • Security breaches ” To track and investigate a security breach on a computer network, accurate time recording is essential to identify exactly when specific events occurred so that a complete chronological audit can be made.

  • Billing applications ” The time is critical when an application is billing a customer based on time, such as for telephone usage.

  • Financial applications ” Some financial services have a legal responsibility for extremely accurate timekeeping.

  • Encryption and key management ” Secure applications often use a time value to create part of the key used to encrypt the data. This value has to be accurate so that the receiving host can decrypt the data, again based on the time.

NTP uses the User Datagram Protocol (UDP) to communicate between servers and clients and uses well-known port number 123. Using UDP is preferable with NTP because there are no retries if a synchronization fails (as there would be if TCP was used), which could flood a network with traffic if a number of clients went down.

A number of terms need to be described before you configure NTP:

  • Reference clock ” A clock that is known to be accurate because it follows a respected signal, such as GPS, or a UTC clock.

  • Resolution ” This is the smallest time increment a clock can make (compare to a domestic watch, where the resolution is one second).

  • Precision ” This is the smallest time increase that a computer program can make.

  • Accuracy ” This refers to how closely a clock follows a time reference, such as a GPS signal, or UTC reference clock.

  • Reliability ” This refers to the length of time that a clock can remain accurate.

  • Drift ” This refers to the variations in frequency that make clocks have different time. NTP contains a standard location for a drift file, /var/ntp/ntp.drift , which stores the offset for the oscillator, allowing it to be taken into account to produce more accurate time.

  • Jitter ” This refers to the fact that different oscillators have different frequencies and produce discrepancies when time is measured repeatedly. Jitter is effectively the difference in drift between a number of oscillators . Jitter is also the condition that database administrators experience when the time is not synchronized across the environment, particularly with distributed databases.



Solaris 9 Network Administration Exam Cram 2 (Exam Cram CX-310-044)
Solaris 9 Network Administrator Exam Cram 2 (Exam CX-310-044)
ISBN: 0789728702
EAN: 2147483647
Year: 2003
Pages: 174
Authors: John Philcox

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net