Syntax:
sntp authentication key-id <
key-id
> authentication-mode <md5> key-value <
key-string
> [trusted]
no sntp authentication key-id <
key-id
>
Configures a key-id, authentication-mode (MD5 only), and key-value, which are required for authentication.
The
no
version of the command deletes the authentication key.
Default: No default keys are configured on the switch.
key-id
A numeric key identifier in the range of 1-4,294,967,295 (2
32
) that identifies the unique key value. It is sent in
the SNTP packet.
key-value <key-string>
The secret key that is used to generate the message digest. Up to 32 characters are allowed for
key-
string
.
encrypted-key <<key-string>>
Set the SNTP authentication key value using a base64–encoded aes-256 encrypted string.
Setting parameters for SNTP authentication
switch(config)# sntp authentication key-id 55 authentication-mode md5
key-value secretkey1
Configuring a trusted key
Trusted keys are used in SNTP authentication. In unicast mode, you must associate a
trusted
key with a
specific NTP/SNTP server. That key is used for authenticating the SNTP packet.
In unicast mode, a specific server is configured on the switch so that the SNTP client communicates with the
specified server to get the date and time.
In broadcast mode, the SNTP client switch checks the size of the received packet to determine if it is
authenticated. If the broadcast packet is authenticated, the key-id value is checked to see if the same key-id value
is configured on the SNTP client switch. If the switch is configured with the same key-id value, and the key-id
value is configured as "trusted," the authentication succeeds. Only trusted key-id value information is used for
SNTP authentication. For information about configuring these modes, see
Configuring unicast and broadcast
If the packet contains key-id value information that is not configured on the SNTP client switch, or if the received
packet contains no authentication information, it is discarded. The SNTP client switch expects packets to be
authenticated if SNTP authentication is enabled.
When authentication succeeds, the time in the packet is used to update the time on the switch.
Configuring a
key-id
as
trusted
(CLI)
Enter the following command to configure a key-id as trusted.
Syntax:
sntp authentication key-id <
key-id
> trusted
no sntp authentication key-id <
key-id
> trusted
Chapter 2 Time Protocols
43