原文章:
A. Masters and Slaves
In PTP, master clocks provide the reference time for one
or more slave clocks through the exchange of messages over a
network. The protocol determines a unique master among a
group of clocks using the Best Master Clock algorithm
(BMC). The BMC selects the most stable and accurate clock.
B. Sync Messages PTP masters send Sync messages. The master records the
send time of Sync messages (t1), and slaves record the receipt
time (t2). The difference between the send and receipt times of
Sync messages is the master-to-slave delay (dm2s):dm2s = t1 – t2. (2.1)
Sync messages are sent once per Sync interval (Tsync)
(typically 2 s). This makes the master-to-slave delay sampling
period (Tm2s): Tm2s = Tsync = 2 s. (2.2)
C. Delay Request Messages PTP slaves send Delay Request messages. Slaves record
the send time of Delay Request messages (t3), and the master
records the receipt time (t4). The difference between the send
and receipt times of Delay Request messages is the slave-tomaster delay (ds2m): ds2m = t3 – t4. (2.3)
Delay Request messages are sent on intervals uniformly
distributed between 2 and 30 Sync intervals. This makes the
slave-to-master delay sampling period (Ts2m): Ts2m = Tsync * U[2,30]. (2.4)
D. One-Way Delay PTP calculates an estimate of the message propagation
delay. This calculation assumes symmetric propagation
delays, so that an average of the master-to-slave and slave-tomaster delays cancels the time offset between master and
slave. This yields the message propagation delay, which the
specification refers to as the one-way delay (dprop): dprop = (dm2s + ds2m)/2. (2.5) Assuming symmetric propagation delays is often, but not
always, valid. Asymmetric propagation delays cannot be
observed by the protocol. They will cause a constant bias in
the one-way delay and, in turn, the overall time coordination.
The bias will equal half of the magnitude of the delay
asymmetry. Assuming a constant delay asymmetry, an asymmetric
delay bias can be eliminated by adding a latency correction to
the master-to-slave or slave-to-master delay that cancels the
asymmetry; however, assuming constant delay asymmetry
also may be invalid.
E. Offset From Master PTP estimates the time difference between master and
slave clocks. This is the master-to-slave delay corrected for
message propagation delay, and it is referred to as the offset
from master (∆t):
∆t = dm2s – dprop. (2.6)
III. PTPd IN BRIEF