key
To create a key or to enter the configuration mode for an existing key, use the key command. To remove the key, use the no form of this command.
key key-ID
no key key-ID
Syntax Description
key-ID |
ID of the key to be configured. This ID must be a whole number between 0 and 65535.
|
Command Default
None
Command Modes
Keychain configuration (config-keychain)
MACsec keychain configuration (config-macseckeychain)
Command History
Release |
Modification |
---|---|
8.2(1) |
This command was modified. Support for the MACsec keychain configuration mode was added. |
4.0(1) |
This command was introduced. |
Usage Guidelines
-
A new key contains no key strings.
-
This command does not require a license.
-
To use this command in MACsec keychain configuration mode, you should enable the MKA feature first.
Examples
This example shows how to enter the key configuration mode for key 13 in the glbp-keys keychain:
switch# configure terminal
switch(config)# key chain glbp-keys
switch(config-keychain)# key 13
switch(config-keychain-key)#
This example shows how to enter the MACsec key configuration mode for key 01 in the k1 MACsec keychain:
switch# configure terminal
switch(config)# key chain k1 macsec
switch(config-macseckeychain)# key 01
switch(config-macseckeychain-macseckey)#