S2S Ikev2 Configure-Asa
S2S Ikev2 Configure-Asa
Contents
Introduction
Prerequisites
Requirements
Components Used
Background Information
Configure
Scenario 1
Network Diagram
Configuration
Scenario 2
Network Diagram
Configuration
Verify
Static ASA
Dynamic Router
Dynamic Router (with Remote Dynamic ASA)
Troubleshoot
Introduction
This document describes how to configure a site-to-site Internet Key Exchange Version 2 (IKEv2)
VPN tunnel between an Adaptive Security Appliance (ASA) and a Cisco router where the router
has a dynamic IP address and the ASA has a static IP address on the public-facing interfaces.
Prerequisites
Requirements
Components Used
The information in this document is based on these software and hardware versions:
Background Information
This document discusses these scenarios:
● Scenario 1: An ASA is configured with a static IP address that uses a named tunnel group and
the router is configured with a dynamic IP address.
● Scenario 2: An ASA is configured with a dynamic IP address and the router is configured with
a dynamic IP address.
● Scenario 3: This scenario is not discussed here. In this scenario, the ASA is configured with a
static IP address but uses the DefaultL2LGroup tunnel group. The configuration for this is
similar to what is described in the Dynamic Site to Site IKEv2 VPN Tunnel Between Two
ASAs Configuration Example article.
The biggest configuration difference between Scenarios 1 and 3 is the Internet Security
Association and Key Management Protocol (ISAKMP) ID used by the remote router. When the
DefaultL2LGroup is used on the static ASA, the peer's ISAKMP ID on the router must be the
address of the ASA. However, if a named tunnel group is used, the peer's ISAKMP ID on the
router must be the same as the tunnel group name configured on the ASA. This is accomplished
with this command on the router:
Configure
Scenario 1
Network Diagram
Configuration
This section describes the configuration on the ASA and the router based on the Named tunnel-
group configuration.
Static ASA Configuration
interface Ethernet0/0
nameif outside
security-level 0
ip address 201.1.1.2 255.255.255.0
!
crypto ipsec ikev2 ipsec-proposal ESP-AES-SHA
protocol esp encryption aes
protocol esp integrity sha-1
crypto ipsec security-association pmtu-aging infinite
crypto dynamic-map dmap 1 set ikev2 ipsec-proposal ESP-AES-SHA
crypto map vpn 1 ipsec-isakmp dynamic dmap
crypto map vpn interface outside
crypto ca trustpool policy
crypto ikev2 policy 1
encryption 3des
integrity sha
group 5 2
prf sha
lifetime seconds 86400
crypto ikev2 enable outside
The Dynamic Router is configured almost the same way as you normally configure in cases where
the router is a dynamic site for IKEv2 L2L tunnel with the addition of one command as shown
here:
Scenario 2
Note: This configuration is only possible when at least one side is a router. If both sides are
ASAs, this setup does not work at this time. In Version 8.4, the ASA is not able to use the
Fully Qualified Domain Name (FQDN) with the set peer command,
but CSCus37350 enhancement has been requested for future releases.
If the remote ASA's IP address is dynamic as well however has a Fully Qualified Domain Name
assigned for its VPN interface, then rather than define the IP address of the remote ASA, you now
define the FQDN of the remote ASA with this command on the router:
Tip: The dynamic keyword is optional. When you specify the hostname of a remote IPsec
peer via the set peer command, you can also issue the dynamic keyword, which defers the
Domain Name Server (DNS) resolution of the hostname until right before the IPsec tunnel
has been established.
Deferring resolution enables the Cisco IOS software to detect whether the IP address of the
remote IPsec peer has changed. Thus, the software can contact the peer at the new IP
address. If the dynamic keyword is not issued, the hostname is resolved immediately after it
is specified. So, the Cisco IOS software cannot detect an IP address change and, therefore,
attempts to connect to the IP address that it previously resolved.
Network Diagram
Configuration
Dynamic ASA Configuration
The configuration on the ASA is the same as the Static ASA Configuration with only one
exception, which is that the IP address on the physical interface is not statically defined.
Router Configuration
Verify
Use this section in order to confirm that your configuration works properly.
Static ASA
IKEv2 SAs:
interface: outside
Crypto map tag: dmap, seq num: 1, local addr: 201.1.1.2
Dynamic Router
interface: GigabitEthernet0/0
Crypto map tag: vpn, local addr 192.168.1.2
inbound ah sas:
outbound ah sas:
Note: The remote and local ID in this output is the named tunnel-group you defined on the
ASA to verify if you fall on the right tunnel-group. This can also be verified if you debug IKEv2
on either end.
Troubleshoot
This section provides information you can use in order to troubleshoot your configuration.
The Output Interpreter Tool (registered customers only) supports certain show commands. Use
the Output Interpreter Tool in order to view an analysis of show command output.