ntp-service max-distance

Function

The ntp-service max-distance command configures the maximum NTP synchronization distance threshold.

The undo ntp-service max-distance command restores the default value.

By default, the maximum NTP synchronization distance threshold is 1.

Format

ntp-service max-distance max-distance-value

undo ntp-service max-distance

Parameters

Parameter Description Value
max-distance-value

Indicates the maximum NTP synchronization distance threshold.

The value is an integer ranging from 1 to 16 seconds.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ntp write

Usage Guidelines

Usage Scenario

The ntp-service max-distance command is used on the client side for NTP to calculate the synchronization distance to each NTP server. After the calculation is complete, NTP compares the synchronization distance with the maximum synchronization distance threshold. If the synchronization distance exceeds the threshold, the client will not consider the associated server for clock synchronization.

In VS mode, this command is supported only by the admin VS.

Precautions

If this command is the first NTP configuration command, the system automatically adds the ntp-service server disable/ntp-service ipv6 server disable command in the configuration file to disable the NTP service. To enable the NTP service, run the undo ntp-service server disable/undo ntp-service ipv6 server disable command. If this command is the last NTP configuration command to be deleted, the system automatically deletes the ntp-service server disable/ntp-service ipv6 server disable command from the configuration file.

Example

# Set the maximum distance threshold to 16.
<HUAWEI> system-view
[~HUAWEI] ntp-service max-distance 16
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >