The sa authentication-hex command sets an authentication in hexadecimal format or cipher text for Security Associations (SAs).
The undo sa authentication-hex command deletes an authentication key from SAs.
By default, no authentication key is created.
Parameter | Description | Value |
---|---|---|
inbound |
Specifies SA parameters for incoming protocol packets. |
- |
ah |
Specifies SA parameters for Authentication Header (AH). If the security proposal applied to an SA uses AH, ah must be configured in the sa authentication-hex command. |
- |
cipher |
Specifies the ciphertext type. |
- |
auth-in-ah |
Specifies a ciphertext key used for authentication. |
The value is in hexadecimal notation.
The corresponding cipher data ranges from 20 to 392. |
plain plain-auth-in-ah |
Specifies a simple text password key used for authentication. |
The value is in hexadecimal notation.
The corresponding cipher data ranges from 20 to 392. |
Usage Scenario
AH and ESP can use MD5, SHA-1, or SHA-2 that require an authentication key in the string or hexadecimal format. To generate a hexadecimal key, run the sa authentication-hex command.
To ensure high security, do not use the MD5 or SHAI algorithm as the authentication algorithm. You are advised to use a more secure authentication algorithm, such as SHA2, if the authentication algorithm is supported by the protocol.Precautions
Set parameters for both inbound and outbound SAs.
SA parameters on both IPsec peers must be identical. The authentication key for incoming protocol packets on the local end must be identical with that for outgoing protocol packets on the peer end and vice versa. The authentication key can be in the hexadecimal or string format. To configure an authentication key in the string format, run the sa string-key command. If multiple authentication keys are configured, the latest one takes effect. The formats of authentication keys on both IPsec peers must be identical. If an authentication key in the string format is configured on one end and an authentication key in the hexadecimal format on another end, the two ends cannot communicate. Updating the key every 90 days is recommended.