Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation

Timing and Synchronization Guide

keyboard_arrow_up
close
keyboard_arrow_left
Timing and Synchronization Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Configuring Precision Time Protocol

You can configure the primary clock and the client clock for Precision Time Protocol (PTP) to help synchronize clocks in a distributed system. This time synchronization is achieved through packets that are transmitted and received in a session between the primary clock and the client clock.

Configuring PTP Options

To configure PTP options:

  1. In configuration mode, go to the [edit protocols ptp] hierarchy level:
    content_copy zoom_out_map
    [edit]
    user@host# edit protocols ptp
    
  2. Configure the clock mode as either boundary or ordinary. This attribute is mandatory and has no default value.

    The boundary option signifies that the clock can be both a primary clock and a client clock. The ordinary option signifies that the clock is either a primary clock or a client clock.

    content_copy zoom_out_map
    [edit protocols ptp]
    user@host# set clock-mode (boundary | ordinary)
    
  3. Configure the PTP domain option with values from 0 through 127. The default value is 0.
    content_copy zoom_out_map
    [edit protocols ptp]
    user@host# set domain domain-value
    
  4. Configure the priority1 option with values from 0 through 254. The default value is 128.

    The priority1 value determines the best primary clock. The priority1-value is also advertised in the primary clock’s announce message to other slaves.

    content_copy zoom_out_map
    [edit protocols ptp]
    user@host# set priority1 priority1-value
    
  5. Configure the priority2 option with values from 0 through 255. The default value is 128.

    The priority2 value differentiates and prioritizes the primary clock to avoid confusion when priority1-value is the same for different primary clocks in a network.

    content_copy zoom_out_map
    [edit protocols ptp]
    user@host# set priority2 priority2-value
    
  6. Configure the unicast-negotiation option to enable unicast negotiation.

    Unicast negotiation is a method by which the announce, sync, and delay response packet rates are negotiated between the primary clock and the client clock before a PTP session is established.

    content_copy zoom_out_map
    [edit protocols ptp]
    user@host# set unicast-negotiation
    
    Note:

    Unicast negotiation, when enabled, does not allow you to commit any packet rate–related configuration.

Configuring Member Clock Options

Configure the following options after the aforementioned PTP options have been set.

  1. Configure the client clock.
    content_copy zoom_out_map
    [edit protocols ptp]
    user@host# edit slave
    
  2. Configure the announce-timeout option in the client node with values from 2 through 10. The default value is 3.

    The announce timeout value signifies the number of times an announce interval message has to pass through the client without receiving the announce message—that is, the timeout period for announce messages.

    content_copy zoom_out_map
    [edit protocols ptp slave]
    user@host# set announce-timeout announce-timeout-value
    
  3. Configure the delay-request option in the client node with values from –6 through 6. The default value is –4.

    The delay request value is the logarithmic mean interval in seconds between the delay request messages sent by the client to the primary.

    content_copy zoom_out_map
    [edit protocols ptp slave]
    user@host# set delay-request delay-request-value
    
  4. Configure the frequency-only option to enable only frequency synchronization in the client.
    content_copy zoom_out_map
    [edit protocols ptp slave]
    user@host# set frequency-only
    
    Note:

    This option is configured only when PTP is used for frequency synchronization and not for phase synchronization. Also, note that this option can only be set for an ordinary clock acting as client.

  5. Configure the interface for the client.
    content_copy zoom_out_map
    [edit protocols ptp slave]
    user@host# edit interface interface-name
    
  6. Configure the unicast-mode option for the client. You can set this option when PTP unicast mode of messaging is needed.
    content_copy zoom_out_map
    [edit protocols ptp slave interface interface-name]
    user@host# edit unicast-mode
    
  7. Configure the transport option in unicast mode as IPv4.

    The encapsulation type for PTP packet transport is IPv4.

    content_copy zoom_out_map
    [edit protocols ptp slave interface interface-name unicast-mode]
    user@host# set transport ipv4
    
  8. Configure the IP address of the client.
    content_copy zoom_out_map
    [edit protocols ptp slave interface interface-name unicast-mode]
    user@host# edit clock-source ip-address
    
  9. Configure the IP address of the interface acting as the local PTP client port.
    content_copy zoom_out_map
    [edit protocols ptp slave interface interface-name unicast-mode clock-source ip-address]
    user@host# set local-ip-address local-ip-address
    
    Note:

    You must configure this IP address at the [edit interfaces interface-name] hierarchy level.

  10. You can configure PTP over IPv4 over a link aggregation group for MPC2E NG, MPC3E NG, MPC5E, MPC6E, MPC7E-10G, MPC7E-MRATE, MPC8E, and MPC9E.

    For each aggregated Ethernet link configured as PTP client, you can specify one member link of the aggregated Ethernet bundle as primary and another as secondary.

    content_copy zoom_out_map
    [edit protocols ptp slave interface interface-name ]
    user@host# set primary interface-name
    user@host# set secondary interface-name
    
  11. Starting in Junos OS Release 15.2R1, you can configure multicast mode option for the client port. In this mode, PTP over Ethernet uses multicast addresses and a client port can automatically start receiving the multicast announce messages transmitted by the primary ports on a network. The client port can start communicating with the primary port with minimal or no configuration.
    content_copy zoom_out_map
    [edit protocols ptp slave interface interface-name ]
    user@host# set multicast-mode
    
  12. Configure Ethernet as the encapsulation type of transport for the PTP packets. You can further enable 802.3 Ethernet encapsulation to use a specific set of multicast MAC addresses while transmitting the PTP packets over Ethernet.
    content_copy zoom_out_map
    [edit protocols ptp slave interface interface-name multicast-mode]
    asymmetry number;
    transport 802.3 link-local;
    
    Note:

    It is mandatory to use the transport statement while configuring the multicast-mode for primary and client interfaces.

  13. You can configure PTP over Ethernet over a link aggregation group for MPC5E, MPC6E, MPC7E-10G, MPC7E-MRATE, MPC8E, MPC9E, and MPC10E line cards.

    For each aggregated Ethernet link configured as PTP client, you can specify one member link of the aggregated Ethernet bundle as primary and another as secondary.

    content_copy zoom_out_map
    [edit protocols ptp slave interface interface-name ]
    user@host# set primary interface-name
    user@host# set secondary interface-name
    

Configuring Primary Clock Options

Configure the following options after the aforementioned PTP options and client clock options have been set.

  1. Configure the primary clock.
    content_copy zoom_out_map
    [edit protocols ptp]
    user@host# edit master
    
  2. Configure the announce interval option for the primary with values from 0 through 4. The default value is 1.

    The announce interval is the logarithmic mean interval between announce messages that is sent by the primary. By default, one announce message is sent in every two seconds.

    content_copy zoom_out_map
    [edit protocols ptp master]
    user@host# set announce-interval announce-interval-value
    
  3. Configure the clock step option as either one-step or two-step for the primary. The default value is one-step.

    The clock step determines whether the timing information is sent along with the sync message only (one-step) or a subsequent follow-up message (two-step) is sent corresponding to the previous sync message.

    content_copy zoom_out_map
    [edit protocols ptp master]
    user@host# set clock-step (one-step | two-step)
    
  4. Configure the sync interval option for the primary clock with values from –6 through 6. The default value is –6.

    The sync interval is the logarithmic mean interval between synchronous messages that is sent by the primary. By default, 64 synchronous interval messages are sent per second.

    content_copy zoom_out_map
    [edit protocols ptp master]
    user@host# set sync-interval sync-interval-value
    
  5. Configure the interface for the primary.
    content_copy zoom_out_map
    [edit protocols ptp master]
    user@host# edit interface interface-name
    
  6. Configure the unicast mode option for the primary. You can set this option when PTP unicast mode of messaging is needed.
    content_copy zoom_out_map
    [edit protocols ptp master interface interface-name]
    user@host# edit unicast-mode
    
  7. Configure the transport option in unicast mode as IPv4.

    The encapsulation type for PTP packet transport is IPv4.

    content_copy zoom_out_map
    [edit protocols ptp master interface interface-name unicast-mode]
    user@host# set transport ipv4
    
  8. Configure the IP address for the client.
    content_copy zoom_out_map
    [edit protocols ptp master interface interface-name unicast-mode]
    user@host# edit clock-client ip-address
    
  9. Configure the IP address of the interface acting as the local PTP primary port.
    content_copy zoom_out_map
    [edit protocols ptp master interface interface-name unicast-mode clock-client ip-address]
    user@host# set local-ip-address local-ip-address
    
  10. You can configure PTP over IPv4 over a link aggregation group for MPC2E NG, MPC3E NG, MPC5E, MPC6E, MPC7E-10G, MPC7E-MRATE, MPC8E, and MPC9E.

    For each aggregated Ethernet link configured as PTP primary, you can specify one member link of the aggregated Ethernet bundle as primary and another as secondary.

    content_copy zoom_out_map
    [edit protocols ptp master interface interface-name ]
    user@host# set primary interface-name
    user@host# set secondary interface-name
    
  11. Starting with Junos OS Release 15.2R1, you can configure multicast mode option for the primary port. In this mode, PTP over Ethernet uses multicast addresses and a client port can automatically start receiving the multicast announce messages transmitted by the primary ports on a network. The client port can start communicating with the primary port with minimal or no configuration.
    content_copy zoom_out_map
    [edit protocols ptp master interface interface-name ]
    user@host# set multicast-mode
    
  12. Configure Ethernet as the encapsulation type of transport for the PTP packets. You can further enable 802.3 Ethernet encapsulation to use a specific set of multicast MAC addresses while transmitting the PTP packets over Ethernet.
    content_copy zoom_out_map
    [edit protocols ptp master interface interface-name multicast-mode]
    asymmetry number;
    transport 802.3 link-local;
    
    Note:

    It is mandatory to use the transport statement while configuring the multicast-mode for primary and client interfaces.

  13. You can configure PTP over Ethernet over a link aggregation group for MPC5E, MPC6E, MPC7E-10G, MPC7E-MRATE, MPC8E, MPC9E, and MPC10E line cards.

    For each aggregated Ethernet link configured as PTP primary, you can specify one member link of the aggregated Ethernet bundle as primary and another as secondary.

    content_copy zoom_out_map
    [edit protocols ptp master interface interface-name ]
    user@host# set primary interface-name
    user@host# set secondary interface-name
    

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
15.2R1
Starting in Junos OS Release 15.2R1, you can configure multicast mode option for the client port.
15.2R1
Starting with Junos OS Release 15.2R1, you can configure multicast mode option for the primary port.
footer-navigation