Configuring a PTP Clock Source
Context
A BC can function as the master clock to transmit high-precision clock signals to the PTP system. To use a clock source as the best clock source, configure attributes for the clock source on the BC, including the clock accuracy, clock priority, and clock class. This configuration enables the BMC algorithm to select this clock source as the best clock source. The best clock source is calculated through the BMC algorithm. Before using the external BITS signal as the best clock source, configure the BITS signal to participate in BMC calculation.
If a certain offset is generated during clock signal transmission between the BITS clock and grandmaster clock, configure correction for transmission delay based on the transmission line length to make the grandmaster clock consistent with the BITS clock.
Procedure
- Run:
system-view
The system view is displayed.
- Run:
ptp clock-source { bits0 | bits1 } { off | on }
BITS signals are configured to or not to participate in BMC calculation.
By default, BITS signals do not participate in BMC calculation.
- Configure clock source attributes on each device. Generally,
configure clock source attributes on the grandmaster clock. After
the grandmaster clock selects the best clock source, it sends the
attributes of the best clock source to downstream devices through
Announce messages.
- Run:
ptp clock-source { local | bits0 | bits1 } time-source time-source
The type of the clock source to be traced is configured.
NOTE:
The time-source parameter can only be configured on the grandmaster clock. It must be set according to the clock source connected to the device. For details about the time-source parameter and corresponding clock source, see Command Reference. - Run:
ptp clock-source { local | bits0 | bits1 } clock-accuracy clock-accuracy
The clock accuracy of the clock source is configured.
- Run:
ptp clock-source { local | bits0 | bits1 } clock-class clock-class
The class of the clock source is configured.
NOTE:
A smaller clock-class value indicates a higher class. When the clock class value 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. - Run:
ptp clock-source { local | bits0 | bits1 } priority1 priority1
The priority1 value is set for the clock source.
- Run:
ptp clock-source { local | bits0 | bits1 } priority2 priority2
The priority2 value is set for the clock source.
- Run:
- (Optional) Run:
ptp { bits-1pps | bits-dcls } { receive-delay receive-delay | send-delay send-delay }
Correction for the delay in sending or receiving clock source signals is set.
By default, no correction is added to the delay in sending or receiving BITS clock signals.