003 Flex Access VPN
003 Flex Access VPN
IPSEC IKEv2
Internet Key Exchange - version 2
IKEv2 consume less bandwidth and faster (Less number of messages to establish
tunnel).
IKEv2 provides inbuilt NAT Traversal (IKEv1 doesn' t have)
Unlike IKEv1, IKEv2 can actually detect if a VPN tunnel is "alive" or not.
o This feature allows IKEv2 to automatically re-establish a tunnel if its goes down.
IKEv2 supports EAP authentication (while IKEv1 doesn' t.) along with Pre-shared key &
Certificates Authentication.
IKEv2 support Asymmetric Authentication.
o Different pre-shared keys can be used on each site
o One side pre-shared key & other side PKI
o IKEv1 requires symmetric authentication (both have to use the same key & method
of authentication)
IKEV2 supports MOBIKE (while IKEv1 doesn' t)
Instant reconnection upon network/IP address changes (think smartphone switching
between WiFi and 4G).
IKEV2 encryption supports more stronger algorithms than IKEv1 (still faster)
o IKEV2 supports PFS (Perfect Forward Secrecy).
o The IKEV2 VPN protocol uses encryption keys for both sides, making it more secure
than IKEv1
IKEV2 has facility to negotiate multiple sets of selectors.
o IKEV2 has clear method to choose subset of selectors when both sites are not
configured with exact selector values.
IKEV2 offers better reliability through improved sequence numbers and
acknowledgements.
IKEV2 - Phases
IKEV2 also has a two Phase negotiation process.( 4 Exchange messages)
IKE SA (Phase 1) - The SA that carries IKE messages is referred to as the IKE SA (Builds
Secure channel)
Child SA (Phase 2) - The SAs for ESP and AH are child SAs. ( Protect Traffic)
Phase 1 (IKESA)
KE_SAJNIT - Exchange IKE proposals
Phase 2 (IKESA)
CREATE_CHILD_SA - Acceptable proposals for IPSEC SA
IKEV2 - Phase 1
IKEV2 Phase 1 also has a two step negotiation process.
IKEV2 - Phase 1
IKEV2 also has a two Phase negotiation process.
IKEV2 - Phase 2
Second phase in IKEv2 is known as Child Mode.
IKEV2 - Phase 2
Second phase in IKEv2 is known as Child Mode.
CREATE_CHILD_SA
Responder picks a proposal that is acceptable and returns the choice to the initiator in
the CREATE_CHILD_SA response.
IKEV2 - Phase 2
Second phase in IKEv2 is known as Child Mode.
CFG_REQUEST
CFG.REPLY
CFG_SET
CFG ACK
IKEV2-Platform support
Physical Hardware
Cisco ASA introduced support for IPSEC IKEv2 in software version 8.4(1) and later.
https://cfti.cloudappsxisco.com/ITDIT/CFN/isp/index.jsp
Integrity:SHA1
Encryption: 3DES
Group: 2
Authentication:Pre-share
Pre-Shared Key (Rl):cisco123
Pre-Shared Key (R2):aws123
IPSec Parameters
Encryption:ESP-3DES
Authentication:ESP-MDs-HMAC
You can modify the default configuration, which is displayed in the show running-config
all command.
To disable default IKv2 proposal - no crypto ikev2 proposal default
Rl(config-ikev2-proposal)#group 5 2 14 15
Rl(config-ikev2-proposaI)#exit
IKEV2 Policy
IKEV2 Policy
Default one exists can be used or we can create our own policy parameters.
IKEV2 proposal needs to be attached to Policy.
Default IKEV2 proposal is used in the default IKEv2 policy.
Manually configured proposals must be associated to Policy (otherwise no
negotiation)
The proposals are prioritized in the order of listing (if multiple proposal configured)
1KEV2 Profile
Session Verification
Verify IKEv2 SA
Verify IPsec SA
Session Troubleshooting
Background:
• In this lab we are going to show a simple example of configuring a Simple Site-to-Site IKEv2
VPN between two Cisco Routers.
• The configuration is not difficult at all, but as with any technology, if you aren't familiar with it
you're going to struggle through it at first.
• The topology used in this example is very simple. We have R 1 and R2, with a cloud (R5)
simulating connection over internet in between.
TASK
• Configure a IPSec Tunnel to encrypt traffic from R 1 and R2 LAN networks. ( 192.168.1.0 /24
192.168.2.0 /24)
• Integrity : SHA1
• Encryption : 3DES
• Group : 2
• Authentication : Pre-share
IPSec Parameters
• Encryption : ESP-3DES
• As this version is not available on the older 2600 and 3600 routers, they can't be configured
with IKEv2.
Initial Setup:
• An IKEv2 proposal is a collection of transforms used in the negotiation of IKE SAs as part of
the IKE_SA_INIT exchange.
Encryption algorithm
Integrity algorithm
Pseudo-Random Function (PRF) algorithm
Diffie-Hellman (DH) group
You must configure at least one encryption algorithm, one integrity algorithm, and one
DH group for the proposal to be considered incomplete.
The PRF algorithm is the same as the integrity algorithm, and hence, it is not configured
separately.
Multiple transforms can be configured and proposed by the initiator for encryption,
integrity, and group, of which one transform is selected by the responder.
When multiple transforms are configured for a transform type, the order of priority is
from left to right.
• Unlike IKEv1 , the authentication method and SA lifetime are not negotiable in IKEv2, and they
cannot be configured in the IKEv2 proposal.
• Though the crypto ikev2 proposal command looks similar to the IKEvl crypto isakmp policy
command, the IKEv2 proposal configuration supports specifying multiple options for each
transform type.
• IKEv2 proposals are named and not numbered during the configuration.
• Manually configured IKEv2 proposals must be linked with an IKEv2 policy; otherwise, the
proposals are not used in the negotiation.
Note:
• Perform this task to configure the proposals manually if you do not want to use the default
proposal.
• The default IKEv2 proposal requires no configuration and is a collection of commonly used
transforms types, which are as follows:
The IKEv2 Smart Defaults feature minimizes the FlexVPN configuration by covering most of the
usecases. IKEv2 smart defaults can be customized for specific use cases, though this is not
recommended.
we can create our own IKEv2 proposal parameters or use the default proposals.
Note:
• Perform this task to configure the proposals manually if you do not want to use the default
proposal.
• The default IKEv2 proposal requires no configuration and is a collection of commonly used
transforms types, which are as follows:
R1(config-ikev2-proposal) #group 5 2 14 15
R1(config-ikev2-proposal) #exit
R 1 (config-ikev2-policy) # exit
• Perform this task to configure the IKEv2 keyring if the local or remote authentication method
is a preshared key.
• IKEv2 keyring keys must be configured in the peer configuration submode that defines a peer
subblock.
• A peer subblock contains a single symmetric or asymmetric key pair for a peer or peer group
identified by any combination of hostname, identity, and IP address.
• You could use the same key on both the local and remote at both sides if you wanted to, have
the separate keys (site 1 -2 and site 2- 1) just make it a little more secure and give further
flexibility
RI (config-ikev2-keyring) # peer R2
R 1 (config-ikev2-keyring-peer) #exit
RI (config-ikev2-keyring) #exit
R2(config-ikev2-keyring) # peer Rl
R2(config-ikev2-keyring-peer) #exit
RI (config-ikev2-profile) #exit
R2(config-ikev2-profile) # exit
R11(cfg-crypto-trans) #exit
R2(cfg-crypto-trans) #exit
RI (config-ext-nacl) # exit
R2(config-ext-nacl) # exit
R 1 (config-crypto-map) #exit
R2(config-crypto-map) #exit
R2(config-if) #exit
FlexVPN - IKEv2
VPN Options - Discussed
Crypto Maps
VTI
DMVPN
Easy VPN
Allows branch routers to behave as hardware clients that are centrally configured by a
VPN concentrator
Flexible VPN
Cisco's way of integrating all major VPNs into one Umbrella i.e. Flex-VPN or Unified
Overlay VPN
Common umbrella for all IKEv2 IPsec VPNs deployed on IOS routers
o Has technical benefits,but also marketing term
Single configuration approach for all VPN types. (Simplify the deployment of VPN)
Addresses the complexity of having multiple VPN deployments.
Combines
Site-to-site
Remote-access
Hub-and-Spoke topologies
PartialMesh( Spoke-to-Spoke Direct)
FlexVPN Capabilities
https://cfti.cloudappsxisco.com/ITDIT/CFN/isp/index.jsp
Integrity : SHA1
Encryption : 3DES
Group: 2
Authentication : Pre-share
Pre-Shared Key (Rl):cisco123
Pre-Shared Key (R2):aws123
1. IKEV2 proposal(Hash, Encryption, Authentication) - use default one
2. IKEV2 Policy ( Peer, Proposal) - use default one
3. IKEV2 Key ring (only for PSK)
4. Configure IKEv2Profile (remote peer, Authentication method).
5. Define Interesting traffic,(if using Crypto-maps)
6. Configure Transform-set
7. Apply Crypto maps ( match transform-set, Peer, IKev2 Profile, Interesting Traffic)
IPSec Parameters
Encryption : ESP-3DES
Authentication : ESP-MDs-HMAC
Rl(config-ikev2-proposal)#group 5 2 14 15
Rl(config-ikev2-proposaI)#exit
IKEV2 Policy
IKEV2 Policy
Default one exists can be used or we can create our own policy parameters.
IKEV2 proposal needs to be attached to Policy.
Default IKEV2 proposal is used in the default IKEv2 policy.
Manually configured proposals must be associated to Policy (otherwise no
negotiation)
The proposals are prioritized in the order of listing (if multiple proposal configured)
IKEV2 Profile
Session Verification
Verify IKEv2 SA
1. Configure Transform-set
2. Configure IPsec Profile ( Transform-set, IKEv2 Profile)
3. Create tunnel Interface P2P with IPsec Profile applied.
4. Routing Protocol - LAN to LAN Reachability
TASK
• Configure an IPSec tunnel to encrypt traffic from the R1 - R2 to encrypt traffic from the
Note:
• Perform this task to configure the proposals manually if you do not want to use the default
proposal.
• The default IKEv2 proposal requires no configuration and is a collection of commonly used
transforms types, which are as follows:
R2(config-ikev2-keyring) ttpeer R 1
R2(config-ikev2-keyring-peer) ttexit
R2(config-ikev2-keyring) #exit
R1(config-ikev2-keyring) # peer R2
R1(config-ikev2-keyring-peer) #exit
R1(config-ikev2-profile) #exit
R2(config-ikev2-profile) #exit
RI (cfg-crypto-trans) #exit
RI (ipsec-profile) #exit
R2(cfg-crypto-trans) # exit
R2(ipsec-profile) # exit
R 1 (config-if) #exit
R2(config-if) # exit
TASK
RI (config-router) #end
R2(config-router) #end
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (100/ 100), round-trip min/avg/max = 16 /28 /64 ms
NOTE
• In a FlexVPN Hub and Spoke design spoke routers are configured with a normal static
VTI with the tunnel destination of the Hub’s IP address, the Hub however is configured
with a Dynamic VTI.
• The dynamic tunnel spawns a separate “ virtual-access” interface for each spoke tunnel,
inheriting the configuration from the cloned the template.
TASK:
• Confiure tunnels between HUB (R 1) and spokes (R2) using Hub and Spoke FlexVPN
Step 1 -
R2(config-if) #exit
R2(config-if) #exit
NOTE - The above Loopback 1 (192.168.1.0/24) is simulating LAN Network in our example
R2(config-router) #exit
R2(config-ikev2-keyring) # peer R1
R2(config-ikev2-keyring-peer) # exit
R2(config-ikev2-keyring) #exit
R2(config-ikev2-profile) #end
R2(ipsec-profile)#end
R2(config-if) #end
Step 1 –
R1(config-if) #exit
R1(config-if) #end
R1(config-router) #end
R 1 (config-if) #end
R1(config-ikev2-profile) # virtual-template 1
R1(config-ikev2-profile) #end
R1(ipsec-profile)#end
R1(config-if)#end
TASK
• Ensure that all spokes & Hub have rechability to LAN interfaces ( Loopback1)
• Configure tunnels between HUB (Rl ) and spokes (R3/R4 ) using Hub and Spoke FlexVPN
• Ensure that all spokes & Hub have rechability to LAN interfaces ( Loopback 1)
Step 1 -
R3 (config-router) #end
R3 / R4
Rx(config-ikev2-keyring) # peer R1
Rx(config-ikev2-keyring-peer) # exit
R2(config-ikev2-keyring) #exit
R3 / R4
R3 (config-ikev2-profile) #exit
R3 / R4 ( SPOKES)
Rx(ipsec-profile) #exit
R4(config) # end
R3 / R4
R4(config-if) #en
R1(config-ikev2-keyring) # peer R3
R1(config-ikev2-keyring-peer) #exit
R1(config-ikev2-keyring) #peer R4
R1(config-ikev2-keyring-peer) #end
R 1 (config-ikev2-profile) #end
mu
R4#traceroute 192.168.2.2
R4#traceroute 192.168.3.3
R4#
Inject a /32 route into peer's routing table for local IP address at the tunnel level.
Happens through Configuration Exchange messages.
TASK
• Continue based on the previous lab configurations ( R 1 HUB -SPOKES tunnels built )
• Ensure the Spokes should get tunnel IP from pool configured on HUB using IKEv2
Authorization Policy
TASK
• Configure Local pool on HUB (Rl ) with IP range - 1.1.1.2 - 1.1 .1.10
• Ensure the Spokes should get tunnel IP from pool configured on HUB using IKEv2
Authorization Policy.
R1(config-ikev2-author-policy) #exit
R1(config) #end
R1(config-ikev2-profile) #end
Rxfconfig-ikev2-author-policy ) #exit
Rx(config-ikev2-profile)#end
Rx(config-if) #shutdown
Rx(config-if) #end
TASK
• Configure EIGPR 100 to advertise 1.1 .1.0/24) to ensure all routers can
exchanges routes.
On all routers
R1 (config-router) #end
HUB Configuration
SPOKES Configuration
Session Verification
Verify IKEv2 SA
Session Troubleshooting
Troubleshoot the IKEv2 SA
The hub determines that ingress and the egress interfaces (virtual access interfacel and
virtual access interface2) belong to same NHRP network (network D configured on both
the interfaces),
The hub sends out an NHRP redirect message to spoken on virtual access interfacel.
On receiving the redirect, Spokel initiates a resolution request for SPoke2 LAN over the
point-to-point tunnel interface
The resolution request traverses the routed path (Spokel-hub-spoke2)
Spoke2 receives the resolution request on the tunnel interface and retrieves the virtual
template number from the tunnel interface.
Spoke 2 create the virtual access interface to start a crypto channel and establishes
IKEv2 and IPsec security associations (SAs).
Spoke2 installs the necessary NHRP cache entries for Spokel and its network under the
newly created virtual access interface
• and sends out the resolution reply over the virtual access interface.
After receiving the resolution request over the virtual access interface, Spokel installs
the necessary cache entries for Spoke2 and its network.
Spoke 1 also deletes the temporary cache entry pointing to the hub to resolve the
network under tunnel interface.
TASK
Configure FlexVPN to build full mesh spoke to spoke tunnels beween R1 -R2-R3-
R4 ( R1 as HUB)
R 1#ping 25.0.0.2
IIIII
R1(config-if) #exit
R1(config) #end
R1(config-ikev2-author-policy) #exit
R1(config) #end
Configure Phase – 1
R1(config-ikev2-keyring)#peer ANY_PEER
R1(config-ikev2-keyring-peer)#address 0.0.0.0
R1(config-ikev2-keyring-peer)#exit
R1(config-ikev2-keyring)#exit
R1(config-ikev2-profile)#virtual-template 1
R1(config-ikev2-profile)#exit
R1(config) #end
R1(cfg-crypto-trans) #exit
R1(ipsec-profile)#exit
R4(config-ikev2-author-policy)# exit
R4 (config)# end
R4(config-ikev2-keyring-peer)#address 0.0.0.0
R4(config-ikev2-keyring-peer)#exit
R4(config-ikev2-keyring) #exit
R4(config-ikev2-profile) #exit
R4(cfg-crypto-trans) #exit
R4 (ipsec-profile)#end
R4(config-if)#exit
R4(config-ifj #exit
R2(config-router) # exit
R2(config) #
R3 (config-router) # exit
R4(config-router) # exit
R1(config-router) # end
END OF PART 3