The ntp-service reliable authentication-keyid command specifies the authentication key to be reliable.
The undo ntp-service reliable authentication-keyid command cancels the current setting.
By default, no authentication key is specified to be reliable.
ntp-service reliable authentication-keyid key-id
undo ntp-service reliable authentication-keyid key-id
Parameter | Description | Value |
---|---|---|
key-id | Indicates the key number. | Key ID is an integer and ranges from 1 to 4294967295. |
If the identity authentication is enabled, this command is used to specify that one or more keys are reliable. That is, the client can only be synchronized with the server that provides the reliable key. The client cannot be synchronized with the server that provides unreliable keys.
# Enable the identity authentication in NTP and adopt the HMAC-SHA256 encryption mode with key number as 37 and the key as BetterKey. Specify the key to be reliable.
<HUAWEI> system-view [HUAWEI] ntp-service authentication enable [HUAWEI] ntp-service authentication-keyid 37 authentication-mode hmac-sha256 cipher BetterKey [HUAWEI] ntp-service reliable authentication-keyid 37