authentication-key

Defines an authentication key for Network Time Protocol (NTP).
Syntax
authentication-key key-id key-id { md5 | sha1 } key-string
no authentication-key key-id key-id [ md5 | sha1 ] key-string
Command Default

Authentication keys are not configured.

Parameters
key-id key-id
Specifies a valid key ID. The value can range from 1 through 65535.
md5
Message authentication support is provided using the Message Digest 5 algorithm.
sha1
The SHA1 keyed hash algorithm is used for NTP authentication.
key-string
The value of the MD5 or SHA1 key. The length of the key string may be up to 16 characters. Up to 32 keys may be defined.
Modes

NTP configuration mode

Usage Guidelines

If Joint Interoperability Test Command (JITC) is enabled, only the sha1 option is available.

If the NTP server or peer is configured without authentication keys, the NTP request is not sent to the configured server or peer.

The same set or subset of key ID and key string should be installed on all NTP devices.

The no form of the command removes the authentication key.

Examples

The following example shows how to configure an authentication key.

device(config)# ntp
device(config-ntp)# authentication-key key-id 1 md5 moof