The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
Book Contents Book ContentsSecurity and VPN Configuration Guide, Cisco IOS XE 17.x
This module describes how to configure basic IPsec VPNs. IPsec is a framework of open standards developed by the IETF. It provides security for the transmission of sensitive information over unprotected networks such as the Internet. IPsec acts at the network layer, protecting and authenticating IP packets between participating IPsec devices (“peers”), such as Cisco routers.
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.
You must configure Internet Key Exchange (IKE) as described in the module Configuring Internet Key Exchange for IPsec VPNs.
If you decide not to use IKE, you must still disable it as described in the module Configuring Internet Key Exchange for IPsec VPNs.
IKE uses UDP port 500. The IPsec encapsulating security payload (ESP) and authentication header (AH) protocols use protocol numbers 50 and 51, respectively. Ensure that your access lists are configured so that traffic from protocol 50, 51, and UDP port 500 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.
The MIB OID objects are displayed only when an IPsec session is up.
Crypto maps using access control lists (ACLs) that have discontiguous masks are not supported.
A crypto map on a physical interface is not supported, if the physical interface or the source IP is the source interface of a tunnel protection interface.
If you use Network Address Translation (NAT), you should configure static NAT so that IPsec works properly. In general, NAT should occur before the router performs IPsec encapsulation; in other words, IPsec should work with global addresses.
IPsec can be applied to unicast IP datagrams only. Because the IPsec Working Group has not yet addressed the issue of group key distribution, IPsec does not currently work with multicasts or broadcast IP datagrams.
There is a 10-second delay between IPSec SA creations for different ACEs in the crypto ACL
Cisco implements the following standards with this feature:
Note | The term IPsec is sometimes used to describe the entire protocol of IPsec data services and IKE security protocols, and is also sometimes used to describe only the data services. |
Starting from Cisco IOS XE Bengaluru 17.6.x, configuring a weak crypto algorithm generates a warning, but the warning can be safely ignored and does not impact the working of the algorithms. The following example displays a warning message for a weak crypto algorithm:
Device(config-ikev2-proposal)# group 5 %Warning: weaker dh-group is deprecated
The following table lists all the weak algorithms.
IKEv1
IKEv2
IPsec
The component technologies implemented for IPsec include:
Starting from Cisco IOS XE 17.11.1a, as part of security hardening and deprecation of weak ciphers, the options to configure DES, 3DES, MD5, and Diffie-Hellman (DH) groups 1, 2, and 5 are deprecated and are no longer supported. Instead, use AES, SHA, and DH Groups 14 or higher. Additionally, the esp-gmac transforms are also deprecated.
If you want to continue using the weak ciphers, disable CSDL compliance on the device using the crypto engine compliance shield disable command, and reboot.
Cisco IOS also implements Triple DES (168-bit) encryption, depending on the software versions available for a specific platform. Cisco no longer recommends Triple DES (3DES).
Cisco IOS images with strong encryption (including, but not limited to 56-bit data encryption feature sets) are subject to United States government export controls, and have a limited distribution. Images to be installed outside the United States require an export license. Customer orders might be denied or subject to delay due to United States government regulations. Contact your sales representative or distributor for more information, or send an e-mail to export@cisco.com.
IPsec as implemented in Cisco software supports the following additional standards:
IPsec works with the following serial encapsulations: Frame Relay, High-Level Data-Links Control (HDLC), and PPP.
IPsec also works with Generic Routing Encapsulation (GRE) and IPinIP Layer 3, Data Link Switching+ (DLSw+), and Source Route Bridging (SRB) tunneling protocols; however, multipoint tunnels are not supported. Other Layer 3 tunneling protocols may not be supported for use with IPsec.
IPsec provides the following network security services. (In general, the local security policy dictates the use of one or more of these services.)
IPsec provides secure tunnels between two peers, such as two routers. You define which packets are considered sensitive and should be sent through these secure tunnels, and you define the parameters that should be used to protect these sensitive packets by specifying the characteristics of these tunnels. When the IPsec peer recognizes a sensitive packet, the peer sets up the appropriate secure tunnel and sends the packet through the tunnel to the remote peer. (The use of the term tunnel in this chapter does not refer to using IPsec in tunnel mode.)
More accurately, these tunnels are sets of security associations (SAs) that are established between two IPsec peers. The SAs define the protocols and algorithms to be applied to sensitive packets and specify the keying material to be used by the two peers. SAs are unidirectional and are established per security protocol (AH or ESP).
Multiple IPsec tunnels can exist between two peers to secure different data streams, with each tunnel using a separate set of SAs. For example, some data streams only need to be authenticated, while other data streams must both be encrypted and authenticated.
An Internet Key Exchange version 1 (IKEv1) transform set represents a certain combination of security protocols and algorithms. During the IPsec SA negotiation, the peers agree to use a particular transform set for protecting a particular data flow.
An Internet Key Exchange version 2 (IKEv2) proposal is a set of transforms used in the negotiation of IKEv2 SA as part of the IKE_SA_INIT exchange. An IKEv2 proposal is regarded as complete only when it has at least an encryption algorithm, an integrity algorithm, and a Diffie-Hellman (DH) group configured. If no proposal is configured and attached to an IKEv2 policy, then the default proposal is used in the negotiation. The default proposal is a collection of commonly used algorithms which are as follows:
encryption aes-cbc-128 3des integrity sha1 md5 group 5 2
Although the crypto ikev2 proposal command is similar to the crypto isakmp policy priority command, the IKEv2 proposal differs as follows:
To use IKEv2 proposals in negotiation, they must be attached to IKEv2 policies. If a proposal is not configured, then the default IKEv2 proposal is used with the default IKEv2 policy.
Cisco no longer recommends using ah-md5-hmac, esp-md5-hmac, esp-des or esp-3des. Instead, you should use ah-sha-hmac, esp-sha-hmac or esp-aes. For more information about the latest Cisco cryptographic recommendations, see the Next Generation Encryption (NGE) white paper.
A transform set represents a certain combination of security protocols and algorithms. During the IPsec SA negotiation, the peers agree to use a particular transform set for protecting a particular data flow.
During IPsec security association negotiations with IKE, peers search for an identical transform set for both peers. When such a transform set is found, it is selected and applied to the protected traffic as part of both peers’ IPsec SAs. (With manually established SAs, there is no negotiation with the peer, so both sides must specify the same transform set.)
The table below shows allowed transform combinations.
AH Transform (Pick only one.)
AH with the MD5 (Message Digest 5) (an HMAC variant) authentication algorithm. (No longer recommended).
AH with the SHA (Secure Hash Algorithm) (an HMAC variant) authentication algorithm.
ESP Encryption Transform (Pick only one.)
ESP with the 128-bit Advanced Encryption Standard (AES) encryption algorithm.
ESP with the 192-bit AES encryption algorithm.
ESP with the 256-bit AES encryption algorithm.
ESP with the 56-bit Data Encryption Standard (DES) encryption algorithm. (No longer recommended).
ESP with the 168-bit DES encryption algorithm (3DES or Triple DES). (No longer recommended).
ESP Authentication Transform (Pick only one.)
ESP with the MD5 (HMAC variant) authentication algorithm. (No longer recommended).
ESP with the SHA (HMAC variant) authentication algorithm.
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.
Suite-B has the following cryptographic algorithms:
IPSec encryption algorithms use AES-GCM when encryption is required and AES-GMAC for message integrity without encryption.
IKE negotiation uses AES Cipher Block Chaining (CBC) mode to provide encryption and Secure Hash Algorithm (SHA)-2 family containing the SHA-256 and SHA-384 hash algorithms, as defined in RFC 4634, to provide the hash functionality. Diffie-Hellman using Elliptic Curves (ECP), as defined in RFC 4753, is used for key exchange and the Elliptic Curve Digital Signature Algorithm (ECDSA), as defined in RFC 4754, to provide authentication.
Suite-B imposes the following software crypto engine requirements for IKE and IPsec:
Suite-B configuration support is described in the following documents:
For more information on the Suite-B support for certificate enrollment for a PKI, see the Configuring Certificate Enrollment for a PKI feature module.
Device> enable
Enables privileged EXEC mode.
Device# configure terminal
Enters global configuration mode.
Do one of the following:
Device(config)# access-list 100 permit ip 10.0.68.0 0.0.0.255 10.1.1.0 0.0.0.255
Device(config)# ip access-list extended vpn-tunnel
Specifies conditions to determine which IP packets are protected.
Cisco recommends that you configure “mirror image” crypto access lists for use by IPsec and that you avoid using the any keyword.
Repeat Step 3 for each crypto access list you want to create.
After at least one crypto access list is created, a transform set needs to be defined as described in the “Configuring Transform Sets for IKEv1 and IKEv2 Proposals” section.
Next the crypto access lists need to be associated to particular interfaces when you configure and apply crypto map sets to the interfaces. (Follow the instructions in the “Creating Crypto Map Sets” and “Applying Crypto Map Sets to Interfaces” sections).
Perform this task to define a transform set that is to be used by the IPsec peers during IPsec security association negotiations with IKEv1 and IKEv2 proposals.
If you are specifying SEAL encryption, note the following restrictions:
Device> enable
Enables privileged EXEC mode.
Device# configure terminal
Enters global configuration mode.
crypto ipsec transform-set transform-set-name transform1 [ transform2 [ transform3 ]]
Device(config)# crypto ipsec transform-set aesset esp-aes 256 esp-sha-hmac
Defines a transform set and enters crypto transform configuration mode.
mode [ tunnel | transport ]
Device(cfg-crypto-tran)# mode transport
(Optional) Changes the mode associated with the transform set.
Device(cfg-crypto-tran)# end
Exits crypto transform configuration mode and enters privileged EXEC mode.
clear crypto sa [ peer < ip-address | peer-name >| sa map map-name | sa entry destination-address protocol spi ]
Device# clear crypto sa
(Optional) Clears existing IPsec security associations so that any changes to a transform set takes effect on subsequently established security associations.
Manually established SAs are reestablished immediately.
show crypto ipsec transform-set [ tag transform-set-name ]
Device# show crypto ipsec transform-set
(Optional) Displays the configured transform sets.
After you have defined a transform set, you should create a crypto map as specified in theCreating Crypto Map Sets section.
Device> enable
Enables privileged EXEC mode.
Device# configure terminal
Enters global configuration mode.
crypto ikev2 proposal proposal-name
Device(config)# crypto ikev2 proposal proposal-1
Specifies the name of the proposal and enters crypto IKEv2 proposal configuration mode.
encryption transform1 [ transform2 ] .
Device(config-ikev2-proposal)# encryption aes-cbc-128
(Optional) Specifies one or more transforms of the following encryption type:
integrity transform1 [ transform2 ] .
Device(config-ikev2-proposal)# integrity sha1
(Optional) Specifies one or more transforms of the following integrity type:
group transform1 [ transform2 ] .
Device(config-ikev2-proposal)# group 14
(Optional) Specifies one or more transforms of the possible DH group type:
Device(config-ikev2-proposal)# end
Exits crypto IKEv2 proposal configuration mode and returns to privileged EXEC mode.
show crypto ikev2 proposal
Device# show crypto ikev2 proposal
(Optional) Displays the parameters for each IKEv2 proposal.
The following examples show how to configure a proposal:
Device(config)# crypto ikev2 proposal proposal-1 Device(config-ikev2-proposal)# encryption aes-cbc-128 Device(config-ikev2-proposal)# integrity sha1 Device(config-ikev2-proposal)# group 14
crypto ikev2 proposal proposal-2 encryption aes-cbc-128 aes-cbc-192 integrity sha1 sha256 group 14 15
For a list of transform combinations, see Configuring Security for VPNs with IPsec.
The proposal of the initiator is as follows:
Device(config)# crypto ikev2 proposal proposal-1 Device(config-ikev2-proposal)# encryption aes-cbc-128 aes-cbc-196 Device(config-ikev2-proposal)# integrity sha1 sha256 Device(config-ikev2-proposal)# group 14 16
The proposal of the responder is as follows:
Device(config)# crypto ikev2 proposal proposal-2 Device(config-ikev2-proposal)# encryption aes-cbc-196 aes-cbc-128 Device(config-ikev2-proposal)# integrity sha256 sha1 Device(config-ikev2-proposal)# group 16 14
In the scenario, the initiator’s choice of algorithms is preferred and the selected algorithms are as follows:
encryption aes-cbc-128 integrity sha1 group 14
After you have defined a transform set, you should create a crypto map as specified in the Creating Crypto Map Sets section.
This section describes the strength enforcement of the IKE SA encryption ciphers over child IPsec SA encryption cipher. This feature is implemented as a part of the Common Criteria (CC) certification requirement. It ensures that the strength of the IKE (IKEv1 and IKEv2) SA encryption cipher is greater than or equal to the strength of its child IPsec SA encryption cipher.
The following section provides detailed information relating to the Security Association Strength Enforcement feature.
It is a good security practice to configure IPSec such that the strength of the IKE SA encryption cipher is greater than or equal to the strength of its child IPsec SA encryption cipher. The strength enforcement only checks the encryption cipher. It does not check the integrity or key exchange algorithms. The encryption cipher strength comparison is done during session negotiation or establishment. It is not enforced during the configuration of IKE or IPsec. The number of bits in the encryption key determines the strength of the encryption cipher.
This feature is disabled by default. When enabled, the IKEv1 and IKEv2 sessions compare the relative strength of each child SA’s selected encryption cipher. If the child SA’s encryption algorithm is stronger than the IKEv1 or IKEv2 encryption algorithms, the child SA negotiation will be aborted, and a new high-severity syslog and debug message are issued to identify the cause of the failed negotiation.
The following table lists the supported encryption ciphers in order of strength (from highest to lowest). The encryption ciphers on the same line have equivalent strength for purposes of this check.
AES-CBC-256 (default), AES-GCM-256
ESP-AES-128 (default), ESP-GCM-128
This feature is applicable only to the Encapsulating Security Payload (ESP) protocol. There is no impact on the Authentication Header (AH) protocol.
The following are the supported platforms for Security Association Strength Enforcement:
The following section describes the process involved in configuring Security Association Strength Enforcement.
Follow these steps to configure SA strength enforcement.
Device> enable
Enables privileged EXEC mode.
Enter your password if prompted.
Device# configure terminal
Enters global configuration mode.
crypto ipsec ike sa-strength-enforcement
Device(config)# crypto ipsec ike sa-strength-enforcement
Ensures that the strength of the IKE SA encryption cipher is greater than or equal to the strength of its child IPsec SA encryption cipher.
Device(config)# exit
Exits global configuration mode and enters privileged EXEC mode.
The following section provides detailed configuration example relating to the configuration of SA strength enforcement.
Router(config)#crypto ipsec ike sa-strength-enforcement % Warning: Please make sure IKE SA encryption keysize configured, is greater than or equal to IPSec SA encryption keysize. Please run "clear crypto session" to enforce stronger IKE SA encryption immediately.
Use the show crypto session detail command to display the status of the crypto session. The E displayed next to IKE Capabilities in the output indicates that the stronger IKE encryption is enforced.
The following is a sample output from the show crypto session detail command.
Router#show crypto session detail Crypto session current status Code: C - IKE Configuration mode, D - Dead Peer Detection K - Keepalives, N - NAT-traversal, T - cTCP encapsulation X - IKE Extended Authentication, F - IKE Fragmentation R - IKE Auto Reconnect, U - IKE Dynamic Route Update S - SIP VPN, E – Stronger IKE Encryption Enforced Interface: Tunnel0 Uptime: 00:09:29 Session status: UP-ACTIVE Peer: 10.0.149.217 port 500 fvrf: (none) ivrf: (none) Phase1_id: 10.0.149.217 Desc: (none) Session ID: 0 IKEv1 SA: local 10.0.149.203/500 remote 10.0.149.217/500 Active Capabilities: DE connid:1001 lifetime:00:20:30 IPSEC FLOW: permit ip 0.0.0.0/0.0.0.0 0.0.0.0/0.0.0.0 Active SAs: 2, origin: crypto map Inbound: #pkts dec'ed 0 drop 0 life (KB/Sec) 4154754/330 Outbound: #pkts enc'ed 0 drop 0 life (KB/Sec) 4154754/330
Perform the following tasks to create static and dynamic crypto maps.
When IKE is used to establish SAs, the IPsec peers can negotiate the settings they use for the new security associations. This means that you can specify lists (such as lists of acceptable transforms) within the crypto map entry.
Perform this task to create crypto map entries that use IKE to establish SAs. To create IPv6 crypto map entries, you must use the ipv6 keyword with the crypto map command. For IPv4 crypto maps, use the crypto map command without the ipv6 keyword.
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.
Device> enable
Enables privileged EXEC mode.
Device# configure terminal
Enters global configuration mode.
crypto map [ ipv6 ] map-name seq-num [ ipsec-isakmp ]
Device(config)# crypto map static-map 1 ipsec-isakmp
Creates or modifies a crypto map entry, and enters crypto map configuration mode.
match address access-list-id
Device(config-crypto-m)# match address vpn-tunnel
Names an extended access list.
Device(config-crypto-m)# set-peer 192.168.101.1
Specifies a remote IPsec peer—the peer to which IPsec protected traffic can be forwarded.
crypto ipsec security-association dummy
Device(config-crypto-m)# set security-association dummy seconds 5
Enables generating dummy packets. These dummy packets are generated for all flows created in the crypto map.
set transform-set transform-set-name1 [ transform-set-name2. transform-set-name6 ]
Device(config-crypto-m)# set transform-set aesset
Specifies the transform sets that are allowed for this crypto map entry.
set security-association lifetime
Device (config-crypto-m)# set security-association lifetime seconds 2700
(Optional) Specifies a SA lifetime for the crypto map entry.
set security-association level per-host
Device(config-crypto-m)# set security-association level per-host
(Optional) Specifies that separate SAs should be established for each source and destination host pair.
Use this command with care because multiple streams between given subnets can rapidly consume resources.
set pfs [ group1 | group14 | group15 | group16 | group19 | group2 | group20 | group24 | group5 ]
Device(config-crypto-m)# set pfs group14
(Optional) Specifies that IPsec either should ask for password forward secrecy (PFS) when requesting new SAs for this crypto map entry or should demand PFS in requests received from the IPsec peer.
Device(config-crypto-m)# end
Exits crypto map configuration mode and returns to privileged EXEC mode.
show crypto map [ interface interface | tag map-name ]
Device# show crypto map
Displays your crypto map configuration.
Certain configuration changes take effect only when negotiating subsequent SAs. If you want the new settings to take immediate effect, you must clear the existing SAs so that they are reestablished with the changed configuration. If the router is actively processing IPsec traffic, clear only the portion of the SA database that would be affected by the configuration changes (that is, clear only the SAs established by a given crypto map set). Clearing the full SA database should be reserved for large-scale changes, or when the router is processing very little other IPsec traffic.
To clear IPsec SAs, use the clear crypto sa command with appropriate parameters. (Omitting all parameters clears out the full SA database, which clears active security sessions.)
After you have successfully created a static crypto map, you must apply the crypto map set to each interface through which IPsec traffic flows. To complete this task, see the Applying Crypto Map Sets to Interfaces section.
Dynamic crypto map entries specify crypto access lists that limit traffic for which IPsec SAs can be established. A dynamic crypto map entry that does not specify an access list is ignored during traffic filtering. A dynamic crypto map entry with an empty access list causes traffic to be dropped. If there is only one dynamic crypto map entry in the crypto map set, it must specify the acceptable transform sets.
Perform this task to create dynamic crypto map entries that use IKE to establish the SAs.
IPv6 addresses are not supported on dynamic crypto maps.
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.
Device> enable
Enables privileged EXEC mode.
Device# configure terminal
Enters global configuration mode.
crypto dynamic-map dynamic-map-name dynamic-seq-num
Device(config)# crypto dynamic-map test-map 1
Creates a dynamic crypto map entry and enters crypto map configuration mode.
set transform-set transform-set-name1 [ transform-set-name2. transform-set-name6 ]
Device(config-crypto-m)# set transform-set aesset
Specifies the transform sets allowed for the crypto map entry.
match address access-list-id
Device(config-crypto-m)# match address 101
(Optional) Specifies the list number or name of an extended access list.
Although access lists are optional for dynamic crypto maps, they are highly recommended.
Device(config-crypto-m)# set peer 192.168.101.1
(Optional) Specifies a remote IPsec peer. Repeat this step for multiple remote peers.
This is rarely configured in dynamic crypto map entries. Dynamic crypto map entries are often used for unknown remote peers.
set security-association lifetime
Device(config-crypto-m)# set security-association lifetime seconds 7200
(Optional) Overrides (for a particular crypto map entry) the global lifetime value, which is used when negotiating IP Security SAs.
To minimize the possibility of packet loss when rekeying in high bandwidth environments, you can disable the rekey request triggered by a volume lifetime expiry.
set pfs [ group1 | group14 | group15 | group16 | group19 | group2 | group20 | group24 | group5 ]
Device(config-crypto-m)# set pfs group14
(Optional) Specifies that IPsec should ask for PFS when requesting new security associations for this crypto map entry or should demand PFS in requests received from the IPsec peer.
Device(config-crypto-m)# exit
Exits crypto map configuration mode and returns to global configuration mode.
Device(config)# exit
Exits global configuration mode.
show crypto dynamic-map [ tag map-name ]
Device# show crypto dynamic-map
(Optional) Displays information about dynamic crypto maps.
Device# configure terminal
Enters global configuration mode.
crypto map map-name seq-num ipsec-isakmp dynamic dynamic-map-name [ discover ]
Device(config)# crypto map static-map 1 ipsec-isakmp dynamic test-map discover
(Optional) Adds a dynamic crypto map to a crypto map set.
You must enter the discover keyword to enable TED.
Device(config)# exit
Exits global configuration mode.
Certain configuration changes take effect only when negotiating subsequent SAs. If you want the new settings to take immediate effect, you must clear the existing SAs so that they are reestablished with the changed configuration. If the router is actively processing IPsec traffic, clear only the portion of the SA database that would be affected by the configuration changes (that is, clear only the SAs established by a given crypto map set). Clearing the entire SA database must be reserved for large-scale changes, or when the router is processing minimal IPsec traffic.
To clear IPsec SAs, use the clear crypto sa command with appropriate parameters. (Omitting all parameters clears the full SA database, which clears active security sessions.)
After you have successfully created a crypto map set, you must apply the crypto map set to each interface through which IPsec traffic flows. To complete this task, see the “Applying Crypto Map Sets to Interfaces” section.
Perform this task to create crypto map entries to establish manual SAs (that is, when IKE is not used to establish the SAs). To create IPv6 crypto maps entries, you must use the ipv6 keyword with the crypto map command. For IPv4 crypto maps, use the crypto map command without the ipv6 keyword.
Device> enable
Enables privileged EXEC mode.
Device# configure terminal
Enters global configuration mode.
crypto map [ ipv6 ] map-name seq-num [ ipsec-manual ]
Device(config)# crypto map mymap 10 ipsec-manual
Specifies the crypto map entry to be created or modified and enters crypto map configuration mode.
match address access-list-id
Device(config-crypto-m)# match address 102
Names an IPsec access list that determines which traffic should be protected by IPsec and which traffic should not be protected by IPsec in the context of this crypto map entry.
Device(config-crypto-m)# set peer 10.0.0.5
Specifies the remote IPsec peer. This is the peer to which IPsec protected traffic should be forwarded.
set transform-set transform-set-name
Device(config-crypto-m)# set transform-set someset
Specifies which transform set should be used.
Only one transform set can be specified when IKE is not used.
Do one of the following:
Device(config-crypto-m)# set session-key inbound ah 256 98765432109876549876543210987654
Device(config-crypto-m)# set session-key outbound ah 256 fedcbafedcbafedcfedcbafedcbafedc
Sets the AH security parameter indexes (SPIs) and keys to apply to inbound and outbound protected traffic if the specified transform set includes the AH protocol.
Do one of the following:
Device(config-crypto-m)# set session-key inbound esp 256 cipher 0123456789012345
Device(config-crypto-m)# set session-key outbound esp 256 cipher abcdefabcdefabcd
Sets the Encapsulating Security Payload (ESP) Security Parameter Indexes (SPI) and keys to apply to inbound and outbound protected traffic if the specified transform set includes the ESP protocol.
Specifies the cipher keys if the transform set includes an ESP cipher algorithm. Specifies the authenticator keys if the transform set includes an ESP authenticator algorithm.
Device(config-crypto-m)# exit
Exits crypto map configuration mode and returns to global configuration mode.
Device(config)# exit
Exits global configuration mode.
show crypto map [ interface interface | tag map-name ]
Device# show crypto map
Displays your crypto map configuration.
For manually established SAs, you must clear and reinitialize the SAs for the changes to take effect. To clear IPsec SAs, use the clear crypto sa command with appropriate parameters. (Omitting all parameters clears the entire SA database, which clears active security sessions.)
After you have successfully created a crypto map set, you must apply the crypto map set to each interface through which IPsec traffic flows. To complete this task, see the “Applying Crypto Map Sets to Interfaces” section.
You must apply a crypto map set to each interface through which IPsec traffic flows. Applying the crypto map set to an interface instructs the device to evaluate the interface’s traffic against the crypto map set and to use the specified policy during connection or security association negotiation on behalf of traffic to be protected by the crypto map.
Perform this task to apply a crypto map to an interface.
Device> enable
Enables privileged EXEC mode.
Device# configure terminal
Enters global configuration mode.
interface type / number
Device(config)# interface FastEthernet 0/0
Configures an interface and enters interface configuration mode.
crypto map map-name
Device(config-if)# crypto map mymap
Applies a crypto map set to an interface.
Device(config-if)# exit
Exits interface configuration mode and returns to global configuration mode.
crypto map map-name local-address interface-id
Device(config)# crypto map mymap local-address loopback0
(Optional) Permits redundant interfaces to share the same crypto map using the same local identity.
Device(config)# exit
(Optional) Exits global configuration mode.
show crypto map [ interface interface ]
Device# show crypto map
(Optional) Displays your crypto map configuration
This example shows how a static crypto map is configured and how an AES is defined as the encryption method:
crypto isakmp policy 10 encryption aes 256 authentication pre-share group 14 lifetime 180 crypto isakmp key cisco123 address 10.0.110.1 ! ! crypto ipsec transform-set aesset esp-aes 256 esp-sha-hmac mode transport ! crypto map aesmap 10 ipsec-isakmp set peer 10.0.110.1 set transform-set aesset match address 120 ! ! ! voice call carrier capacity active ! ! mta receive maximum-recipients 0 ! ! interface FastEthernet0/0 ip address 10.0.110.2 255.255.255.0 ip nat outside no ip route-cache no ip mroute-cache duplex auto speed auto crypto map aesmap ! interface Serial0/0 no ip address shutdown ! interface FastEthernet0/1 ip address 10.0.110.1 255.255.255.0 ip nat inside no ip route-cache no ip mroute-cache duplex auto speed auto ! ip nat inside source list 110 interface FastEthernet0/0 overload ip classless ip route 0.0.0.0 0.0.0.0 10.5.1.1 ip route 10.0.110.0 255.255.255.0 FastEthernet0/0 ip route 172.18.124.0 255.255.255.0 10.5.1.1 ip route 172.18.125.3 255.255.255.255 10.5.1.1 ip http server ! ! access-list 110 deny ip 10.0.110.0 0.0.0.255 10.0.110.0 0.0.0.255 access-list 110 permit ip 10.0.110.0 0.0.0.255 any access-list 120 permit ip 10.0.110.0 0.0.0.255 10.0.110.0 0.0.0.255 !
Cisco IOS commands
IKE, IPsec, and PKI configuration commands
Configuring Internet Key Exchange for IPsec VPNs
Suite-B SHA-2 family (HMAC variant) and Elliptic Curve (EC) key pair configuration
Configuring Internet Key Exchange for IPsec VPNs
Suite-B Integrity algorithm type transform configuration
Configuring Internet Key Exchange Version 2 (IKEv2)
Suite-B Elliptic Curve Digital Signature Algorithm (ECDSA) signature (ECDSA-sig) authentication method configuration for IKEv2
Configuring Internet Key Exchange Version 2 (IKEv2)
Suite-B Elliptic curve Diffie-Hellman (ECDH) support for IPsec SA negotiation
Suite-B support for certificate enrollment for a PKI
Configuring Certificate Enrollment for a PKI
Recommended cryptographic algorithms
To locate and download MIBs for selected platforms, Cisco IOS software releases, and feature sets, use Cisco MIB Locator found at the following URL:
Security Architecture for the Internet Protocol
IP Authentication Header
The Use of HMAC-MD5-96 within ESP and AH
The Use of HMAC-SHA-1-96 within ESP and AH
The ESP DES-CBC Cipher Algorithm With Explicit IV
IP Encapsulating Security Payload (ESP)
The Internet IP Security Domain of Interpretation for ISAKMP
Internet Security Association and Key Management Protocol (ISAKMP)
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.
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.
Advanced Encryption Standard
This feature adds support for the new encryption standard AES, which is a privacy transform for IPsec and IKE and has been developed to replace DES.
The following commands were modified by this feature: crypto ipsec transform-set , encryption (IKE policy) , show crypto ipsec transform-set , show crypto isakmp policy .
Suite-B Support in IOS SW Crypto
Suite-B adds support for four user interface suites of cryptographic algorithms for use with IKE and IPSec that are described in RFC 4869. Each suite consists of an encryption algorithm, a digital signature algorithm, a key agreement algorithm, and a hash or message digest algorithm.
The following command was modified by this feature: crypto ipsec transform-set .
IKE Security Association (SA) Strength Enforcement
Cisco IOS XE 17.13
This feature ensures that the strength of the IKE (IKEv1 and IKEv2) SA encryption cipher is greater than or equal to the strength of its child IPsec SA encryption cipher.
The crypto ipsec ike sa-strength-enforcement command was introduced to enable this feature.
anti-replay —Security service where the receiver can reject old or duplicate packets to protect itself against replay attacks. IPsec provides this optional service by use of a sequence number combined with the use of data authentication. Cisco IOS XE IPsec provides this service whenever it provides the data authentication service, except for manually established SAs (that is, SAs established by configuration and not by IKE).
data authentication —Verification of the integrity and origin of the data. Data authentication can refer either to integrity alone or to both of these concepts (although data origin authentication is dependent upon data integrity).
data confidentiality —Security service in which the protected data cannot be observed.
data flow —Grouping of traffic, identified by a combination of source address or mask, destination address or mask, IP next protocol field, and source and destination ports, where the protocol and port fields can have the values of any . IPsec protection is applied to data flows.
IKE —Internet Key Exchange. IKE establishes a shared security policy and authenticates keys for services (such as IPSec) that require keys. Before any IPSec traffic can be passed, each router/firewall/host must verify the identity of its peer. This can be done by manually entering preshared keys into both hosts or by a CA service.
IPsec —IP Security. A framework of open standards that provides data confidentiality, data integrity, and data authentication between participating peers. IPSec provides these security services at the IP layer. IPSec uses IKE to handle the negotiation of protocols and algorithms based on local policy and to generate the encryption and authentication keys to be used by IPSec. IPSec can protect one or more data flows between a pair of hosts, between a pair of security gateways, or between a security gateway and a host.
peer —In the context of this module, a “peer” is a router or other device that participates in IPsec.
PFS —perfect forward secrecy. Cryptographic characteristic associated with a derived shared secret value. With PFS, if one key is compromised, previous and subsequent keys are not compromised, because subsequent keys are not derived from previous keys.
SA —security association. Description of how two or more entities use security services in the context of a particular security protocol (AH or ESP) to communicate securely on behalf of a particular data flow. The transform and the shared secret keys are used for protecting the traffic.
SPI —security parameter index. A number which, together with a destination IP address and security protocol, uniquely identifies a particular security association. Without IKE, the SPI is manually specified for each security association.
transform —List of operations performed on a dataflow to provide data authentication, data confidentiality, and data compression. For example, one transform is the ESP protocol with the HMAC-MD5 authentication algorithm; another transform is the AH protocol with the 56-bit DES encryption algorithm and the ESP protocol with the HMAC-SHA authentication algorithm.
tunnel —In the context of this module, “tunnel” is a secure communication path between two peers, such as two routers. It does not refer to using IPsec in tunnel mode.