< Home

ntp-service refclock-master

Function

The ntp-service refclock-master command sets the external reference clock or the local clock to be the NTP master clock that provides the synchronizing time for other devices.

The undo ntp-service refclock-master command cancels the NTP master clock.

By default, no NTP master clock is specified.

Format

ntp-service refclock-master [ ip-address ] [ stratum ]

undo ntp-service refclock-master [ ip-address ] [ stratum ]

Parameters

Parameter Description Value
ip-address Specifies the IP address of the local clock 127.127.t.u. t ranges from 0 to 37. and at present, it is 1, indicating the local reference clock; u ranges from 0 to 37, indicating the NTP process number. If no ip-address is specified, by default, the local clock 127.127.1.0 is as the NTP master clock.
stratum Specifies the stratum of the NTP master clock. The value is in the range of 1 to 15. By default, it is 8. The smaller the value is, the more accurate the timer is.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

NTP uses stratum to describe the number of counts from a device to a clock source.

The primary time server (the stratum is 1) directly synchronize time with the primary reference clock source. The primary reference clock source can be a Radio clock or a satellite location system. A secondary time server (the stratum is 2) synchronizes time with the primary time server on the network or other secondary time servers, and transmits the time information to other hosts on the network through NTP.

Under normal circumstances, primary and secondary servers in the synchronization subnet assume a hierarchical-master-slave structure, with the primary server at the root and the secondary server at successive stratums toward the leaf node. The higher the stratum level is, the less accurate the clock will be.

The ntp-service refclock-master command is used to set the clock of a device as the NTP master clock. The other devices synchronize time with this device. If the device is configured with other clock servers as clock sources, the following situations occur:
  • If the stratum of the local clock is greater than the stratum of the clock source provided by the clock server, the device is subject to the clock source.
  • If the stratum of the local clock is smaller than or equal to the stratum of the clock source provided by the clock server, the device is subject to the local clock.

Example

# Set the local clock to be the NTP master clock, the stratum of which set to 3.

<sysname> system-view
[sysname] ntp-service refclock-master 3
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >