135
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 simple 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 an NTP server specified for the device.
Syntax
sntp unicast-server
{
server-name
|
ip-address
} [
vpn-instancevpn-instance-name
]
[
authentication-keyid keyid
|
sourceinterface-type interface-number
|
versionnumber
] *
undo sntp unicast-server
{
server-name
|
ip-address
} [
vpn-instancevpn-instance-name
]
Default
No NTP server is specified.
Views
System view
Predefined user roles
network-admin
Parameters
server-name
: Specifies an NTP server by its host name, a case-insensitive string of 1 to 253
characters.
ip-address
: Specifies an NTP server by its IP address. 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 VPN to which the NTP server belongs. The
vpn-instance-name
argument is a case-sensitive string of 1 to 31 characters. If the NTP server is on
the public network, do not specify this option.
authentication-keyidkeyid
: Specifies the key ID to be used for sending NTP messages to the NTP
server. The value range for the
keyid
argument is 1 to 4294967295. If you do not specify this option,
the local device and NTP server do not authenticate each other.