48
Parameters
keyid
: Specifies an authentication key number in the range of 1 to 4294967295.
Usage guidelines
If SNTP is enabled, the SNTP client is synchronized only to an NTP server that provides a trusted
key.
Before you use the command, make sure SNTP authentication is enabled and an authentication key
is configured. The key automatically changes to untrusted after you delete the key. In this case, you
do not need to execute the
undo sntp-service reliable authentication-keyid
command.
Examples
# Enable NTP authentication, and specify the MD5 encryption algorithm, with the key ID of 37 and
key value of
BetterKey
.
<Sysname> system-view
[Sysname] sntp authentication enable
[Sysname] sntp authentication-keyid 37 authentication-mode md5 BetterKey
# Specify this key as a trusted key.
[Sysname] sntp reliable authentication-keyid 37
Related commands
•
sntp
authentication-keyid
•
sntp authentication enable
sntp unicast-server
Use
sntp unicast-server
to specify an NTP server for the device.
Use
undo sntp unicast-server
to remove the NTP server.
Syntax
sntp unicast-server
{
server-name
|
ip-address
} [
vpn-instance vpn-instance-name
]
[
authentication-keyid keyid
|
source interface-type interface-number
|
version
number
] *
undo sntp unicast-server
{
server-name
|
ip-address
} [
vpn-instance
vpn-instance-name
]
Default
No NTP server is specified for the device.
Views
System view
Predefined user roles
network-admin
Parameters
server-name
: Specifies the host name of the NTP server, a case-insensitive string of 1 to 253
characters.
ip-address
: Specifies the IP address of the NTP server. It must be a unicast address, rather than a
broadcast address, a multicast address, or the IP address of the local clock.
vpn-instance vpn-instance-name
: Specifies the MPLS L3VPN to which the NTP server belongs,
where
vpn-instance-name
is a case-sensitive string of 1 to 31 characters. If the NTP server is on the
public network, do not specify this option.