- IPsec Anti-Replay Window Expanding and Disabling
- Pre-Fragmentation for IPsec VPNs
- Invalid Security Parameter Index Recovery
- IPsec Dead Peer Detection Periodic Message Option
- IPsec NAT Transparency
- DF Bit Override Functionality with IPsec Tunnels
- Crypto Access Check on Clear-Text Packets
- IPsec Security Association Idle Timers
- Low Latency Queueing for IPsec Encryption Engines
- IPsec IPv6 Phase 2 Support
- Index
- Finding Feature Information
- Prerequisites for Invalid Security Parameter Index Recovery
- Restrictions for Invalid Security Parameter Index Recovery
- Information About Invalid Security Parameter Index Recovery
- How to Configure Invalid Security Parameter Index Recovery
- Configuration Examples for Invalid Security Parameter Index Recovery
- Additional References
- Feature Information for Invalid Security Parameter Index Recovery
Invalid Security Parameter Index Recovery
When an invalid security parameter index error (shown as “Invalid SPI”) occurs in IP Security (IPsec) packet processing, the Invalid Security Parameter Index Recovery feature allows for an Internet Key Exchange (IKE) security association (SA) to be established. The “IKE” module sends notification of the “Invalid SPI” error to the originating IPsec peer so that Security Association Databases (SADBs) can be resynchronized and successful packet processing can be resumed.
Note | Security threats, as well as the cryptographic technologies to help protect against them, are constantly changing. For more information about the latest Cisco cryptographic recommendations, see the Next Generation Encryption (NGE) white paper. |
- Finding Feature Information
- Prerequisites for Invalid Security Parameter Index Recovery
- Restrictions for Invalid Security Parameter Index Recovery
- Information About Invalid Security Parameter Index Recovery
- How to Configure Invalid Security Parameter Index Recovery
- Configuration Examples for Invalid Security Parameter Index Recovery
- Additional References
- Feature Information for Invalid Security Parameter Index Recovery
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for Invalid Security Parameter Index Recovery
Before configuring the Invalid Security Parameter Index Recovery feature, you must have enabled Internet Key Exchange (IKE) and IPsec on your router.
Restrictions for Invalid Security Parameter Index Recovery
If an IKE SA is being initiated to notify an IPsec peer of an “Invalid SPI” error, there is the risk that a denial-of-service (DoS) attack can occur. The Invalid Security Parameter Index Recovery feature has a built-in mechanism to minimize such a risk, but because there is a risk, the Invalid Security Parameter Index Recovery feature is not enabled by default. You must enable the command using command-line interface (CLI).
Information About Invalid Security Parameter Index Recovery
How the Invalid Security Parameter Index Recovery Feature Works
An IPsec “black hole” occurs when one IPsec peer “dies” (for example, a peer can “die” if a reboot occurs or if an IPsec peer somehow gets reset). Because one of the peers (the receiving peer) is completely reset, it loses its IKE SA with the other peer. Generally, when an IPsec peer receives a packet for which it cannot find an SA, it tries to send an IKE “INVALID SPI NOTIFY” message to the data originator. This notification is sent using the IKE SA. If there is no IKE SA available, the receiving peer drops the packet.
Note | A single security association (SA) has only two peers. However, a SADB can have multiple SAs, whereby each SA has an association with a different peer. |
When an invalid security parameter index (SPI) is encountered, the Invalid Security Parameter Index feature provides for the setting up of an IKE SA with the originator of the data, and the IKE “INVALID SPI NOTIFY” message is sent. The peer that originated the data “sees” the “INVALID SPI NOTIFY” message and deletes the IPsec SA that has the invalid SPI. If there is further traffic from the originating peer, there will not be any IPsec SAs, and new SAs will be set up. Traffic will flow again. The default behavior (that is, without configuring the Invalid Security Parameter Index Recovery feature) is that the data packet that caused the invalid SPI error is dropped. The originating peer keeps on sending the data using the IPsec SA that has the invalid SPI, and the receiving peer keeps dropping the traffic (thus creating the “black hole”).
The IPsec module uses the IKE module to send an IKE “INVALID SPI NOTIFY” message to the other peer. Once the invalid SPI recovery is in place, there should not be any significant dropping of packets although the IPsec SA setup can itself result in the dropping of a few packets.
To configure your router for the Invalid Security Parameter Index Recovery feature, use the crypto isakmp invalid-spi-recovery command. The IKE SA will not be initiated unless you have configured this command.
How to Configure Invalid Security Parameter Index Recovery
- Configuring Invalid Security Parameter Index Recovery
- Verifying the Invalid Security Parameter Index Recovery Configuration
Configuring Invalid Security Parameter Index Recovery
To configure the Invalid Security Parameter Index Recovery feature, perform the following steps.
1.
enable
2.
configure
terminal
3.
crypto
isakmp
invalid-spi-recovery
DETAILED STEPS
Verifying the Invalid Security Parameter Index Recovery Configuration
To determine the status of the IPsec SA for traffic between two peers, you can use the show crypto ipsec sa command. If the IPsec SA is available on one peer and not on the other, there is a “black hole” situation, in which case you will see the invalid SPI errors being logged for the receiving peer. If you turn console logging on or check the syslog server, you will see that these errors are also being logged.
The figure below shows the topology of a typical preshared configuration setup. Host 1 is the initiating peer (initiator), and Host 2 is the receiving peer (responder).
1. Initiate the IKE and IPsec SAs between Host 1 and Host 2
2. Clear the IKE and IPsec SAs on Router B
3. Send traffic from Host 1 to Host 2 and ensure that new IKE and IPsec SAs are correctly established
DETAILED STEPS
Configuration Examples for Invalid Security Parameter Index Recovery
Invalid Security Parameter Index Recovery Example
The following example shows that invalid security parameter index recovery has been configured on Router A and Router B. Invalid Security Parameter Index Recovery Example shows the topology used for this example.
Router A
Router# show running-config Building configuration... Current configuration : 2048 bytes ! version 12.3 no service pad service timestamps debug datetime msec localtime service timestamps log datetime msec localtime no service password-encryption service tcp-small-servers ! hostname ipseca-71a ! logging queue-limit 100 no logging console enable secret 5 $1$4GZB$L2YOmnenOCNAu0jgFxebT/ enable password lab ! clock timezone PST -8 clock summer-time PDT recurring ip subnet-zero ! ! no ip domain lookup ! ip cef ip audit notify log ip audit po max-events 100 mpls ldp logging neighbor-changes no ftp-server write-enable ! ! no voice hpi capture buffer no voice hpi capture destination ! ! crypto isakmp policy 1 encryption aes authentication pre-share group 14 lifetime 180 crypto isakmp key 0 1234 address 10.2.2.2 crypto isakmp invalid-spi-recovery ! ! crypto ipsec transform-set auth2 ah-sha-hmac esp-aes esp-sha-hmac ! crypto map testtag1 10 ipsec-isakmp set peer 10.2.2.2 set transform-set auth2 match address 150 ! ! controller ISA 5/1 ! ! interface FastEthernet0/0 ip address 10.1.1.1 255.0.0.0 no ip route-cache cef duplex full speed 100 crypto map testtag1 ! interface FastEthernet0/1 ip address 10.0.0.1 255.0.0.0 no ip route-cache cef duplex auto speed auto ! interface Serial1/0 no ip address no ip route-cache no ip mroute-cache shutdown serial restart_delay 0 clockrate 128000 ! interface Serial1/1 no ip address no ip route-cache no ip mroute-cache shutdown serial restart_delay 0 clockrate 128000 ! interface Serial1/2 no ip address no ip route-cache no ip mroute-cache shutdown serial restart_delay 0 ! interface Serial1/3 no ip address no ip route-cache no ip mroute-cache shutdown no keepalive serial restart_delay 0 clockrate 128000 ! ip classless ip route 10.3.3.3 255.0.0.0 10.2.0.1 no ip http server no ip http secure-server ! ! access-list 150 permit ip host 10.0.0.1 host 10.0.2.2 dialer-list 1 protocol ip permit dialer-list 1 protocol ipx permit ! ! call rsvp-sync ! ! mgcp profile default ! ! line con 0 exec-timeout 0 0 line aux 0 line vty 0 4 password lab login ! ! end ipseca-71a#
Router B
Router# show running-config Building configuration... Current configuration : 2849 bytes ! version 12.3 no service pad service timestamps debug datetime msec localtime service timestamps log datetime msec localtime no service password-encryption service udp-small-servers service tcp-small-servers ! hostname ipseca-72a ! logging queue-limit 100 no logging console enable secret 5 $1$kKqL$5Th5Qhw1ubDkkK90KWFxi1 enable password lab ! clock timezone PST -8 clock summer-time PDT recurring ip subnet-zero ! ! no ip domain lookup ! ip cef ip audit notify log ip audit po max-events 100 mpls ldp logging neighbor-changes no ftp-server write-enable ! ! no voice hpi capture buffer no voice hpi capture destination ! ! mta receive maximum-recipients 0 ! ! crypto isakmp policy 1 encryption aes authentication pre-share group 14 lifetime 180 crypto isakmp key 0 1234 address 10.1.1.1 crypto isakmp invalid-spi-recovery ! ! crypto ipsec transform-set auth2 ah-sha-hmac esp-aes esp-sha-hmac ! crypto map testtag1 10 ipsec-isakmp set peer 10.1.1.1 set transform-set auth2 match address 150 ! ! controller ISA 5/1 ! ! interface FastEthernet0/0 no ip address no ip route-cache no ip mroute-cache shutdown duplex half ! interface Ethernet1/0 ip address 10.2.2.2 255.0.0.0 no ip route-cache cef duplex half crypto map testtag1 ! interface Ethernet1/1 ip address 10.0.2.2 255.0.0.0 no ip route-cache cef duplex half ! interface Ethernet1/2 no ip address no ip route-cache no ip mroute-cache shutdown duplex half ! interface Ethernet1/3 no ip address no ip route-cache no ip mroute-cache shutdown duplex half ! interface Ethernet1/4 no ip address no ip route-cache no ip mroute-cache shutdown duplex half ! interface Ethernet1/5 no ip address no ip route-cache no ip mroute-cache shutdown duplex half ! interface Ethernet1/6 no ip address no ip route-cache no ip mroute-cache shutdown duplex half ! interface Ethernet1/7 no ip address no ip route-cache no ip mroute-cache shutdown duplex half ! interface Serial3/0 no ip address no ip route-cache no ip mroute-cache shutdown serial restart_delay 0 ! interface Serial3/1 no ip address no ip route-cache no ip mroute-cache shutdown serial restart_delay 0 clockrate 128000 ! interface Serial3/2 no ip address no ip route-cache no ip mroute-cache shutdown serial restart_delay 0 ! interface Serial3/3 no ip address no ip route-cache no ip mroute-cache shutdown no keepalive serial restart_delay 0 clockrate 128000 ! ip classless ip route 10.0.0.0 255.0.0.0 10.2.0.1 no ip http server no ip http secure-server ! ! access-list 150 permit ip host 10.0.2.2 host 10.0.0.1 dialer-list 1 protocol ip permit dialer-list 1 protocol ipx permit ! ! call rsvp-sync ! ! mgcp profile default ! dial-peer cor custom ! ! gatekeeper shutdown ! ! line con 0 exec-timeout 0 0 stopbits 1 line aux 0 stopbits 1 line vty 0 4 password lab login ! ! end
Additional References
Related Documents
Related Topic |
Document Title |
---|---|
Configuring IKE |
Configuring Internet Key Exchange for IPsec VPNs |
Interface commands |
|
Recommended cryptographic algorithms |
MIBs
MIBs |
MIBs Link |
---|---|
None. |
To locate and download MIBs for selected platforms, Cisco IOS software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for Invalid Security Parameter Index Recovery
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
Invalid Security Parameter Index Recovery |
12.3(2)T 12.2(18)SXE |
When an invalid security parameter index error (shown as “Invalid SPI”) occurs in IP Security (IPsec) packet processing, the Invalid Security Parameter Index Recovery feature allows for an Internet Key Exchange (IKE) security association (SA) to be established. The “IKE” module sends notification of the “Invalid SPI” error to the originating IPsec peer so that Security Association Databases (SADBs) can be resynchronized and successful packet processing can be resumed. This feature was introduced in Cisco IOS Release 12.3(2)T. This feature was integrated into Cisco IOS Release 12.2(18)SXE. The following command was introduced or modified: crypto isakmp invalid-spi-recovery |