key-id

Configures a key in the keychain by specifying a key identifier.
Syntax
key-id key-num
no key-id key-num
Command Default

A key is not configured by default.

Parameters
key-num
Specifies the key identifier of the key. The valid range is from 1 through 4294967296.
Modes

Keychain configuration mode

Usage Guidelines

A maximum of 1024 keys can be configured across all the keychains.

Each key ID within a keychain has its own properties such as key string, authentication algorithm, send lifetime, and accept lifetime. A key is considered valid only if the key has a lifetime that has not expired, and the password and authentication algorithm have been specified.

The range of returned key IDs usable varies with the protocol. For each protocol, the key ID must be within a valid range. For example, the valid range of key IDs for OSPFv2 is from 1 through 255. The application that uses the keychain module can reject the key IDs that are outside the permitted range. However, the keychain module does not place any restrictions in terms of user configuration of the key ID.

The no form of the command deletes the key.

Examples

The following example configures a key in a keychain.

device# configure terminal
device(config)# keychain xprotocol
device(config-keychain-xprotocol)# key-id 10
device(config-keychain-xprotocol-key-10)#
History
Release Command History
08.0.70 This command was introduced.