0% found this document useful (0 votes)
241 views14 pages

Precision Time Protocol (PTP) New Version

The document discusses Precision Time Protocol (PTP) as defined by IEEE 1588. [1] PTP is designed to synchronize real-time clocks in distributed systems using a network. [2] It supports sub-microsecond synchronization accuracy with minimal bandwidth and resources. [3] PTP defines a master-slave architecture, message types, computations, and a best master clock algorithm to select the timing reference.

Uploaded by

naman gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
241 views14 pages

Precision Time Protocol (PTP) New Version

The document discusses Precision Time Protocol (PTP) as defined by IEEE 1588. [1] PTP is designed to synchronize real-time clocks in distributed systems using a network. [2] It supports sub-microsecond synchronization accuracy with minimal bandwidth and resources. [3] PTP defines a master-slave architecture, message types, computations, and a best master clock algorithm to select the timing reference.

Uploaded by

naman gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

PRECISION TIME PROTOCOL(PTP)

IEEE 1588

AGENDA
1. INTRODUCTION
2. OBJECTIVES
3. ARCHITECTURE
4. CLOCK SYNCHRONIZATION
5. MESSAGE TYPES
6. PTP SYNCHRONIZATION
7. SELECTION OF MASTER
INTRODUCTION

IEEE 1588 is a protocol designed to synchronize real-time clocks in the nodes of a distributed system
that communicate using a network.
Target is groups of relatively stable components, locally networked (a few subnets), cooperating on a set
of well defined tasks.
Approved by the IEEE-SA Review Committee on September 12, 2002.

Products: Microprocessors, GPS Linked Clocks, Boundary Clocks, NIC Cards, Protocol Stacks, RF
Instrumentation, Aircraft Flight Monitoring Instruments, etc.
The IEEE 1588-2002 standard was later revised and became the IEEE 1588-2008 standard, many in
industry refers to it as the IEEE 1588 version 2 standard.
OBJECTIVES
This standard defines a network protocol enabling accurate and precise synchronization of the real-time
clocks of devices in networked distributed systems.
The protocol supports synchronization in the sub-microsecond range with minimal network bandwidth and
local clock computing resources.
Support heterogeneous systems of clocks with varying precision, resolution and stability
Applicable to local area networks supporting multicast communications for PTP version 1 and unicast for PTP
version 2.
The standard defines all needed data types, message formats, required computations, internal states, the
behavior of devices with respect to transmitting, receiving, and processing protocol communications.
ARCHITECTURE

IEEE 1588 standards describe a


hierarchical master-slave architecture
for clock distribution
Ordinary clock source for root timing
reference, called grandmaster
Boundary clock intermediate
synchronization bridge from one network
segment to another used by synchronization
master to sync clocks within a network
segment
PTP messages use IP-multicast /IP-
unicast over UDP (IPv4 or IPv6)
Selection algorithm of best clock
source uses properties such as quality,
accuracy, variance etc.
CLOCK SYNCHRONIZATION
Most computers today keep track of the passage of time
with a battery-backedup CMOS clock circuit, driven by a
quartz resonator. This allows the timekeeping to take
place even if the machine is powered off.

The problem with maintaining a concept of time is when


multiple entities expect each other to have the same idea
of what the time is :
CLOCK DRIFT: The phenomenon of clocks ticking at different rates,
creating a ever widening gap in perceived time is known as clock
drift.
CLOCK SKEW: The difference between two clocks at any point in
time is called clock skew .

From the given FIGURE:1 we can see the phenomenon of


FIGURE : 1
Clock Drift and Clock Skew.

CLOCK SYNCHRONIZATION
COMPENSATING FOR THE DRIFT
Suppose that we have a means of obtaining
the true time. One easy (and frequently
adopted) solution is to simply update the
system time to the true time.
If a clock is fast, it simply has to be made to
run slower until it synchronizes and vice-
versa.The operating system can do this by
changing the rate at which it requests
interrupts.
The system can request interrupts at a faster
rate until the clock catches up. This
adjustment changes the slope of the system
time and is known as a linear compensating
function. After the synchronization period is FIGURE : 2
reached, one can choose to resynchronize
periodically.
MESSAGES TYPES
Synchronization and management of a PTP system is achieved through the
exchange of messages across the communications medium. To this end, PTP uses
the following message types:
Sync, Delay_Req, Follow_Up and Delay_Resp messages are used by
ordinary and boundary clocks and communicate time-related information
used to synchronize clocks across the network.
Pdelay_Req, Pdelay_Resp and Pdelay_Resp_Follow_Up are used by
transparent clocks to measure delays across the communications medium.
Announce messages are used by the BEST MASTER ALGORITHIM in IEEE 1588-
2008 to build a clock hierarchy and select the grandmaster.
Management messages are used by Network Management to monitor,
configure and maintain a PTP system.
Signaling messages are used for non-time-critical communications between
clocks. Signaling messages were introduced in IEEE 1588-2008.
PTP SYNCHRONIZATION

The protocol defines synchronization messages used between a Master and Slave clock similar to
the Server and Client mode used in the Network Time Protocol (NTP).
The Master is the provider of time, and the Slave synchronizes to the Master. A Grandmaster is a
Master that is synchronized to a time reference such as GPS or CDMA.
Clock synchronization on the LAN requires at least one Master and one Slave. Multiple Slaves can
synchronize to a single Master.
There is a sync message transmitted typically every two seconds from the Master, and a delay
request message from the Slave less frequently, about one request per minute
PTP SYNCHRONIZATION

Four timestamps are captured between the Master and Slave clock. The timestamps are required for the Slave offset calculation. The
timestamps are commonly referred to as T1, T2, T3, and T4.

Determine the offset between Clocks and their master

a. Let t represent physical time, given slave device, the offset o(t) at
time t is : o(t) = s(t) - m(t).
m(t) is measured time at master at time t, and
s(t) is measured time at local clock at time t.
1-step clock updates accurate timestamp (t1) in Sync message

2-step clock sends accurate timestamp (t1) in a Follow_Up message

. Simplify design while avoiding queuing noise


. Ease integration of security extensions
SELCTION OF MASTER
The best master clock (BMC) algorithm performs a distributed selection of the best
candidate clock based on the following clock properties:-
For Version 2002 properties for selection are:
Identifier,Quality,Priority,Variance.
For Version 2008 properties for selection are:
Priority1,Class,Accuracy,Variance,Priority2,Unique Identifier.

The algorithm runs independently on each clock in a domain. In other words, clocks
do not negotiate which should be master and which should be slaveinstead, each
computes only the state of its own ports.

The algorithm avoids configurations with two masters, or none, or ones that thrash.

Basically, The best master clock algorithm, BMC, consists of two parts:
State Decision Algorithm
Data Set Comparison Algorithm.
STATE DECISION ALGORITHIM
The state decision algorithm used in the best master clock algorithm shall be as defined by
given Figure. After a decision is reached by use of this algorithm, the data sets of the local
clock shall be updated as specified.
Algorithms follows the following steps to be completed for complete process:
STATE DECISION ALGORITHIM
DATA SET COMPARISION ALGORITHIM
The best master clock algorithm compares one clock with another by comparing data sets that represent those clocks.
The data sets are indicated in these figures as set A and set B. The sources for data set values are given in Table.

If in comparing any two of the data sets D0, Ebest, or Erbest, one of the data sets is the empty set, then the nonempty set is
deemed the better set. D0 is never the empty set; however, Ebest or Erbest or both may be the empty set.
Here (i). Erbest: Denotes the announce messages that have arrived at port r , only qualifies announce messages are considered.
(ii). Ebest: It is the best announce message which is to be considered from all Erbest.
DATA SET COMPARISION ALGORITHIM

You might also like