📄 rfc1059.txt
字号:
00 no warning (day has 86400 seconds) 01 +1 second (day has 86401 seconds) seconds) 10 -1 second (day has 86399 seconds) seconds) 11 alarm condition (clock not synchronized) In all except the alarm condition (11) NTP itself does nothing with these bits, except pass them on to the time-conversion routines that are not part of NTP. The alarm condition occurs when, for whatever reason, the logical clock is not synchronized, such as when first coming up or after an extended period when no outside reference source is available. Stratum (sys.stratum, peer.stratum, pkt.stratum) This is an integer indicating the stratum of the logical clock. A value of zero is interpreted as unspecified, one as a primary clock (synchronized by outside means) and remaining values as the stratum level (synchronized by NTP). For comparison purposes a value of zero is considered greater than any other value. Peer Poll Interval (peer.ppoll, pkt.poll) This is a signed integer used only in symmetric mode and indicating the minimum interval between messages sent to the peer, in seconds as a power of two. For instance, a value of sixMills [Page 16]RFC 1059 Network Time Protocol July 1988 indicates a minimum interval of 64 seconds. The value of this variable must not be less than NTP.MINPOLL and must not be greater than NTP.MAXPOLL. Precision (sys.precision, peer.precision, pkt.precision) This is a signed integer indicating the precision of the logical clock, in seconds to the nearest power of two. For instance, a 60-Hz line-frequency clock would be assigned the value -6, while a 1000-Hz crystal-derived clock would be assigned the value -10. Synchronizing Distance (sys.distance, peer.distance, pkt.distance) This is a fixed-point number indicating the estimated roundtrip delay to the primary clock, in seconds. Estimated Drift Rate (sys.drift, peer.drift, pkt.drift) This is a fixed-point number indicating the estimated drift rate of the local clock, in dimensionless units. Reference Clock Identifier (sys.refid, peer.refid, pkt.refid) This is a code identifying the particular reference clock or server. The interpretation of the value depends on the stratum. For stratum values of zero (unspecified) or one (primary clock), the value is an ASCII string identifying the reason or clock, respectively. For stratum values greater than one (synchronized by NTP), the value is the 32-bit Internet address of the reference server. Reference Timestamp (sys.reftime, peer.reftime, pkt.reftime) This is the local time, in timestamp format, when the logical clock was last updated. If the logical clock has never been synchronized, the value is zero.3.2.2. System Variables The following variables are used by the operating system in order to synchronize the logical clock. Logical Clock (sys.clock) This is the current local time, in timestamp format. Local time is derived from the hardware clock of the particular machine and increments at intervals depending on the design used. AnMills [Page 17]RFC 1059 Network Time Protocol July 1988 appropriate design, including slewing and drift-compensation mechanisms, is described in Section 5. Clock Source (sys.peer) This is a selector identifying the current clock source. Usually this will be a pointer to a structure containing the peer variables.3.2.3. Peer Variables Following is a list of state variables used by the peer management and measurement functions. There is one set of these variables for every peer operating in client mode or symmetric mode. Peer State (peer.state) This is a bit-encoded quantity used for various control functions. Host Poll Interval (peer.hpoll) This is a signed integer used only in symmetric mode and indicating the minimum interval between messages expected from the peer, in seconds as a power of two. For instance, a value of six indicates a minimum interval of 64 seconds. The value of this variable must not be less than NTP.MINPOLL and must not be greater than NTP.MAXPOLL. Reachability Register (peer.reach) This is a code used to determine the reachability status of the peer. It is used as a shift register, with bits entering from the least significant (rightmost) end. The size of this register is specified as PEER.SHIFT bits. Peer Timer (peer.timer) This is an integer counter used to control the interval between transmitted NTP messages. Timer Threshold (peer.threshold) This is the timer value which, when reached, causes the timeout procedure to be executed. Originate Timestamp (peer.org, pkt.org) This is the local time, in timestamp format, at the peer when itsMills [Page 18]RFC 1059 Network Time Protocol July 1988 latest NTP message was sent. If the peer becomes unreachable the value is set to zero. Receive Timestamp (peer.rec, pkt.rec) This is the local time, in timestamp format, when the latest NTP message from the peer arrived. If the peer becomes unreachable the value is set to zero.3.2.4. Packet Variables Following is a list of variables used in NTP messages in addition to the common variables above. Version Number (pkt.version) This is an integer indicating the version number of the sender. NTP messages will always be sent with the current version number NTP.VERSION and will always be accepted if the version number matches NTP.VERSION. Exceptions may be advised on a case-by-case basis at times when the version number is changed. Transmit Timestamp (pkt.xmt) This is the local time, in timestamp format, at which the NTP message departed the sender.3.2.5. Clock Filter Variables When the filter and selection algorithms suggested in Section 4 are used, the following state variables are defined. There is one set of these variables for every peer operating in client mode or symmetric mode. Filter Register (peer.filter) This is a shift register of PEER.WINDOW bits, where each stage is a tuple consisting of the measured delay concatenated with the measured offset associated with a single observation. Delay/offset observations enter from the least significant (rightmost) right and are shifted towards the most significant (leftmost) end and eventually discarded as new observations arrive. The register is cleared to zeros when (a) the peer becomes unreachable or (b) the logical clock has just been reset so as to cause a significant discontinuity in local time.Mills [Page 19]RFC 1059 Network Time Protocol July 1988 Delay Estimate (peer.delay) This is a signed, fixed-point number indicating the latest delay estimate output from the filter, in seconds. While the number is signed, only those values greater than zero represent valid delay estimates. Offset Estimate (peer.offset) This is a signed, fixed-point number indicating the latest offset estimate output from the filter, in seconds. Dispersion Estimate (peer.dispersion) This is a fixed-point number indicating the latest dispersion estimate output from the filter, in scrambled units.3.2.6. Parameters Following is a list of parameters assumed for all implementations operating in the Internet system. It is necessary to agree on the values for these parameters in order to avoid unnecessary network overheads and stable peer associations. Version Number (NTP.VERSION) This is the NTP version number, currently one (1). NTP Port (NTP.PORT) This is the port number (123) assigned by the Internet Number Czar to NTP. Minimum Polling Interval (NTP.MINPOLL) This is the minimum polling interval allowed by any peer of the Internet system, currently set to 6 (64 seconds). Maximum Polling Interval (NTP.MAXPOLL) This is the maximum polling interval allowed by any peer of the Internet system, currently set to 10 (1024 seconds). Maximum Dispersion (NTP.MAXDISP) This is the maximum dispersion assumed by the filter algorithms, currently set to 65535 milliseconds.Mills [Page 20]RFC 1059 Network Time Protocol July 1988 Reachability Register Size (PEER.WINDOW) This is the size of the Reachability Register (peer.reach), currently set to eight (8) bits. Shift Register Size (PEER.SHIFT) When the filter and selection algorithms suggested in Section 4 are used, this is the size of the Clock Filter (peer.filter) shift register, in bits. For crystal-stabilized oscillators a value of eight (8) is suggested, while for mains-frequency oscillators a value of four (4) is suggested. Additional considerations are given in Section 5. Dispersion Threshold (PEER.THRESHOLD) When the filter and selection algorithms suggested in Section 4 are used, this is the threshold used to discard noisy data. While a value of 500 milliseconds is suggested, the value may be changed to suit local conditions on particular peer paths. Filter Weight (PEER.FILTER) When the filter algorithm suggested in Section 4 is used, this is the filter weight used to discard noisy data. While a value of 0.5 is suggested, the value may be changed to suit local conditions on particular peer paths.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -