ntp-service reliable authentication-keyid

Function

The ntp-service reliable authentication-keyid command specifies a reliable authentication key.

The undo ntp-service reliable authentication-keyid command deletes the reliable authentication key.

By default, no authentication key is specified to be reliable.

Format

ntp-service reliable authentication-keyid key-id

undo ntp-service reliable authentication-keyid key-id

Parameters

Parameter Description Value
key-id

Specifies a key number.

The value is an integer ranging from 1 to 4294967295.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
ntp write

Usage Guidelines

Usage Scenario

If identity authentication is enabled, specify one or more reliable keys. A client can only be synchronized with the servers that provide reliable keys.

  • The device that wants to synchronize its clock must declare its key reliable.
  • When the client synchronizes to authenticated server, the authentication key must be declared reliable only on the client side. The server does not need to declare the key reliable.

Prerequisites

The NTP authentication key has been set using the ntp-service authentication-keyid command.

Precautions

If this command is the first NTP configuration command, the system automatically adds the 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 [ ipv6 ] server disable command. If this command is the last NTP configuration command to be deleted, the system automatically deletes the ntp-service [ ipv6 ] server disable command from the configuration file.

Example

# Enable the identity authentication in NTP and the HMAC-SHA256 encryption mode with a key number of 37 and a key of BetterKey. Configure the key as a reliable one.
<HUAWEI> system-view
[~HUAWEI] ntp-service authentication enable
[*HUAWEI] ntp-service authentication-keyid 37 authentication-mode hmac-sha256 BetterKey
[*HUAWEI] ntp-service reliable authentication-keyid 37
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >