IEEE1588-v2

Post on 16-May-2015

947 views 4 download

description

The introduction about IEEE1588v2

Transcript of IEEE1588-v2

IEEE1588-v2 Introduction

AGENDA

• Time Synchronization• IEEE1588-2002• IEEE1588-2008 • Best Master Clock Algorithm• Message Transport• Implementation

Time Synchronization

• NTP/SNTP– Application Layer– Not accuracies(10~100 ms)

• GPS– Expensive

• Precision Time Protocol (PTP)– Local area network– sub-microsecond (μs)– Measurement and control system– Master-slave architecture

IEEE1588-2002 Clock Type

• Ordinary Clock (OC)– a single PTP port– end nodes

• Boundary Clock (BC)– multiple PTP port– sync from one network to another– switch & router

• Grandmaster Clock (GMC)– stable & accuracies

• GPS or atomic clock

– Best Master Clock (BMC) define GMC– One GMC in local network

IEEE1588-2002 Clock Type

GMC BC

OC

OC

BC OC

GPS

M

M

M

M

S

S

S

S

S

IEEE1588-2002 Message type

• Sync (Offset)– Master to Slave– Timestamp (predict send out time)– Send every 2 sec

• Follow up (Offset)– Master to Slave– Contain send sync timestamp

• Delay Request (Delay)– Slave to Master– Send every 4 ~ 60 sec

• Delay Response (Delay)– Master to Slave

Synchronizing with Master and Slave

• Synchronizing– Delay + Offset = t2-t1– Delay - Offset = t4-t3– Delay

• ((t2-t1) + (t4-t3)) / 2

– Offset• ((t2-t1) - (t4-t3)) / 2

• Precision– Software (ms)– Software + Hardware (μs)

Synchronizing with Local Clock

• Drift– Frequency is difference between master & slave

clock• Solution– Time stamp in hardware– Follow-up message to adjust the frequency

IEEE1588-2008 Clock and Message Type

• Transparent Clock (TC)– Convey PTP message– End-to-End (E2E) Transparent Clock

• forwards all messages on the network• Add the switch “transit time” to “correction field” on SYNC & DELAY_REQUEST

message• No “propagation delay”

– Peer-to-Peer (P2P) Transparent Clock• Add “propagation delay” (upstream link delay)• Add “transit time” + “upstream link delay” to “correction field”

• Message Type– Pdelay_Req– Pdelay_Resp– Pdelay_Resp_Follow_Up

IEEE1588-2008 Clock and Message Type

GMC E2E TC

OC

OC

GPS

M MS

S

S

Sunc, Follow_Up, Delay_Req, Delay_Resp

GMC P2P TC

OC

OC

GPS

M MS

S

S

Pdelay_Req,Pdelay_Resp,Pdelay_Resq_Follow_Up

Synchronizing with P2P TC

• Synchronizing– Delay + Offset = t2-t1– Delay - Offset = t4-t3– Delay

• ((t2-t1) + (t4-t3)) / 2

– Offset• ((t2-t1) - (t4-t3)) / 2

Best Master Clock Algorithm (BMC)

• Select the best candidate clock– Identifier : MAC address– Quality : timing deviation (GPS is highest quality)• 1588-2002 : data field stratum• 1588-2002 : clock accuracy & clock class

– Priority : help select a grandmaster• 1588-2002 : boolean• 1588-2008 : two 8-bit

– Variance

Message Transport

• Ethernet layer– EtherType : 0x88F7– Multicast address : 01:1B:19:00:00:00– Peer Delay address[2008] : 01:80:C2:00:00:0E

• IP layer– Multicast address : 224.0.1.129 & FF0x::181– Peer Delay address[2008] : 224.0.0.107 & FF02::6B

• UDP – Event Message : 319

• Sync, Delay_Req, Pdelay_Req, Pdelay_Resp

– General Message : 320• Follow_Up, Delay_Resp, Pdelay_Resp_Follow_Up

Implementation

• Software on linux– PTPd (BSD lisence)

• IEEE1588-2002, 2008 (OC)• HW: Intel 82576 or 82580

– Ptpv2d (GPL)• IEEE1588-2002, 2008 and IEEE802.1AS (OC)• HW: Freescale MPC831x family

– Ptp4l (GPL)• IEEE1588-2002, 2008 and IEEE802.1AS (BC, OC)

– Linux PTP Hardware Clock (linux kernel 3.0)– SO_TIMESTAMPING (linux kernel 2.6.30)

• HW: Freescale eTSEC gianfar, National Semiconductor DP83640, Intel IXP465