Configuring SNTP authentication

SNTP authentication ensures that an SNTP client is synchronized only to an authenticated trustworthy NTP server.

Follow these guidelines when you configure SNTP authentication:

With authentication disabled, the SNTP client can synchronize with the NTP server regardless of whether the NTP server is enabled with authentication.

To configure SNTP authentication on the SNTP client:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enable SNTP authentication.

sntp authentication enable

By default, SNTP authentication is disabled.

3. Configure an SNTP authentication key.

sntp authentication-keyid keyid authentication-mode { hmac-sha-1 | hmac-sha-256 | hmac-sha-384 | hmac-sha-512 | md5 } { cipher | simple } string [ acl ipv4-acl-number | ipv6 acl ipv6-acl-number ] *

By default, no SNTP authentication key exists.

4. Specify the key as a trusted key.

sntp reliable authentication-keyid keyid

By default, no trusted key is specified.

5. Associate the SNTP authentication key with an NTP server.

  • For IPv4:sntp unicast-server { server-name | ip-address } [ vpn-instance vpn-instance-name ] authentication-keyid keyid

  • For IPv6: sntp ipv6 unicast-server { server-name | ipv6-address } [ vpn-instance vpn-instance-name ] authentication-keyid keyid

By default, no NTP server is specified.