The sa spi command configures the Security Parameter Index (SPI) for a Security Association (SA).
The undo sa spi command deletes the SPI from an SA.
By default, no SPI is configured.
Parameter | Description | Value |
---|---|---|
outbound |
Specifies SA parameters for outgoing 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 spi command. |
- |
spi-number |
Specifies the SPI. |
The value is an integer ranging from 256 to 4294967295. |
Usage Scenario
SPI uniquely identifies an SA. When an SPI is configured for an SA, the SPI is carried in each sent protocol packet. The receiver checks the protocol packet authenticity based on the SPI. When the ipsec sa sa-name command is used to create an SA, run the sa spi command to configure the SPI.
Precautions
Set parameters for both inbound and outbound SAs.
The SPI for incoming protocol packets on the local end must be identical with that for outgoing protocol packets on the peer end and vice versa.