Defined in IEEE Std 1588™-2008 (1588v2), Precision Time Protocol (PTP) is a protocol that distributes frequency, phase and time over packet based networks
1. The IEEE 1588 protocol has become the standard for distribution of high accuracy time. Following guidelines for specific network architectures allows the delivery of time to accuracies of one microsecond. This level of accuracy is required for mobile base stations using either Time Division Duplex technology and/or advanced LTE functions, as well as in the power industry for intelligent electronic device alignment.
The master sends a PTP Sync message containing a timestamp of when the Sync message is transmitted (t1) to the slave. In a two-step master clock, the t1 timestamp is sent in a Follow_Up
2 message. The slave records the time it receives the Sync message (t2). At some point after receiving the Sync message, the slave sends a Delay_Req message back to the master. The slave records the time of transmission of the Delay_Req message (t3) locally. The master records the time it receives the Delay_Req message (t4) and sends this timestamp back to the slave in a Delay_Resp message.
The 1588 standard itself includes a default profile that can be used for either time or frequency distribution. The default profile was defined principally for multicast operation. However, it can be used with the unicast sessions as described below. The default profile supports all 1588 clock types and includes the Best Master Clock Algorithm (BMCA) that automatically builds the synchronization distribution hierarchy amongst the PTP clocks. The SR OS only supports the unicast session version of the default profile.
•
|
PTP clock class values are based on a mapping of traditional quality levels from SSM/ESMC 3.
|
A common concern around 1588 is whether it will work on or over a specific customer network. For time distribution using full OPS as shown in Figure 7, there are well defined limits on the number of network elements allowed in the distribution chain (see below). However, for the frequency distribution using the architecture shown in
Figure 6, it is a more difficult question to answer. There are so many different types of network elements and inter-node links that a simple limit on the number of network elements is not adequate. What has been specified is a limit to the noise that the network can introduce to the 1588 message flow between the grandmaster and slave clocks. This noise occurs as packet delay variation (PDV). The following sections provide some description of this PDV and a new metric that has been defined for PDV as well as the recommended limit to PDV for 1588 deployments.
•
|
W is the width of the windows used to monitor for the presence of fastest packets.
|
•
|
Floor Delay is a value that is as close as possible to the absolute minimum transit delay across the network. Every actual delay measurement must be equal to or larger than this value.
|
Figure 10 illustrates how these parameters and the metric work. First the delays of all individual 1588 packets are plotted over the period of observation. Next the observation period is broken down into a series of consecutive windows of width
W seconds. Then for each window a count is made of all the 1588 packets whose delays are within the range
floor delay to
floor delay + δ and this count is compared with all the 1588 packets received during the window to turn the count into a percentage. Finally the percentage of each window is checked against the threshold percentage ρ. For the FPP metric to be met, every window must have a percentage greater or equal to the threshold. If even one single window does not meet this threshold then the metric condition is not met.
The overall end to end budget is defined as ±1.5 microseconds. From this the following allocations are made:
•
|
±100ns Time error due to the GNSS receiver and the 1588 grandmaster.
|
•
|
±500ns Constant Time error due to ten Telecom Boundary Clocks (50 ns limit per boundary clock).
|
•
|
±200ns Dynamic Time error presented at the end of the boundary clock chain into the end slave.
|
•
|
±300ns Time error due to errors in cable latency asymmetry compensation (see below).
|
•
|
±150ns Time error due to the end slave and any internals of the basestation between the ‘ recovery and the presentation on the air interface.
|
•
|
±200ns Time error in the end application during short term holdovers such as network topology re-arrangements.
|
A typical deployment scenario for a system configured as an ordinary master to distribute frequency to an external slave clock, often a cell site router or a base station, is shown in Figure 12. The central clock of the system is locked via its BITS ports or a Synchronous Ethernet port to an external source that is traceable to a primary reference. The frequency of the central clock is used to generate the timestamps contained in PTP event messages. The timestamps generated do not correlate to any standard epoch and therefore indicate an arbitrary timescale. As such it is only the rate of progression of the timestamps that has meaning.
In the topology in Figure 12, the systems will most likely be configured with the ITU-T G.8265.1 Profile.
*A:PE-1#
configure
router
interface "system"
address 192.0.2.183/32
no shutdown
exit
interface "int-PE-1-PE-2"
address 192.168.1.1/30
port 1/1/1
no shutdown
exit
exit
*A:PE-1#
configure
port 5/1/3
description "Sync-E reference for node"
ethernet
ssm
code-type sonet
no shutdown
exit
exit
no shutdown
exit
system
sync-if-timing
begin
ql-selection
ref2
source-port 5/1/3
no shutdown
exit
commit
exit
exit
*A:PE-1#
configure
system
ptp
clock-type ordinary master
network-type sonet
no shutdown
exit
exit
*A:PE-2#
configure
router
interface "system"
address 192.0.2.182/32
no shutdown
exit
interface "int-PE-2-PE-1"
address 192.168.1.2/30
port 1/1/1
no shutdown
exit
exit
*A:PE-1#
configure
system
ptp
network-type sonet
peer 192.0.2.183 create
no shutdown
exit
no shutdown
exit
exit
*A:PE-2#
configure
system
sync-if-timing
begin
ql-selection
ptp
no shutdown
exit
commit
exit
exit
*A:PE-1# show system ptp unicast
===============================================================================
IEEE 1588/PTP Unicast Negotiation Information
===============================================================================
Router
IP Address Dir Type Rate Duration State Time
-------------------------------------------------------------------------------
Base
192.0.2.182 Tx Announce 1 pkt/2 s 300 Granted 05/30/2014 06:08:38
192.0.2.182 Tx Sync 64 pkt/s 300 Granted 05/30/2014 06:08:43
192.0.2.182 Rx DelayReq 64 pkt/s 300 Granted 05/30/2014 06:08:43
192.0.2.182 Tx DelayRsp 64 pkt/s 300 Granted 05/30/2014 06:08:43
-------------------------------------------------------------------------------
PTP Peers : 1
Total Packet Rate : 192 packets/second
===============================================================================
*A:PE-2# show system ptp unicast
===============================================================================
IEEE 1588/PTP Unicast Negotiation Information
===============================================================================
Router
IP Address Dir Type Rate Duration State Time
-------------------------------------------------------------------------------
Base
192.0.2.183 Rx Announce 1 pkt/2 s 300 Granted 05/30/2014 09:08:38
192.0.2.183 Rx Sync 64 pkt/s 300 Granted 05/30/2014 09:08:43
192.0.2.183 Tx DelayReq 64 pkt/s 300 Granted 05/30/2014 09:08:43
192.0.2.183 Rx DelayRsp 64 pkt/s 300 Granted 05/30/2014 09:08:43
-------------------------------------------------------------------------------
PTP Peers : 1
Total Packet Rate : 192 packets/second
===============================================================================
A Pending state indicates the system has sent a Unicast Request toward the peer but has not received a response. If the state remains
Pending, then the IP connectivity between the systems should be verified.
*A:PE-2# show system ptp
===============================================================================
IEEE 1588/PTP Clock Information
===============================================================================
-------------------------------------------------------------------------------
Local Clock
-------------------------------------------------------------------------------
Clock Type : ordinary,slave PTP Profile : ITU-T G.8265.1
Domain : 4 Network Type : sonet
Admin State : up Oper State : up
Announce Interval : 1 pkt/2 s Announce Rx Timeout: 3 intervals
Peer Limit : none (Base Router)
Clock Id : 00233efffe808250 Clock Class : 255 (slave-only)
Clock Accuracy : unknown Clock Variance : ffff (not computed)
Clock Priority1 : 128 Clock Priority2 : 128
PTP Port State : slave Last Changed : 05/30/2014 09:08:42
PTP Recovery State: phase-tracking Last Changed : 05/30/2014 09:08:42
Frequency Offset : -2.704 ppb
-------------------------------------------------------------------------------
Parent Clock
-------------------------------------------------------------------------------
IP Address : 192.0.2.183 Router : Base
Parent Clock Id : 00233efffe69f250 Remote PTP Port : 1
GM Clock Id : 00233efffe69f250 GM Clock Class : 80 (prs)
GM Clock Accuracy : unknown GM Clock Variance : ffff (not computed)
GM Clock Priority1: 128 GM Clock Priority2 : 128
-------------------------------------------------------------------------------
Time Information
-------------------------------------------------------------------------------
Timescale : Arbitrary
Current Time : 2014/05/30 14:12:52.9 (ARB)
Frequency Traceable : yes
Time Traceable : no
Time Source : other
===============================================================================
*A:PE-2# show system ptp statistics
===============================================================================
IEEE 1588/PTP Packet Statistics
===============================================================================
Input Output
-------------------------------------------------------------------------------
PTP Packets 5506 2742
Announce 23 0
Sync 2740 0
Follow Up 0 0
Delay Request 0 2740
Delay Response 2740 0
Signaling 3 3
Request Unicast Transmission TLVs 0 3
Announce 0 1
Sync 0 1
Delay Response 0 1
Grant Unicast Transmission (Accepted) TLVs 3 0
Announce 1 0
Sync 1 0
Delay Response 1 0
Grant Unicast Transmission (Denied) TLVs 0 0
Announce 0 0
Sync 0 0
Delay Response 0 0
Cancel Unicast Transmission TLVs 0 0
Announce 0 0
Sync 0 0
Delay Response 0 0
Ack Cancel Unicast Transmission TLVs 0 0
Announce 0 0
Sync 0 0
Delay Response 0 0
Other TLVs 0 0
Other 0 0
Event Packets timestamped at port 0 0
Event Packets timestamped at cpm 2740 2740
Discards 0 0
Bad PTP domain 0 0
Alternate Master 0 0
Out Of Sequence 0 0
Peer Disabled 0 0
Other 0 0
===============================================================================
===============================================================================
IEEE 1588/PTP Frequency Recovery State Statistics
===============================================================================
State Seconds
-------------------------------------------------------------------------------
Initial 0
Acquiring 0
Phase-Tracking 43
Locked 0
Hold-over 0
===============================================================================
===============================================================================
IEEE 1588/PTP Event Statistics
===============================================================================
Event Sync Flow Delay Flow
-------------------------------------------------------------------------------
Packet Loss 0 0
Excessive Packet Loss 0 0
Excessive Phase Shift Detected 0 0
Too Much Packet Delay Variation 0 0
===============================================================================
*
*A:PE-2# show system sync-if-timing
===============================================================================
System Interface Timing Operational Info
===============================================================================
System Status CPM B : Master Locked
Reference Input Mode : Non-revertive
Quality Level Selection : Disabled
Reference Selected : ptp
System Quality Level : prs
Current Frequency Offset (ppm) : +0
Reference Order : bits ref1 ref2 ptp
Reference Mate CPM
Qualified For Use : No
Not Qualified Due To : LOS
Selected For Use : No
Not Selected Due To : not qualified
Reference Input 1
Admin Status : down
Rx Quality Level : unknown
Quality Level Override : none
Qualified For Use : No
Not Qualified Due To : disabled
Selected For Use : No
Not Selected Due To : disabled
Source Port : None
Reference Input 2
Admin Status : down
Rx Quality Level : unknown
Quality Level Override : none
Qualified For Use : No
Not Qualified Due To : disabled
Selected For Use : No
Not Selected Due To : disabled
Source Port : None
Reference BITS B
Input Admin Status : down
Rx Quality Level : failed
Quality Level Override : none
Qualified For Use : No
Not Qualified Due To : disabled
Selected For Use : No
Not Selected Due To : disabled
Interface Type : DS1
Framing : ESF
Line Coding : B8ZS
Line Length : 0-110ft
Output Admin Status : down
Output Source : line reference
Output Reference Selected : none
Tx Quality Level : N/A
Reference PTP
Admin Status : up
Rx Quality Level : prs
Quality Level Override : none
Qualified For Use : Yes
Selected For Use : Yes
configure
system
ptp
shutdown
domain 0
no shutdown
exit
exit
configure
system
ptp
peer 192.0.2.166 create
log-sync-interval -5
no shutdown
exit
exit
exit
configure
system
ptp
shutdown
log-anno-interval -1
no shutdown
exit
exit
The example in Figure 13 shows a boundary clock (PE-1) communicating directly with the GNSS driven grandmaster (GM-1) and a second boundary clock (PE-2) communicating with the first boundary clock.
*A:PE-1#
configure
router
interface "system"
address 192.0.2.183/32
no shutdown
exit
interface "int-PE-1-PE-2"
address 192.168.1.1/30
port 1/1/1
no shutdown
exit
interface "int-PE-1-GM-1"
address 172.16.0.56/30
port 1/1/2
no shutdown
exit
exit
*A:PE-2#
configure
router
interface "system"
address 192.0.2.182/32
no shutdown
exit
interface "int-PE-2-PE-1"
address 192.168.1.2/30
port 1/1/1
no shutdown
exit
exit
*A:PE-1#
configure card 1 mda 1 sync-e
configure port 1/1/1 ethernet
code-type sonet
no shutdown
exit
*A:PE-2#
configure card 1 mda 1 sync-e
configure port 1/1/1
ethernet
ssm
code-type sonet
no shutdown
exit
exit
exit
configure system sync-it-timing
begin
ql-selection
ref1
source-port 1/1/1
no shutdown
exit
commit
exit
*A:PE-1#
configure system ptp
shutdown
profile ieee1588-2008
clock-type boundary
peer 172.16.0.55 create
no shutdown
exit
no shutdown
exit
*A:PE-1#
configure system ptp
shutdown
log-anno-interval -3
peer 172.16.0.55
shutdown
log-sync-interval -4
no shutdown
exit
no shutdown
exit
*A:PE-2#
configure system ptp
shutdown
profile ieee1588-2008
clock-type boundary
log-anno-interval -3
peer 192.0.2.183 create
shutdown
log-sync-interval -4
no shutdown
exit
no shutdown
exit
*A:PE-1# show system ptp unicast
===============================================================================
IEEE 1588/PTP Unicast Negotiation Information
===============================================================================
Router
IP Address Dir Type Rate Duration State Time
-------------------------------------------------------------------------------
Base
192.0.2.182 Tx Announce 8 pkt/s 300 Granted 05/30/2014 07:02:36
192.0.2.182 Tx Sync 16 pkt/s 300 Granted 05/30/2014 07:02:37
192.0.2.182 Rx DelayReq 16 pkt/s 300 Granted 05/30/2014 07:02:37
192.0.2.182 Tx DelayRsp 16 pkt/s 300 Granted 05/30/2014 07:02:37
172.16.0.55 Rx Announce 8 pkt/s 300 Granted 05/30/2014 07:02:42
172.16.0.55 Rx Sync 16 pkt/s 300 Granted 05/30/2014 07:02:43
172.16.0.55 Tx DelayReq 16 pkt/s 300 Granted 05/30/2014 07:02:43
172.16.0.55 Rx DelayRsp 16 pkt/s 300 Granted 05/30/2014 07:02:43
-------------------------------------------------------------------------------
PTP Peers : 2
Total Packet Rate : 112 packets/second
===============================================================================
*A:PE-1# show system ptp
===============================================================================
IEEE 1588/PTP Clock Information
===============================================================================
-------------------------------------------------------------------------------
Local Clock
-------------------------------------------------------------------------------
Clock Type : boundary PTP Profile : IEEE 1588-2008
Domain : 0 Network Type : sdh
Admin State : up Oper State : up
Announce Interval : 8 pkt/s Announce Rx Timeout: 3 intervals
Peer Limit : none (Base Router)
Clock Id : 00233efffe69f250 Clock Class : 248 (default)
Clock Accuracy : unknown Clock Variance : ffff (not computed)
Clock Priority1 : 128 Clock Priority2 : 128
PTP Recovery State: locked Last Changed : 05/30/2014 07:05:17
Frequency Offset : +50.305 ppb
-------------------------------------------------------------------------------
Parent Clock
-------------------------------------------------------------------------------
IP Address : 172.16.0.55 Router : Base
Parent Clock Id : 8887868584838281 Remote PTP Port : 1
GM Clock Id : 8887868584838281 GM Clock Class : 7
GM Clock Accuracy : within 250 ns GM Clock Variance : 0x6400 (3.7E-09)
GM Clock Priority1: 128 GM Clock Priority2 : 128
-------------------------------------------------------------------------------
Time Information
-------------------------------------------------------------------------------
Timescale : PTP
Current Time : 2014/05/30 15:07:01.1 (UTC)
Frequency Traceable : yes
Time Traceable : yes
Time Source : GPS
*A:PE-2# show system ptp
===============================================================================
IEEE 1588/PTP Clock Information
===============================================================================
-------------------------------------------------------------------------------
Local Clock
-------------------------------------------------------------------------------
Clock Type : boundary PTP Profile : IEEE 1588-2008
Domain : 0 Network Type : sdh
Admin State : up Oper State : up
Announce Interval : 8 pkt/s Announce Rx Timeout: 3 intervals
Peer Limit : none (Base Router)
Clock Id : 00233efffe808250 Clock Class : 248 (default)
Clock Accuracy : unknown Clock Variance : ffff (not computed)
Clock Priority1 : 128 Clock Priority2 : 128
PTP Recovery State: locked Last Changed : 05/30/2014 10:02:36
Frequency Offset : -9.345 ppb
-------------------------------------------------------------------------------
Parent Clock
-------------------------------------------------------------------------------
IP Address : 192.0.2.183 Router : Base
Parent Clock Id : 00233efffe69f250 Remote PTP Port : 1
GM Clock Id : 8887868584838281 GM Clock Class : 7
GM Clock Accuracy : within 250 ns GM Clock Variance : 0x6400 (3.7E-09)
GM Clock Priority1: 128 GM Clock Priority2 : 128
-------------------------------------------------------------------------------
Time Information
-------------------------------------------------------------------------------
Timescale : PTP
Current Time : 2014/05/30 15:09:26.5 (UTC)
Frequency Traceable : yes
Time Traceable : yes
Time Source : GPS
===============================================================================
For the example shown in Figure 14, it is assumed that a VPRN service is already configured and operational on PE-2 providing connectivity between PE-2 and CE-1:
*A:PE-2#
configure service vprn 10 customer 1 create
router-id 176.16.1.1
autonomous-system 64496
route-distinguisher 64496:10
interface "int-PE-2-CE-1" create
address 10.90.97.1/30
sap 2/1/1 create
exit
exit
no shutdown
exit
*A:PE-2#
configure service vprn 10
peer-limit 10
ptp no shutdown
exit
*A:PE-2# show system ptp unicast router 10
*A:PE-2# show service id 10 ptp unicast
*A:PE-2# show system ptp unicast router 10
===============================================================================
IEEE 1588/PTP Unicast Negotiation Information
===============================================================================
Router
IP Address Dir Type Rate Duration State Time
-------------------------------------------------------------------------------
10
172.16.1.2 Tx Announce 1 pkt/2 s 300 Granted 05/30/2014 12:40:53
172.16.1.2 Tx Sync 64 pkt/s 300 Granted 05/30/2014 12:40:59
172.16.1.2 Rx DelayReq 64 pkt/s 300 Granted 05/30/2014 12:40:59
172.16.1.2 Tx DelayRsp 64 pkt/s 300 Granted 05/30/2014 12:40:59
-------------------------------------------------------------------------------
PTP Peers : 1
Total Packet Rate : 192 packets/second
===============================================================================
*A:PE-1#
configure
router
interface "int-PE-1-PE-2"
ptp-hw-assist
exit
interface "int-PE-1-GM-1"
ptp-hw-assist
exit
exit
*A:PE-2#
configure
router
interface "int-PE-2-PE-1"
ptp-hw-assist
exit
exit
exit
configure service vprn 10 customer 1
interface "int-PE-2-CE-1"
ptp-hw-assist
exit
exit
*A:PE-1# show system ptp peer 172.16.0.55
===============================================================================
IEEE 1588/PTP Peer Information
===============================================================================
Router : Base
IP Address : 172.16.0.55 Announce Direction : rx
Admin State : up G.8265.1 Priority : n/a
Sync Interval : 16 pkt/s
Local PTP Port : 2 PTP Port State : slave
Clock Id : 8887868584838281 Remote PTP Port : 1
GM Clock Id : 8887868584838281 GM Clock Class : 7
GM Clock Accuracy : within 250 ns GM Clock Variance : 0x6400 (3.7E-09)
GM Clock Priority1: 128 GM Clock Priority2 : 128
Steps Removed : 0 Parent Clock : yes
Tx Timestamp Point: port Rx Timestamp Point : port
Last Tx Port : 5/1/1 Last Rx Port : 5/1/1
===============================================================================
*A:PE-1# show system ptp peer 192.0.2.182
===============================================================================
IEEE 1588/PTP Peer Information
===============================================================================
Router : Base
IP Address : 192.0.2.182 Announce Direction : tx
Admin State : n/a G.8265.1 Priority : n/a
Sync Interval : n/a
Local PTP Port : 3 PTP Port State : master
Clock Id : 00233efffe808250 Remote PTP Port : 4
Tx Timestamp Point: cpm Rx Timestamp Point : cpm
Last Tx Port : 5/1/2 Last Rx Port : 5/1/2
===============================================================================
In order to configure the system loopback address for PTP, enter the following on PE-1:
*A:PE-1#
configure
system security
source-address application ptp "system"
exit
exit
*A:PE-1# show system ptp peer 192.0.2.182
===============================================================================
IEEE 1588/PTP Peer Information
===============================================================================
Router : Base
IP Address : 192.0.2.182 Announce Direction : tx
Admin State : n/a G.8265.1 Priority : n/a
Sync Interval : n/a
Local PTP Port : 3 PTP Port State : master
Clock Id : 00233efffe808250 Remote PTP Port : 4
Tx Timestamp Point: port Rx Timestamp Point : port
Last Tx Port : 5/1/2 Last Rx Port : 5/1/2
===============================================================================
*A:PE-2#
configure
system security
source-address application ptp "system"
exit
exit
*A:PE-2# show system ptp peer 192.0.2.183
===============================================================================
IEEE 1588/PTP Peer Information
===============================================================================
Router : Base
IP Address : 192.0.2.183 Announce Direction : rx
Admin State : up G.8265.1 Priority : n/a
Sync Interval : 16 pkt/s
Local PTP Port : 4 PTP Port State : slave
Clock Id : 00233efffe69f250 Remote PTP Port : 3
GM Clock Id : 8887868584838281 GM Clock Class : 6
GM Clock Accuracy : within 100 ns GM Clock Variance : 0x6400 (3.7E-09)
GM Clock Priority1: 128 GM Clock Priority2 : 128
Steps Removed : 1 Parent Clock : yes
Tx Timestamp Point: port Rx Timestamp Point : port
Last Tx Port : 1/1/2 Last Rx Port : 1/1/2
===============================================================================
*A:PE-2#
configure service vprn 10
interface "ptp_loopback"
address 172.16.1.1/32
loopback
exit
source-address
application ptp "ptp_loopback"
exit
exit
*A:PE-1#
configure system time ntp
server ptp prefer
exit
*A:PE-1# show system ntp all
===============================================================================
NTP Status
===============================================================================
Configured : Yes Stratum : 1
Admin Status : up Oper Status : up
Server Enabled : No Server Authenticate : No
Clock Source : ptp
Auth Check : Yes
Current Date & Time: 2014/05/30 17:53:11 UTC
===============================================================================
===============================================================================
NTP Active Associations
===============================================================================
State Reference ID St Type A Poll Reach Offset(ms)
Remote
-------------------------------------------------------------------------------
chosen PTP 0 srvr - 64 ......YY 0.000
ptp
===============================================================================
===============================================================================
NTP Clients
===============================================================================
vRouter Time Last Request Rx
Address
-------------------------------------------------------------------------------
===============================================================================