NTP服务器和客户端的设置及使用(EN版)
[size=2]1. About NTP[/size]
NTP is used to synchronize the time of a computer client or server
to another server or a referenced time source such as a radio, a
satellite receiver or a modem. It provides client accuracy typically
within a ms on a LAN or within 10ms over a WAN relative to a primary
server synchronized to Coordinated Universal Time (UTC). Bringing up
a NTP primary server requires a radio or satellite receiver or
modem.
Time is distributed through a hierarchy of NTP servers, with each
server adopting Primary (stratum 1) servers which are at the top of
the pile and have access to some external time source, usually a
radio clock. A stratum-2 server is one which is currently obtaining
time from a stratum-1 server, a stratum-3 server would get its time
from a stratum 2 server and so on. To avoid long lived
synchronization loops the number of strata is limited to 15. If your
network is isolated and you cannot access other people's servers
across the Internet, a radio clock may make a good investment.
Otherwise you would configure your server to one of the known
primary or secondary NTP servers.
Each client in the synchronization subnet (which also may be a
server itself) chooses exactly one of the available servers to
synchronize to, usually from among the lowest stratum servers it has
access to. Since this is not always an optimal configuration, NTP
operates under another premise as well; i.e., each server's time
should be viewed with a certain amount of distrust. NTP really
prefers to have access to several sources of lower stratum time (at
least three) since it can then apply an agreement algorithm to
detect insanity on the part of any one of these. Normally, when all
servers are in agreement, NTP will choose the best of these in terms
of lowest stratum, closest (in terms of network delay) and claimed
precisions, along with several other considerations.
Finally, there is the issue of association modes. There are a number
of modes to choose from depending on the association between each of
the servers. Configuring an association in symmetric-active mode
(usually indicated by a peer declaration in the configuration file)
indicates to the remote server that one wishes to obtain time from
the remote server and that one is also willing to supply time to the
remote server if need be. This mode is appropriate in configurations
involving a number of redundant time servers interconnected via
diverse network paths, which is presently the case for most stratum
- 1 and stratum - 2 servers on the internet today. Configuring an
association in client mode (usually indicated by a server
declaration in the configuration file) indicates that one wishes to
obtain time from the remote server, but that one is not willing to
provide the time to the remote server. This mode is appropriate for
file server and workstation clients that do not provide
synchronization to other local clients. Where the requirements in |