Table Of Contents
IPSec Stateful Failover (VPN High Availability)
Hot Standby Router Protocol (HSRP)
Related Features and Technologies
Supported Standards, MIBs, and RFCs
Configuring HSRP Group Attributes
Configuring IKE Pre-Shared Key
Configuring an IPSec Transform Set
Defining an IPSec Transform Set
Selecting Appropriate Transforms
The Crypto Transform Configuration Mode
Configuring Crypto Access Lists for IPSec Traffic
Creating Crypto Access Lists for IPSec Traffic
Creating Crypto Access List Example
Ensuring That Access Lists Are Compatible with IPSec
Setting Global Lifetimes for IPSec Security Associations
Configuring Crypto Map Example
Configuring SSP Communications
Configuring SSP Communications Example
Applying Crypto Map Sets to Interfaces and Enabling Transferring IPSec State
Applying Crypto Map Sets to Interfaces Example
Show Configuration Tasks and Examples
Verifying IPSec Configurations
Verifying IPSec High Availability
Monitoring and Maintaining IPSec Stateful Failover (VPN High Availability)
Debug Configuration Tasks and Examples
Clearing Dormant SAs on Standby Routers
clear crypto isakmp ha standby
IPSec Stateful Failover (VPN High Availability)
Feature History
This document describes IPSec Stateful Failover (VPN High Availability) in Cisco IOS Release 12.2(14)SU2, 12.2(14)SU1, 12.2(14)SU, 12.2(11)YX1, and 12.2(11)YX, and contains the following sections:
•
Supported Standards, MIBs, and RFCs
•
Show Configuration Tasks and Examples
•
Debug Configuration Tasks and Examples
Feature Overview
IPSec Stateful Failover (VPN High Availability) is a feature that enables a router to continue processing and forwarding packets after a planned or unplanned outage. You can employ a backup (standby) router that automatically takes over the primary (active) router's tasks in the event of an active router failure. The process is transparent to users and to remote IPSec peers. The time that it takes for the standby router to take over depends on HSRP timers.
IPSec Stateful Failover (VPN High Availability) is designed to work in conjunction with Reverse Route Injection (RRI) and Hot Standby Router Protocol (HSRP) with IPSec. When used together, RRI and HSRP provide a more reliable network design for VPNs and reduce configuration complexity on remote peers.
RRI and HSRP are supported together with the restriction that the HSRP configuration on the outside interface uses equal priorities on both routers. As an option, when not using RRI, you can use an HSRP configuration on the LAN side of the network (equal HSRP priority restriction still applies).
Reverse Route Injection (RRI)
RRI is a feature designed to simplify network design for VPNs which require redundancy and routing. RRI works with both dynamic and static crypto maps. When routes are created, they are injected into any dynamic routing protocol and distributed to surrounding devices. This causes traffic flows requiring IPSec to be directed to the appropriate head-end VPN router for transport across the correct security associations (SAs) to avoid IPSec policy mismatches and possible packet loss.
Hot Standby Router Protocol (HSRP)
HSRP is designed to provide high network availability by routing IP traffic from hosts on Ethernet networks without relying on the availability of any single router. By providing network redundancy for IP networks, user traffic immediately and transparently recovers from first hop failures in network edge devices or access circuits.
A network administrator enables HSRP, assigns a virtual IP address, and enables IPSec Stateful Failover (VPN High Availability). After enabling both HSRP and IPSec Stateful Failover, the network administrator uses the show ssp, show crypto ipsec, and show crypto isakmp commands to verify that all processes are running properly. In the event of failover, the standby device takes over ownership of the standby IP address and begins to service remote VPN peers.
The information that the active router transmits to the standby router includes:
•
IKE cookies stamp
•
Session keys
•
Cisco Service Assurance (SA) Agent attributes
•
Sequence number counter and window state
•
Kilobyte (KB) lifetime expirations
•
Dead peer detection (DPD) sequence number updates
Figure 1 shows a sample topology for site-to-site configuration of IPSec Stateful Failover with generic routing encapsulation (GRE), a tunnel interface not tied to specific "passenger" or "transport" protocols. GRE supports multicast traffic, critical for V3PN applications.
Figure 1 Site-to-Site VPN Configuration
There are four possible configurations for the Cisco 7200 series routers using Cisco IOS Release 12.2(14)SU, 12.2(14)SU1, or 12.2(14)SU2:
•
non-GRE High Availability (HA) with a virtual IP (VIP), or redundancy groups, on the outside and a VIP on the inside (see Figure 2)
•
non-GRE HA with only VIPs on the outside. The route to the outside is provided by Reverse Route Injection (RRI) (see Figure 3)
•
GRE HA, with VIPs on the outside and tested inside faces (see Figure 4)
•
GRE HA, with only a VIP on the outside, using RRI to inject routes (see Figure 5)
Figure 2 HSRP VIP on Inside and Outside
Figure 3 HSRP VIP on Outside, RRI Injected Routes on Inside
Figure 4 GRE HA with VIPs on the Outside and Inside Faces
Figure 5 GRE HA with Only a VIP on the Outside, Using RRI to Inject Routes
Feature Summary
Table 1 provides a summary of features, by Cisco IOS software release.
Benefits
•
IPSec VPN tunnels assigned to an active router will automatically be transitioned to a standby router upon any active router failure. Any transition from an active router to a standby router is transparent to peers, and requires no remote peer adjustment or reconfiguration.
•
Businesses employing IPSec Stateful Failover (VPN High Availability) are 100% redundant with regard to IPSec VPN traffic.
•
Utilizing IPSec Stateful Failover (VPN High Availability) does not appreciably affect overall router performance.
•
Generic routing encapsulation (GRE) supports multicast traffic, critical for V3PN applications.
Restrictions
•
Does not support failover of IKECFG attributes.
•
Does not support IKE XAUTH states.
•
Supports just a single VAM/VAM2 card in each active/standby router.
•
Requires identical security policy configurations on both active and standby routers.
•
Requires that IKE keepalives must not be used; enabling this feature will cause the connection to be torn down after the standby router assumes ownership control.
•
Supports keepalives only with dead peer detection (DPD).
•
Requires that priority values are equal on both active and standby routers for IP redundancy.
•
IPSec MIB statistics could be erroneous on the standby router after a failover.
•
Requires that active and standby routers be connected to an Ethernet interface.
•
Does not support Cisco VPN Client 3.X client.
•
Does not support PKI certificates.
Related Features and Technologies
•
Internet Key Exchange (IKE)
•
IP Security (IPSec)
•
Reverse Route Injection (RRI)
•
Hot Standby Router Protocol (HSRP)
•
State Synchronization Protocol (SSP)
Related Documents
•
Implementing HSRP in the Enterprise Network
•
IPSec VPN High Availability Enhancements
Supported Platforms
•
Cisco 7200 series
Supported Standards, MIBs, and RFCs
Standards
•
None
MIBs
•
None
To obtain lists of supported MIBs by platform and Cisco IOS release, and to download MIB modules, go to the Cisco MIB web site on Cisco.com at the following URL: http://www.cisco.com/public/sw-center/netmgmt/cmtk/mibs.shtml.
RFCs
•
None
Prerequisites
You must configure IPSec and IKE on the router and a crypto map to all interfaces that require encryption service. See the "Configuration Tasks" section for configuration procedures.
•
Cisco IOS Release 12.2(14)SU2, 12.2(14)SU1, 12.2(14)SU, 12.2(11)YX1, or Cisco IOS Release 12.2(11)YX
•
Two Cisco 72xx routers configured with the same Cisco IOS release
•
HSRP running
Configuration Tasks
See Figure 6 and use the following commands to implement, maintain, and debug IPSec Stateful Failover (VPN High Availability).
•
Configuring HSRP (required)
•
Configuring an IKE Policy (required)
•
Configuring IKE Pre-Shared Key (required)
•
Configuring an IPSec Transform Set (required)
•
Configuring Crypto Access Lists for IPSec Traffic (required)
•
Configuring Crypto Maps (required)
•
Configuring SSP Communications (required)
•
Applying Crypto Map Sets to Interfaces and Enabling Transferring IPSec State (required)
Figure 6 Sample Configuration for IPSec Stateful Failover (VPN High Availability
Configuring HSRP
This section describes the Hot Standby Router Protocol (HSRP) Support for Virtual Private Networks (VPNs) and includes the following sections:
•
Configuring HSRP Group Attributes
The HSRP Support for VPNs feature ensures that the HSRP virtual IP address is added to the correct IP routing table and not to the default routing table.
Keep in mind the following when configuring HSRP:
•
Both the inside (private) and outside (public) interfaces must belong to separate HSRP groups. The interfaces then must track each other.
•
The HSRP state of the inside and outside interface of each must be the same, that is, both must be active or both must be standby, otherwise there will be a black hole - packets won't have a route out of the private network. To avoid having one interface on standby while another is on active, confirm the conditions below:
–
Standby priorities should be equal on active and standby routers. If they are not, IPSec Stateful failover may or may not occur automatically when the active router fails.
–
The IP addresses on the HSRP-tracked interfaces on the standby and active routers should both be either lower or higher on one router than the other. In the case of equal priorities (an HA requirement), HSRP will assign the active state based on IP address. If an addressing scheme exists so that the public IP address of router A is lower than the public IP address of router B, but the opposite is true for their private interfaces, an active/standby-standby/active split condition could happen, which will break IPSec connectivity.
Enabling HSRP
To enable the HSRP on an interface, use the following command in interface configuration mode:
Command Purpose Router(config-if)# standby [hsrp-group-number] ip ip-addressEnables the HSRP.
Repeat this command to enable HSRP on each router.
Configuring HSRP Group Attributes
To configure other HSRP group attributes that affect how the local router participates in HSRP, use one or more of the following commands in interface configuration mode:
Configuring HSRP Examples
The following example shows how to configure the outside interface:
Router(config-if)# interface fastEthernet 0/1Router(config-if)# standby 1 ip 40.0.0.1Router(config-if)# standby 1 name ispRouter(config-if)# standby 1 timers msec 500 3Router(config-if)# standby delay minimum 30 reload 60Router(config-if)# standby 1 preemptRouter(config-if)# standby 1 track fastEthernet 0/0
Note
The standby delay command is not essential, but recommended. All other commands are required.
The following commands shows how to configure the HSRP inside interface:
Router(config-if)# interface fastEthernet 0/0Router(config-if)# standby 2 ip 172.16.31.1Router(config-if)# standby 2 name lanRouter(config-if)# standby 2 timers msec 500 3Router(config-if)# standby delay minimum 30 reload 60Router(config-if)# standby 2 preemptRouter(config-if)# standby 2 track fastEthernet 0/1
Note
Configure the same commands on Router 2, including the same HSRP priority values (the default is 100) as on Router 1.
Configuring an IKE Policy
If you do not specify a value for a parameter, the default value is assigned. For information on default values, refer to the "IP Security and Encryption" chapter of the Security Command Reference publication.
To configure an IKE policy, use the following commands beginning in global configuration mode:
For detailed information on creating IKE policies, refer to the "Configuring Internet Key Exchange Security Protocol" chapter in the Security Configuration Guide publication.
Configuring IKE Pre-Shared Key
To specify pre-shared keys with a peer, use the following commands in global configuration mode:
Remember to repeat these tasks at each peer that uses pre-shared in an IKE policy.
Configuring an IPSec Transform Set
This section includes the following topics:
•
Defining an IPSec Transform Set (required)
•
IPSec Protocols: AH and ESP (optional)
•
Selecting Appropriate Transforms (optional)
•
The Crypto Transform Configuration Mode (optional)
•
Changing Existing Transforms (optional)
•
Transform Example (optional)
A transform set is an acceptable combination of security protocols, algorithms, and other settings to apply to IPSec protected traffic. During the IPSec security association (SA) negotiation, the peers agree to use a particular transform set when protecting a particular data flow.
Defining an IPSec Transform Set
A transform set is a combination of security protocols and algorithms. During the IPSec security association negotiation, peers agree to use a specific transform set to protect a particular data flow.
To define a transform set, use the following commands, starting in global configuration mode:
Command PurposeStep 1
Router(config)# crypto ipsec transform-set transform-set-name transform1 [transform2 [transform3]]
transform-set-name
Specify the name of the transform set to create (or modify).transform1
transform2
transform3Specify up to three transforms (one is required) that define the IPSec security protocol(s) and algorithm(s). Accepted transform values are described in Table 2.
Step 2
Router(cfg-crypto-tran)# mode [tunnel | transport]
(Optional) Changes the mode associated with the transform set. The mode setting is only applicable to traffic whose source and destination addresses are the IPSec peer addresses; it is ignored for all other traffic. (All other traffic is in tunnel mode only.)
Step 3
end
Exits the crypto transform configuration mode to enabled mode.
Step 4
clear crypto sa
or
clear crypto sa peer {ip-address | peer-name}
or
clear crypto sa map map-name
or
clear crypto sa spi destination-address protocol spiClears existing IPSec security associations so that any changes to a transform set take effect on subsequently established security associations (SAs). (Manually established SAs are reestablished immediately.)
Using the clear crypto sa command without parameters clears out the full SA database, which clears out active security sessions. You may also specify the peer, map, or entry keywords to clear out only a subset of the SA database.
Step 5
Repeat these steps to configure IPSec transform sets on each router.
Table 2 shows allowed transform combinations for the AH and ESP protocols.
Note
AES is not available with Cisco IOS Release 12.2(14)SU2, 12.2(14)SU1 or 12.2(14)SU.
Examples of acceptable transform combinations are as follows:
•
ah-md5-hmac
•
esp-des
•
esp-3des and esp-md5-hmac
•
ah-sha-hmac and esp-des and esp-sha-hmac
•
comp-lzs
The parser will prevent you from entering invalid combinations; for example, once you specify an AH transform it will not allow you to specify another AH transform for the current transform set.
IPSec Protocols: AH and ESP
Both the AH and ESP protocols implement security services for IPSec.
AH provides data authentication and antireplay services.
ESP provides packet encryption and optional data authentication and antireplay services.
ESP encapsulates the protected data—either a full IP datagram (or only the payload)—with an ESP header and an ESP trailer. AH is embedded in the protected data; it inserts an AH header immediately after the outer IP header and before the inner IP datagram or payload. Traffic that originates and terminates at the IPSec peers can be sent in either tunnel or transport mode; all other traffic is sent in tunnel mode. Tunnel mode encapsulates and protects a full IP datagram, while transport mode encapsulates/protects the payload of an IP datagram. For more information about modes, refer to the mode (IPSec) command description.
Selecting Appropriate Transforms
The following tips may help you select transforms that are appropriate for your situation:
•
If you want to provide data confidentiality, include an ESP encryption transform.
•
If you want to ensure data authentication for the outer IP header as well as the data, include an AH transform. (Some consider the benefits of outer IP header data integrity to be debatable.)
•
If you use an ESP encryption transform, also consider including an ESP authentication transform or an AH transform to provide authentication services for the transform set.
•
If you want data authentication (either using ESP or AH) you can choose from the MD5 or SHA (HMAC keyed hash variants) authentication algorithms. The SHA algorithm is generally considered stronger than MD5 but is slightly slower.
•
Note that some transforms might not be supported by the IPSec peer.
Note
If a user enters an IPSec transform that the hardware (the IPSec peer) does not support, a warning message will be displayed immediately after the crypto ipsec transform-set command is entered.
•
In cases where you need to specify an encryption transform but do not actually encrypt packets, you can use the esp-null transform.
Suggested transform combinations follow:
•
esp-aes and esp-sha-hmac
•
ah-sha-hmac and esp-aes and esp-sha-hmac
The Crypto Transform Configuration Mode
After you issue the crypto ipsec transform-set command, you are put into the crypto transform configuration mode. While in this mode, you can change the mode to tunnel or transport. (These are optional changes.) After you have made these changes, type exit to return to global configuration mode. For more information about these optional changes, refer to the match address (IPSec) and mode (IPSec) command descriptions.
Changing Existing Transforms
If one or more transforms are specified in the crypto ipsec transform-set command for an existing transform set, the specified transforms will replace the existing transforms for that transform set.
If you change a transform set definition, the change is only applied to crypto map entries that reference the transform set. The change will not be applied to existing SAs, but will be used in subsequent negotiations to establish new SAs. If you want the new settings to take effect sooner, you can clear all or part of the SA database by using the clear crypto sa command.
Transform Example
The following example defines two transform sets. The first transform set will be used with an IPSec peer that supports the newer ESP and AH protocols. The second transform set will be used with an IPSec peer that only supports the older transforms.
crypto ipsec transform-set SDM_TRASFORMSET_1 esp-3des esp-sha-hmacThe following example is a sample warning message that is displayed when a user enters an IPSec transform that the hardware does not support:
crypto ipsec transform transform-1 esp-aes 256 esp-md5WARNING:encryption hardware does not support transformesp-aes 256 within IPSec transform transform-1Configuring Crypto Access Lists for IPSec Traffic
This section includes the following topics:
•
Creating Crypto Access Lists for IPSec Traffic (required)
•
Creating Crypto Access List Example
•
Ensuring That Access Lists Are Compatible with IPSec (required)
•
Setting Global Lifetimes for IPSec Security Associations (optional)
See the "Configuring IPSec Network Security" of the Cisco IOS Security Configuration Guide for more information on configuring IPSec.
Creating Crypto Access Lists for IPSec Traffic
Crypto access lists define which IP traffic will be protected by encryption. (These access lists are not the same as regular access lists, which determine what traffic to forward or block at an interface.) For example, access lists can be created to protect all IP traffic between Subnet A and Subnet Y or Telnet traffic between Host A and Host B.
To create crypto access lists, use the following command in global configuration mode:
Step Command PurposeStep 1
Router(config)# access-list access-list-number {permit | deny} protocol source source-wildcard destination destination-wildcard [log]
or
Router(config)# ip access-list extended name
access-list-number
Specify an integer from 100 to 199 that you select for the list.permit
Permits the frame.deny
Denies the frame.Specifies conditions to determine which IP packets will be protected.1 (Enable or disable crypto for traffic that matches these conditions.)
We recommend that you configure "mirror image" crypto access lists for use by IPSec and that you avoid using the any keyword.
Step 2
Add permit and deny statements as appropriate.
Adds permit or deny statements to access lists.
Step 3
End
Exits the configuration command mode.
Step 4
Repeat these steps to create access lists on each router.
1 You specify conditions using an IP access list designated by either a number or a name. The access-list command designates a numbered extended access list; the ip access-list extended command designates a named access list.
For detailed information on configuring access lists, refer to the "Configuring IPSec Network Security" chapter in the Cisco IOS Security Configuration Guide publication.
Creating Crypto Access List Example
The following example shows a typical example for creating an access list for IPSec traffic on both routers:
access-list 100 permit ip any 192.168.4.0.0.0.0.255Ensuring That Access Lists Are Compatible with IPSec
IKE uses UDP port 500. The IPSec Encapsulating Security Payload (ESP) and Authentication Header (AH) protocols use protocol numbers 50 and 51. Ensure that your interface access lists are configured so that protocol numbers 50, 51, and UDP port 500 traffic are not blocked at interfaces used by IPSec. In some cases, you might need to add a statement to your access lists to explicitly permit this traffic.
Setting Global Lifetimes for IPSec Security Associations
You can change the global lifetime values which are used when negotiating new IPSec security associations. (These global lifetime values can be overridden for a particular crypto map entry).
These lifetimes only apply to security associations established via IKE. Manually established security associations do not expire.
To change a global lifetime for IPSec security associations, use one or more of the following commands in global configuration mode:
Configuring Crypto Maps
You can apply only one crypto map set to a single interface. The crypto map set can include a combination of IPSec/IKE and IPSec/manual entries. Multiple interfaces can share the same crypto map set if you want to apply the same policy to multiple interfaces.
This section includes the following topics:
•
Creating Crypto Map Entries (required)
•
Configuring Crypto Map Example
•
Creating Dynamic Crypto Maps (optional)
Creating Crypto Map Entries
To create crypto map entries that use IKE to establish the security associations, use the following commands, starting in global configuration mode:
Configuring Crypto Map Example
The following example shows an example of configuring a crypto map:
crypto map SDM_CMAP_1 1 ipsec-isakmpdescription Tunnel to 192.168.3.1set peer 192.168.3.1set transform-set SDM_TRASNFORMSET_1match address 100Creating Dynamic Crypto Maps
A dynamic crypto map entry is a crypto map entry with some parameters not configured.The missing parameters are later dynamically configured (as the result of an IPSec negotiation). Dynamic crypto maps are only available for use with ISAKMP.
Dynamic crypto map entries are grouped into sets. A set is a group of dynamic crypto map entries all with the same dynamic-map-name, each with a different dynamic-seq-num.
To create a dynamic crypto map entry, use the following commands starting in global configuration mode:
To add a dynamic crypto map set into a crypto map set, use the following command in global configuration mode:
Command PurposeRouter(config)# crypto map map-name seq-num ipsec-isakmp dynamic dynamic-map-name
Adds a dynamic crypto map set to a static crypto map set.
Configuring SSP Communications
Perform the following commands to enable and debug SSP:
Configuring SSP Communications Example
The following example shows an SSP communications configuration on each HA router:
Router 1:
ssp group 1remote 172.16.31.6redundancy ISPredundancy LANRouter 2:
ssp group 1remote 172.16.31.100redundancy ISPredundancy LANTransferring ISAKMP State
Perform the following commands, starting in configuration mode to enable SSP communication state transfers for ISAKMP:
Transferring IPSec State
Perform the following command in global mode to transfer IPSec state from the active router to the standby router:
Global Mode







