ON THIS PAGE
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 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.