PTP Clocks
SUMMARY The IEEE 1588v2 standard defines Precision Time Protocol (PTP), which is used to synchronize with accuracy the real-time clocks of the devices in a network. The clocks are organized in a hierarchical primary/client architecture for the distribution of time-of-day.
Configure PTP Clocking
In a distributed network, you can configure Precision Time Protocol (PTP) primary and client clocks to help synchronize the timing across the network. The synchronization is achieved through packets that are transmitted and received in a session between the primary clock and the client clock or clock client.
To configure Precision Time Protocol (PTP) options:
PTP Boundary Clock Overview
An IEEE 1588v2 boundary clock has multiple network connections and can act as a source (primary) and a destination (client) for synchronization messages. It synchronizes itself to a best primary clock through a client port and supports synchronization of remote clock clients to it on primary ports.
PTP Boundary Clock
Boundary clocks can improve the accuracy of clock synchronization by reducing the number of 1588v2-unaware hops between the primary and the client. Boundary clocks can also be deployed to deliver better scale because they reduce the number of sessions and the number of packets per second on the primary.
The boundary clock intercepts and processes all PTP messages and passes all other
traffic. The best primary clock algorithm (BMCA) is used by the boundary clock
to select the best configured acceptable primary clock that a boundary client
port can see. To configure a boundary clock, include the
boundary
statement at the [edit protocols ptp
clock-mode
] hierarchy level and at least one primary with the
master
statement and at least one client with the
slave
statement at the [edit protocols
ptp
] hierarchy
level.
ACX5448 router supports PTP boundary clocks for phase and time synchronization using IEEE-1588 Precision Timing Protocol (PTP). The ACX5448 router supports the following features:
-
PTP over IPv4 (IEEE-1588v2)
-
PTP ordinary and boundary clocks
-
One step clock mode operation for PTP Primary
-
10Mhz and 1PPS output for measurement purpose
All PTP packets uses the best-effort queue instead of network control queue.
If clksyncd-service
restart is initiated, then the show
ptp lock status detail
CLI command output of Clock
reference state and 1pps reference state
fields shows incorrect information. The following is a sample of output for
show ptp lock status detail
:
user@host> show ptp lock-status detail Lock Status: Lock State : 5 (PHASE ALIGNED) Phase offset : 0.000000010 sec State since : 2018-11-22 00:38:56 PST (00:10:18 ago) Selected Master Details: Upstream Master address : 12.0.0.1 Slave interface : xe-0/0/20.0 Clock reference state : Clock locked 1pps reference state : Clock qualified
Figure 1 illustrates two boundary clocks in a network in which the clock flow is from the upstream node (BC-1) to the downstream node (BC-2). This figure also applies to MX Series routers and QFX Series switches.

The first boundary clock—BC-1—has four ports. Each port is configured as follows:
-
BC-1 P-1 and BC-1 P-4 are boundary client ports connected to two reference clocks—OC-1 and OC-5. The reference clocks are included as the clock sources in the client port configurations. From the packets received on the client ports, BC-1 selects the best primary, synchronizes its clock, and generates PTP packets, which are sent over the primary ports—BC-1 P-2 and BC-1 P-3—to the downstream clients.
-
BC-1 P-2, a primary port, is connected to OC-2, an ordinary remote client. OC-2 is included as a clock client in BC-1 P-2’s primary configuration, and so receives PTP packets from BC-1 P-2.
-
BC-1 P-3, a primary port, is connected to BC-2 P-1, a remote boundary client port. In this situation, the primary port—BC-1 P-3—is included as a clock source in the configuration of the boundary client port—BC-2 P-1. In addition, the boundary client port—BC-2 P-1—is included as a clock client in the configuration of the primary port—BC-1 P-3. With this configuration, the boundary client—BC-2 P1—receives PTP packets from BC-1 P3.
The second boundary clock—BC-2—has three ports. Each port is configured as follows:
-
BC-2 P-1 is a boundary client port connected to the upstream primary port—BC-1 P3. As described previously, BC-2 P-1 receives PTP packets from BC-1 P3. The primary ports—BC-2 P-2 and BC-2 P-3—synchronize their time from the packets received from BC-2 P1.
-
BC-2 P-2 and BC-2 P-3, boundary primary ports, are connected to ordinary remote slaves—OC-3 and OC-4. OC-3 and OC-4 are included as clock clients in the configuration of the primary ports—BC-2 P2 and BC-2 P-3. Both slaves receive PTP packets from the primary boundary port to which they are connected.
In this example, the boundary clock synchronizes its clock from the packets received on its client ports from the upstream primary. The boundary clock then generates PTP packets, which are sent over the primary port to downstream clients. These packets are timestamped by the boundary clock by using its own time, which is synchronized to the selected upstream primary.
Clock Clients
A clock client is the remote PTP host, which receives time from the PTP primary and is in a client relationship to the primary.
The term client is sometimes used to refer to the clock client.
An device acting as a primary boundary clock supports the following types of downstream clients:
-
Automatic client—An automatic client is configured with an IP address, which includes the subnet mask, indicating that any remote PTP host belonging to that subnet can join the primary clock through a unicast negotiation. To configure an automatic client, include the subnet mask in the
clock-client ip-address
statement at the [edit protocols ptp master interface interface-name unicast-mode
] hierarchy level. -
Manual client—A manual client is configured with the
manual
statement at the [edit protocols ptp master interface interface-name unicast-mode clock-client ip-address local-ip-address local-ip-address
] hierarchy level. A manual client does not use unicast negotiation to join the primary clock. Themanual
statement overrides theunicast negotiation
statement configured at the [edit protocols ptp
] hierarchy level. As soon as you configure a manual client, it starts receiving announce and synchronization packets. -
Secure client—A secure client is configured with an exact IP address of the remote PTP host, after which it joins a primary clock through unicast negotiation. To configure a secure client, include the exact IP address in the
clock-client ip-address
statement at the [edit protocols ptp master interface interface-name unicast-mode
] hierarchy level.
You can configure the maximum number of clients (512 ) in the following combination:
-
Automatic clients 256.
-
Manual and secure clients 256—Any combination of manual and secure clients is allowed as long as the combined total amounts to 256.
PTP Boundary Clock Over IRB for Broadcast Profiles
The IEEE 1588 PTP boundary clock (BC) applications for broadcast media often requires many PTP streams to use a common local IP address. These packets are forwarded through L2 switching. In these use cases, there are no physical interface IFLs created for each PTP physical interface, as would be usually expected for PTP configurations on physical interfaces. Configuration over integrated routing and bridging (IRB) interfaces allows you to meet this requirement. Currently, there is an existing feature that supports multicast-mode with physical interfaces. PTP over IRB for broadcast profiles will extend this support for physical interfaces on IRB interfaces. PTP BC over IRB for broadcast profiles will support SMPTE/AES67/AES67-SMPTE profiles (multicast PTP over IP). This new interface type is added to the multicast profiles. The PTP multicast-mode supports IRB interfaces using the IPv4 transport type that is used with physical interfaces.
PTP BC features developed for QFX5110 and QFX5200 are still available. Support is extended to IRB interfaces for PTP BC over multicast for broadcast profiles.
CLI Configuration
A new CLI configuration is added to this feature for multicast mode to identify the L2 interface that needs to be transported. This new interface type is supported in the example configuration statements below.
IPv4 Configuration Example
set protocols ptp clock-mode boundary set protocols ptp profile-type smpte set protocols ptp slave interface irb.100 multicast-mode transport ipv4 set protocols ptp slave interface irb.100 multicast-mode local-ip-address 170.1.0.5 l2-ifl xe-0/0/2:0.0 set protocols ptp master interface irb.200 multicast-mode transport ipv4 set protocols ptp master interface irb.200 multicast-mode local-ip-address 180.3.5.2 l2-ifl xe-0/0/8:2.0
Multiple IRB IPv4 Configuration Example
set interfaces xe-0/0/2:0 unit 0 family ethernet-switching vlan members V100 set interfaces xe-0/0/8:2 unit 0 family ethernet-switching vlan members V200 set interfaces et-0/0/20 unit 0 family ethernet-switching vlan members V100 set interfaces et-0/0/28 unit 0 family ethernet-switching vlan members V200 set interfaces irb unit 100 family inet address 170.1.0.5/24 set interfaces irb unit 200 family inet address 180.3.5.2/24 set protocols ptp clock-mode boundary set protocols ptp profile-type smpte set protocols ptp slave interface irb.100 multicast-mode transport ipv4 set protocols ptp slave interface irb.100 multicast-mode local-ip-address 170.1.0.5 l2-ifl xe-0/0/2:0.0 set protocols ptp slave interface irb.100 multicast-mode local-ip-address 170.1.0.5 l2-ifl et-0/0/20.0 set protocols ptp master interface irb.200 multicast-mode transport ipv4 set protocols ptp master interface irb.200 multicast-mode local-ip-address 180.3.5.2 l2-ifl xe-0/0/8:0.0 set protocols ptp master interface irb.200 multicast-mode local-ip-address 180.3.5.2 l2-ifl et-0/0/28.0
CLI Commands
There are no new operational commands being added. Areas in the display output that show an interface name will show the appropriate name for the IRB interface and will be expanded to include the L2 IFL name for IRB interfaces.
Available vty
commands that are used to help diagnose the
operation of the clksyncd
and PTP protocol stack will not
change, but will support the new interface types and information.
show ptp lock-status detail
{master:0}
regress@imax> show ptp lock-status detail
Lock Status:
Lock State : 5 (PHASE ALIGNED)
Phase offset : 0.000000180 sec
State since : 2020-08-02 05:29:06 PDT (00:13:06 ago)
Selected Master Details:
Upstream Master address : 224.0.1.129
Slave interface : irb.5 (xe-0/0/29:1.0)
Parent Id : aa:00:00:00:00:00:11:11
GMC Id : aa:00:00:00:00:00:11:11
show ptp primary detail
{master:0}
regress@imax> show ptp master detail
PTP Master Interface Details:
Interface :irb.10
Status : Master, Active
Clock Info :
Local Address: 20.0.0.1 Status: Configured, Master, Active
l2-ifl: xe-0/0/29:0.0
Remote Address: 20.0.0.2 Status: Learned, Slave, Active
Remote Address: 224.0.1.129 Status: Configured, Slave, Active
Total Remote Slaves: 2
show ptp slave detail
{master:0}
regress@imax> show ptp slave detail
PTP Slave Interface Details:
Interface : irb.5
Status : Slave, Active
Clock Info
Local Address : 12.0.0.2 Status: Configured, Slave, Active
l2-ifl: xe-0/0/29:1.0
Remote Master: 224.0.1.129 Status: Configured, Master, Active
Total Remote Masters: 1
show ptp statistics
{master:0}
regress@imax> show ptp statistics
Local Clock Remote Clock Role Stream Received Transmitted
irb.5 224.0.1.129 Slave 0 18255 7449
xe-0/0/29:1.0
irb.10 20.0.0.2 Master 5 7554 7554
xe-0/0/29:0.0
irb.10 224.0.1.129 Master 4 0 11682
xe-0/0/29:0.0
show ptp statistics detail
{master:0}
regress@imax> show ptp statistics detail
Local Clock Remote Clock Role Stream Received Transmitted
irb.5 224.0.1.129 Slave 0 18255 7449
xe-0/0/29:1.0
Signalling Announce Sync Delay Error
Rx: 0 3725 7428 7102 27
Tx: 0 0 0 7449 0
Local Clock Remote Clock Role Stream Received Transmitted
irb.10 20.0.0.2 Master 5 7554 7554
xe-0/0/29:0.0
Signalling Announce Sync Delay Error
Rx: 0 0 0 7554 0
Tx: 0 0 0 7554 0
Local Clock Remote Clock Role Stream Received Transmitted
irb.10 224.0.1.129 Master 4 0 11682
xe-0/0/29:0.0
Signalling Announce Sync Delay Error
Rx: 0 0 0 0 0
Tx: 0 3805 7877 0 0
Configure PTP Primary Boundary Clock
A Precision Time Protocol (PTP) primary boundary clock sends PTP messages to the
clients (ordinary and boundary) so that they can establish their relative time
offset from this primary’s clock or clock reference. You cannot configure an
ordinary primary clock on a device. The primary boundary clock synchronizes time
through a boundary client port. To configure a primary boundary clock, you must
include the boundary
statement at the [edit protocols ptp
clock-mode
] hierarchy level and at least one primary with the
master
statement and at least one client with the
slave
statement at the [edit protocols ptp
]
hierarchy level. ACX5048 and ACX5096 routers do not support ordinary and boundary
clock.
To configure a PTP primary boundary clock, complete the following tasks:
Configure PTP Primary Boundary Clock Parameters
To configure the parameters of a PTP primary boundary clock:
After you have configured the PTP primary boundary clock parameters, enter the commit command from configuration mode. To complete the configuration of the primary boundary clock, complete Configure a PTP Primary Boundary Clock Interface.
Configure a PTP Primary Boundary Clock Interface
After you have configured the primary boundary clock parameters, complete the configuration of the primary boundary clock by configuring an interface to act in the role of the primary clock.
To configure a PTP primary boundary clock interface:
After you have configured the PTP primary clock interface, enter the
commit
command from configuration mode.
Example: Configure PTP Boundary Clock
This example shows how to configure a Precision Timing Protocol (PTP) boundary clock. A boundary clock must include the configuration of at least one primary and at least one client. The boundary primary receives time from a remote primary through the client, and in turn passes that time on to clock clients, which are in a client relationship to the boundary primary. In this example, you configure a primary, client, clock source, and clock client.
ACX5048 and ACX5096 routers do not support boundary clock.
Requirements
This example uses the following hardware and software components:
This example also applies to QFX Series switches. QFX Series switches do not support Gigabit Ethernet interfaces. Instead, configure PTP boundary clock parameters on 10-Gigabit Ethernet interfaces.
-
An ACX Series router
-
Junos OS Release 12.3 or later
Overview
In this example, the client clock or clock client immediately receives announce and synchronization packets after completion of the configuration.
Configuration
Procedure
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste
them in a text file, remove any line breaks, change any details
necessary to match your network configuration, and then copy and paste
the commands into the CLI at the [edit
] hierarchy
level:
set protocols ptp clock-mode boundary set protocols ptp slave interface ge-1/3/9.0 unicast-mode transport ipv4 set protocols ptp slave interface ge-1/3/9.0 unicast-mode clock-source 192.1.1.2 local-ip-address 192.1.1.1 set protocols ptp master interface ge-1/0/0.0 unicast-mode transport ipv4 set protocols ptp master interface ge-1/0/0.0 unicast-mode clock-client 20.20.20.2/32 local-ip-address 20.20.20.1
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy.
To configure a boundary clock without unicast negotiation:
-
Configure the clock mode.
[edit protocols ptp] user@host# set clock-mode boundary
-
Configure the client interface.
[edit protocols ptp] user@host# edit slave interface ge-1/3/9.0
-
Configure the upstream unicast PTP primary clock source parameters.
[edit protocols ptp slave interface ge-1/3/9.0] user@host# edit unicast-mode
-
Configure the encapsulation type for PTP packet transport.
[edit protocols ptp slave interface ge-1/3/9.0 unicast-mode ] user@host# set transport ipv4
-
Configure the IP address of the primary interface.
[edit protocols ptp] user@host# edit master interface ge-1/0/0.0
-
Specify the IP address and subnet of the remote PTP host, and the IP address of the local PTP primary interface.
[edit protocols ptp master interface ge-1/0/0.0 ] user@host# edit unicast-mode user@host# set protocols ptp master interface ge-1/0/0.0 unicast-mode clock-client 20.20.20.2/32 local-ip-address 20.20.20.1
Note:For the configuration to work, the primary interface you specify must be configured with this IP address at the [
edit interfaces interface-name
] hierarchy level. -
Configure the encapsulation type for PTP packet transport.
[edit protocols ptp master interface ge-1/0/0.0 unicast-mode] user@host# set transport ipv4
Results
From configuration mode, confirm your configuration by entering the
show
command. If the output does not display the
intended configuration, repeat the configuration instructions in this
example to correct it.
[edit protocols ptp] user@host# show clock-mode boundary; slave { interface ge-1/3/9.0 { unicast-mode { transport ipv4; clock-source 192.1.1.2 local-ip-address 192.1.1.1; } } } master { interface ge-1/0/0.0 { unicast-mode { transport ipv4; clock-client 20.20.20.2/32 local-ip-address 20.20.20.1; } } }
After you have configured the device, enter the commit command from configuration mode.
Example: Configure PTP Boundary Clock With Unicast Negotiation
This example shows how to configure a boundary clock with unicast negotiation turned on and a mixture of manual, secure and automatic clock clients, which have a client relationship to the primary boundary clock. The unicast negotiation applies to clock sources, which are configured on the client or clock client. Clock clients, configured on the primary, are not affected by unicast negotiation.
ACX5048 and ACX5096 routers do not support boundary clock.
In this example, unicast-negotiation is applicable only to clock-sources. For clock
clients, the statement unicast-negotiation
at the [edit
protocols ptp
] hierarchy level is not effective.
Requirements
This example uses the following hardware and software components:
This example also applies to QFX Series switches. QFX Series switches do not support Gigabit Ethernet interfaces. Instead, configure PTP boundary clock parameters on 10-Gigabit Ethernet interfaces.
-
An ACX Series router
-
Junos OS Release 12.3 or later
Overview
A PTP client clock or clock client can join a primary clock with and without unicast negotiation. With unicast negotiation, the announce, synchronization, and delay response packet rates are negotiated between the primary and the client before a PTP session is established. Without unicast negotiation and after it is configured, the client or client immediately receives announce and synchronization packets.
A clock client is the remote PTP host, which receives time from the PTP primary. The following clock clients are configured in this example:
-
Secure client—A secure client is configured with an exact IP address, after which, it joins a primary clock through unicast negotiation. In this example, the clock client
clock-client 117.117.117.117/32 local-ip-address 109.109.109.53
is a secure client, which means that only this specific host from the subnet can join the primary clock through a unicast negotiation . -
Automatic client—An automatic client is configured with an IP address, which includes a subnet mask, indicating that any PTP host belonging to that subnet, can join the primary clock through a unicast negotiation. In this example, the clock client
clock-client 109.109.109.0/24 local-ip-address 109.109.109.53
is an automatic client. Additionally, this automatic client is configured on the same primary clock interface—109.109.109.53
—as the secure client. -
Manual client—A manual client does not use unicast negotiation to join the primary clock. The
manual
statement overrides theunicast-negotiation
statement configured at the [edit protocols ptp
] hierarchy level. As soon as you configure a manual client, it starts receiving announce and synchronization packets. In this example, the clock clientclock-client 7.7.7.7 local-ip-address 7.7.7.53 manual
is the manual client and is configured on a second primary clock interface.
Configuration
A boundary clock must include the configuration of at least one primary and at least one client. The boundary primary receives time from a remote primary through the client, and in turn passes that time on to clock clients, which are in a client relationship to the boundary primary. In this example, you configure a boundary client, two Precision Time Protocol (PTP) boundary primaries with three different kinds of clock clients—automatic, manual, and secure. Two of the clock clients are configured on the same boundary primary.
Procedure
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste
them in a text file, remove any line breaks, change any details
necessary to match your network configuration, and then copy and paste
the commands into the CLI at the [edit
] hierarchy
level:
set protocols ptp clock-mode boundary set protocols ptp unicast-negotiation set protocols ptp slave interface ge-0/1/0.0 unicast-mode transport ipv4 set protocols ptp slave interface ge-0/1/0.0 unicast-mode clock-source 10.10.10.50 local-ip-address 10.10.10.53 set protocols ptp master interface ge-0/1/3.0 unicast-mode transport ipv4 set protocols ptp master interface ge-0/1/3.0 unicast-mode clock-client 117.117.117.117/32 local-ip-address 109.109.109.53 set protocols ptp master interface ge-0/1/3.0 unicast-mode clock-client 109.109.109.0/24 local-ip-address 109.109.109.53 set protocols ptp master interface ge-0/1/5.0 unicast-mode transport ipv4 set protocols ptp master interface ge-0/1/5.0 unicast-mode clock-client 7.7.7.7/32 local-ip-address 7.7.7.53 manual
Step-by-Step Procedure
The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.
To configure a boundary clock with unicast negotiation:
-
Configure the clock mode.
[edit protocols ptp] user@host# set clock-mode boundary
-
Enable unicast negotiation.
[edit protocols ptp] user@host# set unicast-negotiation
-
Configure the local client interface from which the boundary primary receives time and passes it on to the configured clock clients.
[edit protocols ptp] user@host# edit slave interface ge-0/1/0.0
-
Configure the upstream unicast PTP primary clock source parameters.
[edit protocols ptp slave interface ge-0/1/0.0] user@host# edit unicast-mode
-
Configure the encapsulation type for PTP packet transport.
[edit protocols ptp slave interface ge-0/1/0.0 unicast-mode ] user@host# set transport ipv4
-
Configure the PTP primary parameters by specifying the IP address of the PTP primary clock and the IP address of the local interface.
[edit protocols ptp slave interface ge-0/1/0.0 unicast-mode ] user@host# set clock-source 10.10.10.50 local-ip-address 10.10.10.53
-
Configure the first primary interface in this example.
[edit protocols ptp] user@host# edit master interface ge-0/1/3.0
-
On the first primary interface, configure the downstream PTP clock clients.
[edit protocols ptp master interface ge-0/1/3.0 ] user@host# edit unicast-mode
-
On the first primary interface, configure the encapsulation type for PTP packet transport.
[edit protocols ptp master interface ge-0/1/3.0 unicast-mode] user@host# set transport ipv4
-
On the first primary interface, configure the PTP primary parameters by specifying the exact IP address of the remote PTP host and the IP address of the local PTP primary interface.
[edit protocols ptp master interface ge-0/1/3.0 unicast-mode] user@host# set clock-client 117.117.117.117 local-ip-address 109.109.109.53
-
On the first primary interface, configure a second PTP primary by specifying the IP address and subnet of the second remote PTP host and the IP address of the local PTP primary interface.
[edit protocols ptp master interface ge-0/1/3.0 unicast-mode] user@host# set clock-client 109.109.109.0/24 local-ip-address 109.109.109.53
-
Configure the second primary interface with the following parameters: the encapsulation type, the downstream PTP host, the IP address of the local PTP primary interface, and the
manual
statement so that this client does not use unicast negotiation.[edit protocols ptp master] user@host# set interface ge-0/1/5.0 unicast-mode transport ipv4 user@host# set interface ge-0/1/5.0 unicast-mode clock-client 7.7.7.7 local-ip-address 7.7.7.53 manual
Results
From configuration mode, confirm your configuration by entering the
show
command. If the output does not display the
intended configuration, repeat the configuration instructions in this
example to correct it.
[edit protocols ptp] user@host# show clock-mode boundary; unicast-negotiation; slave { interface ge-0/1/0.0 { unicast-mode { transport ipv4; clock-source 10.10.10.50 local-ip-address 10.10.10.53; } } } master { interface ge-0/1/3.0 { unicast-mode { transport ipv4; clock-client 117.117.117.117/32 local-ip-address 109.109.109.53; clock-client 109.109.109.0/24 local-ip-address 109.109.109.53; } } interface ge-0/1/5.0 { unicast-mode { transport ipv4; clock-client 7.7.7.7/32 local-ip-address 7.7.7.53 { manual; } } } }
After you have configured the device, enter the commit
command from configuration mode.
Configure PTP Member Clock
The client port that you configure can be a Precision Time Protocol (PTP) boundary or
ordinary clock, depending on the configuration of the clock-mode
statement at the [edit protocols ptp
] hierarchy level. An ordinary
or boundary client clock performs frequency and phase recovery based on received and
requested timestamps from a primary clock—a reference or a boundary clock
primary.
In ACX Series routers, the reference clock functionality is supported only on ACX500 router.
To configure a PTP member clock, complete the following tasks:
Configure the PTP Member Clock Parameters
To configure a PTP member clock parameters:
The clock-class-to-quality-level-mapping quality-level
,
convert-clock-class-to-quality-level
, and
grant-duration
statements are not supported on the
QFX10002 switch.
After you have configured the PTP client clock parameters, enter the commit command from configuration mode. To complete the configuration of the client clock, complete Configure the PTP Member Clock Interface.
Configure the PTP Member Clock Interface
The member clock interface responds to the upstream PTP primary clock.
To configure the PTP member clock interface:
After you have configured the PTP member clock interface, enter the commit command from configuration mode.
Example: Configure Ordinary Member Clock With Unicast-Negotiation
This example shows the base configuration of a Precision Time Protocol (PTP) ordinary client clock with unicast-negotiation on an ACX Series router.
ACX5048 and ACX5096 routers do not support ordinary clock.
Requirements
This example uses the following hardware and software components:
This example also applies to QFX Series switches. QFX Series switches do not support Gigabit Ethernet interfaces. Instead, configure PTP boundary clock parameters on 10-Gigabit Ethernet interfaces.
-
One ACX Series router
-
Junos OS Release 12.2 or later
Overview
In this configuration, the ordinary client clock uses unicast-negotiation and compensates for some network asymmetry.
The values in this example are for illustration purposes only. You can set the values for each parameter according to your requirements.
Configuration
To configure an ordinary client clock with unicast-negotiation, perform these tasks:
CLI Quick Configuration
set ptp clock-mode ordinary set ptp domain 110 set ptp unicast-negotiation set ptp slave delay-request -6 set ptp slave announce-timeout 2 set ptp slave announce-interval 3 set ptp slave sync-interval -5 set ptp slave grant-duration 7200 set ptp slave interface ge-0/1/0.0 unicast-mode transport ipv4 set ptp slave interface ge-0/1/0.0 unicast-mode clock-source 10.10.10.50 local-ip-address 10.10.10.75 asymmetry -4500
Configuring an ordinary client clock with unicast-negotiation
Step-by-Step Procedure
-
Configure the clock mode, domain, and unicast-negotiation:
[edit protocols ptp] user@host# set clock-mode ordinary domain 110 unicast-negotiation
-
Configure the announce timeout and the announce interval:
[edit protocols ptp] user@host# set slave announce-timeout 2 announce-interval 3
-
Configure the synchronization interval and the grant duration:
[edit protocols ptp] user@host# set slave sync-interval -5 grant-duration 7200
-
Configure the client interface:
[edit protocols ptp] user@host# edit slave interface ge-0/1/0.0
-
Configure the unicast transport mode:
[edit protocols ptp slave interface ge-0/1/0.0] user@host# set unicast-mode transport ipv4
-
Configure the clock source:
[edit protocols ptp slave interface ge-0/1/0.0] user@host# edit unicast-mode clock-source 10.10.10.50 local-ip-address 10.10.10.75
-
Configure the asymmetric path:
[edit protocols ptp slave interface ge-0/1/0.0 unicast-mode clock-source 10.10.10.50 local-ip-address 10.10.10.75] user@host# set asymmetry -4500
-
Verify the configuration:
[edit protocols ptp slave interface ge-0/1/0.0 unicast-mode clock-source 10.10.10.50 local-ip-address 10.10.10.75] user@host# top [edit] user@host# edit protocols [edit protocols] user@host# show
See the output for the
show
command in the Results section.
Results
The following output shows the configuration of unicast-negotiation and
compensation for some network asymmetry. The
unicast-negotiation
statement includes the parameters
for the delay request, announce interval, synchronization interval, and
grant duration values. Interface ge-0/1/0.0 is
configured to compensate for an asymmetric path to the PTP master by
subtracting 4.5 microseconds from the client-to-master direction delay
calculations.
[edit protocols] user@host# show ptp { clock-mode ordinary; domain 110; unicast-negotiation; slave { delay-request -6; announce-timeout 2; announce-interval 3; sync-interval -5; grant-duration 7200; interface ge-0/1/0.0 { unicast-mode { transport ipv4; clock-source 10.10.10.50 local-ip-address 10.10.10.75 { asymmetry -4500; } } } } }
Example: Configure Ordinary Member Clock Without Unicast Negotiation
This example shows the base configuration of a Precision Time Protocol (PTP) ordinary client clock without unicast-negotiation on an ACX Series router.
ACX5048 and ACX5096 routers do not support ordinary clock.
Requirements
This example uses the following hardware and software components:
This example also applies to QFX Series switches. QFX Series switches do not support Gigabit Ethernet interfaces. Instead, configure PTP boundary clock parameters on 10-Gigabit Ethernet interfaces.
-
One ACX Series router
-
Junos OS Release 12.2 or later
Overview
In this configuration, unicast-negotiation is not configured, so the PTP client has no control over the rate of the negotiation. The PTP primary (a Brilliant Reference Clock or an MX Series router) must be configured with the parameters of the PTP client, such as announce, synchronization, and delay-response packets to control the rate of the negotiation.
The values in this example are for illustration purposes only. You can set the values for each parameter according to your requirements.
Configuration
To configure an ordinary client clock without unicast-negotiation, perform these tasks:
The ipv4-dscp
statement is not supported on the QFX10002
switch.
CLI Quick Configuration
set protocols ptp clock-mode ordinary set protocols ptp ipv4-dscp 46 set protocols ptp slave interface ge-0/2/0.0 unicast-mode transport ipv4 set protocols ptp slave interface ge-0/2/0.0 unicast-mode clock-source 12.1.1.4 local-ip-address 12.1.1.5
Configuring an ordinary client clock without unicast-negotiation
Step-by-Step Procedure
-
Configure the clock mode:
[edit protocols ptp] user@host# set clock-mode ordinary
-
Configure the Differentiated Services code point (DSCP) value for all PTP IPv4 packets originated by the device:
Note:The
ipv4-dscp 46
statement is not supported on QFX Series switches.[edit protocols ptp] user@host# set ipv4-dscp 46
-
Configure the client interface:
[edit protocols ptp] user@host# edit slave interface ge-0/2/0.0
-
Configure the unicast transport mode:
[edit protocols ptp slave interface ge-0/2/0.0] user@host# set unicast-mode transport ipv4
-
Configure the clock source:
[edit protocols ptp slave interface ge-0/2/0.0] user@host# unicast-mode clock-source 12.1.1.4 local-ip-address 12.1.1.5
-
Verify the configuration:
[edit protocols ptp slave interface ge-0/2/0.0] user@host# top [edit] user@host# edit protocols [edit protocols] user@host# show
See the output for the
show
command in the Results section.
Results
In this example, the PTP client on the local interface ge-0/2/0 is assigned a local IP address of 12.1.1.5. Unicast-negotiation is not configured so the PTP master must be explicitly configured with the details of the PTP client (12.1.1.5).
[edit protocols] user@host# show ptp { clock-mode ordinary; ipv4-dscp 46; slave { interface ge-0/2/0.0 { unicast-mode { transport ipv4; clock-source 12.1.1.4 local-ip-address 12.1.1.5; } } } }
PTP Transparent Clocks
The Precision Time Protocol (PTP) standardized by IEEE 1588 improves the current methods of synchronization used within a distributed network. You can use PTP across packet-based networks including, but not limited to, Ethernet networks. Queuing and buffering delays in the switch can cause variable delay to packets, which affects path delay measurements. Queuing delays vary based on the network load and also depend on the architecture of the switch or the router.
Transparent clocks measure and adjust for packet delay. The transparent clock computes the variable delay as the PTP packets pass through the switch or the router.
The QFX5100, EX4600, ACX5048, ACX5096, ACX6360-OR, and PTX10001-20C devices act as transparent clocks only and operate between the primary and client clocks in a distributed network. Transparent clocks improve synchronization between the primary and client clocks and ensure that the primary and client clocks are not impacted by the effects of packet delay variation. The transparent clock measures the residence time (the time that the packet spends passing through the switch or the router), and adds the residence time into the correction field of the PTP packet. The client clock accounts for the packet delay by using both the timestamp of when it started and the information in the correction field.
ACX5048 , ACX5096, ACX6360-OR, and PTX10001-20C devices support end-to-end transparent clocks. With an end-to-end transparent clock, only the residence time is included in the correction field of the PTP packets. The residence timestamps are sent in one packet as a one-step process. In a two-step process, which is not supported on ACX6360-OR, and PTX10001-20C devices, estimated timestamps are sent in one packet, and additional packets contain updated timestamps.
ACX5048 , ACX5096, ACX6360-OR, and PTX10001-20C devices support only the one-step process, which means that the timestamps are sent in one packet.
You can enable or disable a transparent clock globally for the switch or router. With a global configuration, the same configuration is applied to each interface. If the transparent clock is disabled, PTP packet correction fields are not updated. If the transparent clock is enabled, the PTP packet correction fields are updated.
On QFX5100, EX4600, and EX4400 switches, PTP over Ethernet, IPv4, IPv6, unicast, and multicast for transparent clocks are supported. EX4400 switches also support IRB and LAG. EX4300 and EX4300-MP switches do not support PTP transparent clock on virtual chassis mode.
ACX5048 and ACX5096 routers do not support PTP over IPv6 for transparent clocks.
ACX6360-OR, PTX10001-20C, and PTX10001-36MR devices support PTP over IPv6 for transparent clocks.
ACX5048 and ACX5096 routers do not support the following:
-
Boundary clock
-
Ordinary clock
-
Transparent clock over MPLS switched path
-
Transparent clock with more than two VLAN tags
ACX6360-OR and PTX10001-20C devices do not support the following:
-
Boundary, ordinary, primary, and client clocks
-
Transparent clock over MPLS switched path
-
Transparent clock with more than two VLAN tags
-
PTP over Ethernet
-
PTP over IPv4
-
PTP multicast mode
-
Configuration of unicast and broadcast modes.
Unicast mode is enabled by default.
-
Transparent clock in transponder mode
-
PTP while MACSec is enabled
-
Two-step process
You might notice higher latency when you use copper SFP ports instead of fiber SFP ports. In this case, you must compensate the latency introduced by the copper SFP ports for the accurate CF (correction factor) measurement.
Configure PTP Transparent Clock
ACX Series routers supports transparent clock functionality. A Precision Time Protocol (PTP) Transparent clock measures the residence time of PTP packets as they pass through router. This residence time is added to the Correction Field of the PTP packet.
Starting in Junos OS Release 17.1 onwards, to configure transparent clock,
include the e2e-transparent
CLI command at the [edit
protocols ptp
] hierarchy level. Prior to Junos OS Release 17.1, to
configure transparent clock, include the transparent-clock
CLI
command at the [edit protocols ptp
] hierarchy level.
In a distributed network, you can configure transparent clock for Precision Time
Protocol (PTP) for synchronizing the timing across the network. Junos OS supports
the e2e-transparent
CLI statement at the [edit protocols
ptp]
hierarchy level to configure transparent clock
for Precision Time Protocol (PTP).
The following points need to be considered while configuring a PTP transparent clock in ACX routers:
-
Domain numbers—Transparent clock functionality would compute the residence time for PTP packets belonging to all domains.
-
PTP-over-MPLS—Transparent clock functionality do not support PTP carried over MPLS in ACX routers.
The PTP transparent clock functionality is supported on PTP-over-IP and PTP-over-Ethernet (PTPoE).
ACX routers do not support PTPoE over VLANs when it works in ordinary clock or boundary clock mode.
When the IGMP snooping-enabled routers and switches that are configured with PTP Transparent clock fail to perform the IGMP snooping, use the static IGMP configuration to forward the PTP traffic.
To configure a PTP transparent clock:
-
Configure the clock mode:
[edit protocols ptp] user@host# set clock-mode (boundary | ordinary)
-
Configure the transparent clock:
[edit protocols ptp] user@host# set e2e-transparent