< Home

ptp clock-source

Function

The ptp clock-source command sets the attributes of the clock source and time source.

The undo ptp clock-source command cancels the settings.

For default values of the parameters, see the parameter description.

Format

ptp clock-source local { clock-accuracy clock-accuracy | clock-class clock-class | priority1 priority1 | priority2 priority2 | time-source time-source } slot slot-id

undo ptp clock-source local { clock-accuracy | clock-class | priority1 | priority2 | time-source } slot slot-id

After G.8275.1 is enabled, only the priority2 priority2 and time-source time-source parameters are supported.

Parameters

Parameter

Description

Value

local

Indicates the local clock.

-

clock-accuracy clock-accuracy

Specifies an attribute defining the accuracy of a clock.

The value of clock-accuracy is a hexadecimal number that is in the range of 0 to FF. You can set the value to 20-31 or 80-FD.

The default accuracy of the local clock is 31.

The accuracy values mapping the values of clock-accuracy-value are as follows:

  • 20: The time is accurate to within 25 ns.
  • 21: The time is accurate to within 100 ns.
  • 22: The time is accurate to within 250 ns.
  • 23: The time is accurate to within 1 us.
  • 24: The time is accurate to within 2.5 us.
  • 25: The time is accurate to within 10 us.
  • 26: The time is accurate to within 25 us.
  • 27: The time is accurate to within 100 us.
  • 28: The time is accurate to within 250 us.
  • 29: The time is accurate to within 1 ms.
  • 2A: The time is accurate to within 2.5 ms.
  • 2B: The time is accurate to within 10 ms.
  • 2C: The time is accurate to within 25 ms.
  • 2D: The time is accurate to within 100 ms.
  • 2E: The time is accurate to within 250 ms.
  • 2F: The time is accurate to within 1s.
  • 30: The time is accurate to within 10s.
  • 31: The time is accurate to more than 10s.
  • 80 to FD: reserved for PTP features.

clock-class clock-class

Specifies the attribute of an ordinary or boundary clock denotes the traceability of the time or frequency distributed by the grandmaster clock, that is the capability to trace the International Atomic Time (TAI).

The value of clock-class is an integer that ranges from 0 to 255.

The default value of the local clock is 187.

The capabilities to trace the TAI mapping the values of clock-class-value are as follows:

  • 0, 9, and 10: reserved to enable compatibility with future versions.
  • 1-5, 8, 11-12, 15-51, 53-57, 59-67, 123-127, 128-132, 171-186, 188-192, 194-215, 233-247, 249-250, 252-254: reserved.
  • 68-122, 133-170, 216-232: used by alternate PTP profiles.
  • 6: a clock that is synchronized to a primary reference time source. The timescale distributed is PTP. A clock of class 6 cannot be a slave to another clock in the domain.
  • 7: a clock that has previously been designated as class 6 but that has lost the capability to synchronize to a primary reference time source. The PTP system enters the holdover state and does not perform best clock source selection. The timescale distributed is PTP. A clock of class 7 cannot be a slave to another clock in the domain.
  • 13: a clock that is synchronized to an application specific source of time. The timescale distributed is ARB. A clock of class 13 cannot be a slave to another clock in the domain.
  • 14: a clock that has previously been designated as class 13 but that has lost the capability to synchronize to an application specific source of time. The clock is in holdover mode and within holdover specifications. The timescale distributed is ARB. A clock of class 14 cannot be a slave to another clock in the domain.
  • 52: Degradation alternative A for a clock of class 7 that is not within holdover specification. A clock of class 52 cannot be a slave to another clock in the domain.
  • 58: Degradation alternative A for a clock of class 14 that is not within holdover specification. A clock of class 58 cannot be a slave to another clock in the domain.
  • 187: Degradation alternative B for a clock of class 7 that is not within holdover specification. A clock of class 187 can be a slave to another clock in the domain.
  • 193: Degradation alternative B for a clock of class 14 that is not within holdover specification. A clock of class 193 can be a slave to another clock in the domain.
  • 248: This clock class is used if none of the other clock class definitions apply.
  • 251: Reserved for version 1 compatibility.
  • 255: clock class of a slave-only clock.

priority1 priority1

Specifies a user configurable designation that a clock belongs to an ordered set of clocks from which a master is selected. The attribute priority1 is used in the execution of the best master clock algorithm.

The value of priority1 is an integer that ranges from 0 to 255.

The default value is 128.

Lower values take precedence.

priority2 priority2

Specifies a user configurable designation that provides finer grained ordering among otherwise equivalent clocks. The attribute priority2 is used in the execution of the best master clock algorithm.

The value of priority2 is an integer that ranges from 0 to 255.

The default value is 128.

Lower values take precedence.

time-source time-source

Specifies the source of time used by the grandmaster clock.

The value of time-source is an integer that ranges from 1 to 8.

The default value of the local clock is 8 (INTERNAL_OSCILLATOR).

The attributes mapping the values of time-source-value are as follows:

  • 1: (0x10) ATOMIC_CLOCK
  • 2: (0x20) GPS
  • 3: (0x30) TERRESTRIAL_RADIO
  • 4: (0x40) PTP
  • 5: (0x50) NTP
  • 6: (0x60) HAND_SET
  • 7: (0x90) OTHER
  • 8: (0xa0) INTERNAL_OSCILLATOR

slot slot

Specifies the slot ID.

The value range depends on the device configuration.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

The time-source parameter specifies the clock source attribute used by the grandmaster clock device and the value is set according to the clock source connected to the device.

When the BMC algorithm is used by the PTP device for master clock selection, priority1 > clock-class > clock-accuracy > priority2 of each candidate time source is compared first. If the priority1 of candidate time sources is the same, clock-class is compared, clock-accuracy and priority2. The time source with the highest priority is selected as the master clock.

A smaller clock-class value indicates a higher clock class. When the clock-class of a device is smaller than 128, the device cannot function as a slave clock. Therefore, do not set a high clock-class for a slave clock. Otherwise, the PTP interface of the slave clock cannot enter the slave state, and the device cannot synchronize with the master clock.

Example

# Configure the time source of the local clock to ATOMIC_CLOCK.

<HUAWEI> system-view
[HUAWEI] ptp clock-source local time-source 1 slot 0

# Set priority 1 of the local clock to 1.

<HUAWEI> system-view
[HUAWEI] ptp clock-source local priority1 1 slot 0

# Set priority 2 of the local clock to 1.

<HUAWEI> system-view
[HUAWEI] ptp clock-source local priority2 1 slot 0

# Set the class of the local clock to 10.

<HUAWEI> system-view
[HUAWEI] ptp clock-source local clock-class 10 slot 0

# Set the accuracy of the local clock to 31 (accurate to >10s).

<HUAWEI> system-view
[HUAWEI] ptp clock-source local clock-accuracy 31 slot 0
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >