Supported Platforms
Related Documentation
Example: Configuring a 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 slave relationship to the master boundary clock. The unicast negotiation applies to clock sources, which are configured on the slave or clock client. Clock clients, configured on the master, are not affected by unicast negotiation.
Note that 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:
- An ACX Series router
- Junos OS Release 12.3 or later
Overview
A PTP slave clock or clock client can join a master clock with and without unicast negotiation. With unicast negotiation, the announce, synchronization, and delay response packet rates are negotiated between the master and the slave or client before a PTP session is established. Without unicast negotiation and after it is configured, the slave or client immediately receives announce and synchronization packets.
A clock client is the remote PTP host, which receives time from the PTP master. 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 master 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 master 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 master 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 master clock interface—109.109.109.53—as the secure client.
- Manual client—A manual client does not use unicast negotiation to join the master clock. The manual statement overrides the unicast-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 client clock-client 7.7.7.7 local-ip-address 7.7.7.53 manual is the manual client and is configured on a second master clock interface.
Configuration
A boundary clock must include the configuration of at least one master and at least one slave. The boundary master receives time from a remote master through the slave, and in turn passes that time on to clock clients, which are in a slave relationship to the boundary master. In this example, you configure a boundary slave, two Precision Time Protocol (PTP) boundary masters with three different kinds of clock clients—automatic, manual, and secure. Two of the clock clients are configured on the same boundary master.
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:
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 slave interface from which the boundary
master 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 master 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 master parameters by specifying the
IP address of the PTP master 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 master interface in this example.[edit protocols ptp]user@host# edit master interface ge-0/1/3.0
- On the first master 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 master 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 master interface, configure the PTP master
parameters by specifying the exact IP address of the remote PTP host
and the IP address of the local PTP master 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 master interface, configure a second PTP
master by specifying the IP address and subnet of the second remote
PTP host and the IP address of the local PTP master 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 master interface with the following
parameters: the encapsulation type, the downstream PTP host, the IP
address of the local PTP master 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 ipv4user@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.