aaa new-model

$aaaAuthNetwork

$authPolicy

aaa authentication login default local

line vty 0 15
login authentication default
exit
line console 0
login authentication default
  

crypto ikev2 proposal default
$ikev2EncryptionVar
$ikev2IntegrityVar
group $ikev2GroupVar
 
crypto ikev2 policy default
match fvrf any
proposal default

crypto ikev2 keyring key
 peer $nameOfKey
 address $addressOfPeer
 identity address $peerAddress
 pre-shared-key $key

crypto ikev2 profile prof
 match identity remote address $peerAddrNew $siteToSiteSubnetMask 
 authentication remote pre-share
 authentication local pre-share
 keyring local key
 $authNetworkPolicy

crypto ipsec transform-set test_trans $transformSetVar
 mode tunnel
 
crypto ipsec profile test_profile
 set transform-set test_trans
 set ikev2-profile prof
 
crypto ikev2 dpd 10 2 periodic