References:
Rob Riker Teaching VPN Concepts on YouTube
CCNP Security Virtual Private Networks SVPN 300-730 Official Cert Guide
r1-hub's initial configuration
en conf t no ip domain lookup hostname r1-hub line con 0 history size 256 logg syn exec-timeout 0 0 width 512 exit interface Loopback0 no shutdown ip address 1.1.1.1 255.255.255.255 ! interface GigabitEthernet1 shutdown ip address 12.1.1.1 255.255.255.0 ! ip access-list extended castle-acl remark Permit statements equal traffic that shall be encrypted. permit ip host 12.1.1.1 host 12.1.1.2 ! crypto ikev2 proposal rook-proposal encryption aes-cbc-256 integrity sha512 group 14 ! crypto ikev2 policy svpn-policy proposal rook-proposal ! crypto ikev2 keyring lion-key peer peer-remote address 12.1.1.2 pre-shared-key cisco ! crypto ikev2 profile side-profile match identity remote address 12.1.1.2 255.255.255.255 authentication remote pre-share authentication local pre-share keyring local lion-key ! crypto ipsec transform-set tset esp-aes esp-sha512-hmac mode tunnel ! crypto map svpn-map 10 ipsec-isakmp set peer 12.1.1.2 set transform-set tset set pfs group14 set ikev2-profile side-profile match address castle-acl ! interface GigabitEthernet1 crypto map svpn-map no shutdown ! end wr
r2-spoke's initial configuration
en conf t no ip domain lookup hostname r2-spoke line con 0 history size 256 logg syn exec-timeout 0 0 width 512 exit interface Loopback0 no shutdown ip address 2.2.2.2 255.255.255.255 ! interface GigabitEthernet1 shutdown ip address 12.1.1.2 255.255.255.0 ! ip access-list extended castle-acl remark Permit statements equal traffic that shall be encrypted. permit ip host 12.1.1.2 host 12.1.1.1 ! crypto ikev2 proposal rook-proposal encryption aes-cbc-256 integrity sha512 group 14 ! crypto ikev2 policy svpn-policy proposal rook-proposal ! crypto ikev2 keyring lion-key peer peer-remote address 12.1.1.1 pre-shared-key cisc0 ! crypto ikev2 profile side-profile match identity remote address 12.1.1.1 255.255.255.255 authentication remote pre-share authentication local pre-share keyring local lion-key ! crypto ipsec transform-set tset esp-aes esp-sha512-hmac mode tunnel ! crypto map svpn-map 10 ipsec-isakmp set peer 12.1.1.1 set transform-set tset set pfs group14 set ikev2-profile side-profile match address castle-acl ! interface GigabitEthernet1 crypto map svpn-map no shutdown ! end wr
Verification
r1-hub#ping 12.1.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds: ..... Success rate is 0 percent (0/5)
r1-hub#show crypto ikev2 sa r1-hub#
r1-hub#show ip cef 12.1.1.2 12.1.1.2/32 attached to GigabitEthernet1
r1-hub#show ip arp 12.1.1.2 Protocol Address Age (min) Hardware Addr Type Interface Internet 12.1.1.2 9 5000.0004.0000 ARPA GigabitEthernet1
r1-hub#debug crypto ikev2 IKEv2 default debugging is on
r1-hub#ping 12.1.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:
*Aug 31 22:58:49.851: IKEv2:(SESSION ID = 1,SA ID = 1):Received Packet [From 12.1.1.2:500/To 12.1.1.1:500/VRF i0:f0] Initiator SPI : 432A641B18EE740F - Responder SPI : F29097FD882FDC3D Message id: 1 IKEv2 IKE_AUTH Exchange RESPONSE Payload contents: NOTIFY(AUTHENTICATION_FAILED)
r1-hub#show run | s crypto ikev2 keyring crypto ikev2 keyring lion-key peer peer-remote address 12.1.1.2 pre-shared-key cisco
r2-spoke#show run | s crypto ikev2 keyring crypto ikev2 keyring lion-key peer peer-remote address 12.1.1.1 pre-shared-key cisc0
crypto ikev2 keyring lion-key peer peer-remote address 12.1.1.1 pre-shared-key cisco ! Trailing white space(s) in above preshared key
r2-spoke#conf t Enter configuration commands, one per line. End with CNTL/Z. r2-spoke(config)#crypto ikev2 keyring lion-key r2-spoke(config-ikev2-keyring)#peer peer-remote r2-spoke(config-ikev2-keyring-peer)#pre-shared-key cisco r2-spoke(config-ikev2-keyring-peer)#do show run | s crypto ikev2 keyring crypto ikev2 keyring lion-key peer peer-remote address 12.1.1.1 pre-shared-key cisco
r1-hub#u all All possible debugging has been turned off
r2-spoke#u all All possible debugging has been turned off
r1-hub#ping 12.1.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
r2-spoke#ping 12.1.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 12.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
r1-hub#show crypto ikev2 sa IPv4 Crypto IKEv2 SA Tunnel-id Local Remote fvrf/ivrf Status 1 12.1.1.1/500 12.1.1.2/500 none/none READY Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:14, Auth sign: PSK, Auth verify: PSK Life/Active Time: 86400/276 sec
r2-spoke#show crypto ikev2 sa IPv4 Crypto IKEv2 SA Tunnel-id Local Remote fvrf/ivrf Status 1 12.1.1.2/500 12.1.1.1/500 none/none READY Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:14, Auth sign: PSK, Auth verify: PSK Life/Active Time: 86400/313 sec