A-A+

路由器和ASA预共享密钥方式建立IKEV2的L2L VPN的实验

2015年11月21日 站长资讯 暂无评论

一. 测试拓扑

备注:

A.Branch路由器GNS中用的IOS为c7200-adventerprisek9-mz.152-4.S

B.CenterASA用的是ASA8.42的VMWare虚拟机

二.基本配置

A.Branch路由器

  1. interface FastEthernet0/0  
  2.  ip address 202.100.1.1 255.255.255.0  
  3.  no shut  
  4. interface Loopback0  
  5.  ip address 172.16.1.1 255.255.255.0  
  6. ip route 0.0.0.0 0.0.0.0 202.100.1.10  

B.Internet路由器

  1. interface FastEthernet0/0  
  2.  ip address 202.100.1.10 255.255.255.0  
  3.  no shut  
  4. interface FastEthernet0/1  
  5.  ip address 202.100.2.10 255.255.255.0  
  6. no shut  

C.Center-ASA防火墙

  1. interface GigabitEthernet0  
  2.  nameif Outside  
  3.  security-level 0   
  4.  ip address 202.100.2.1 255.255.255.0   
  5.  no shut  
  6. interface GigabitEthernet1  
  7.  nameif Inside  
  8.  security-level 100  
  9.  ip address 10.1.1.1 255.255.255.0   
  10.  no shut  
  11. route Outside 0 0 202.100.2.10  

三.L2L IKE2 VPN配置

A.Branch路由器

①配置IKE2 Policy

  1. crypto ikev2 proposal IKEV2-Proposal   
  2.  encryption 3des aes-cbc-256  
  3.  integrity sha256 sha512  
  4.  group 2 5 14  
  5. crypto ikev2 policy IKEV2-Policy   
  6.  proposal IKEV2-Proposal  

②配置IKE2 Profile

  1. crypto ikev2 keyring IKEV2-Keyring  
  2.  peer CenterASA  
  3.   address 202.100.2.1  
  4.   pre-shared-key Pre-Key  
  5. crypto ikev2 profile IKEV2-Profile  
  6.  match identity remote address 202.100.2.1 255.255.255.255   
  7.  identity local address 202.100.1.1  
  8.  authentication remote pre-share  
  9.  authentication local pre-share  
  10.  keyring local IKEV2-Keyring   

③配置IPSec transform-set

pto ipsec transform-set Trans1 esp-des esp-md5-hmac

crypto ipsec transform-set Trans2 esp-3des esp-sha256-hmac

④配置感兴趣流

ip access-list extended VPN-Traffic

permit ip 172.16.1.0 0.0.0.255 10.1.1.0 0.0.0.255

⑤配置crypto Map并在接口上调用

  1. crypto map Crypto-Map 10 ipsec-isakmp   
  2. http://www.xiaoxiongboke.com   
  3.  set peer 202.100.2.1  
  4.  set transform-set Trans1 Trans2   
  5.  set ikev2-profile IKEV2-Profile  
  6.  match address VPN-Traffic  
  7. interface FastEthernet0/0  
  8.  crypto map Crypto-Map  

B.CenterASA防火墙

①Outside接口激活IKEV2

crypto ikev2 enable Outside

②配置IKE2 Policy

  1. crypto ikev2 policy 10  
  2.  encryption aes-256 des  
  3.  integrity sha256 sha  
  4.  group 2 1  
  5.  prf sha256 sha   

③配置tunnel group

  1. tunnel-group 202.100.1.1 type ipsec-l2l  
  2. tunnel-group 202.100.1.1 ipsec-attributes  
  3.  ikev2 remote-authentication pre-shared-key Pre-Key  
  4.  ikev2 local-authentication pre-shared-key Pre-Key  

④配置IPSec transform-set

  1. crypto ipsec ikev2 ipsec-proposal Transet  
  2.  protocol esp encryption aes-192 des  
  3.  protocol esp integrity sha-1 md5  

⑤配置感兴趣流

access-list VPN-Traffic extended permit ip 10.1.1.0 255.255.255.0 172.16.1.0 255.255.255.0

⑥配置crypto Map并在接口上调用

  1. crypto map Crypto-Map 10 match address VPN-Traffic  
  2. crypto map Crypto-Map 10 set peer 202.100.1.1   
  3. crypto map Crypto-Map 10 set ikev2 ipsec-proposal Transet  
  4. crypto map Crypto-Map interface Outside  

四.测试

A.触发VPN

  1. Branch#ping 10.1.1.18 source 172.16.1.1        
  2. Type escape sequence to abort.  
  3. Sending 5, 100-byte ICMP Echos to 10.1.1.18, timeout is 2 seconds:   
  4. Packet sent with a source address of 172.16.1.1  
  5.   
  6. .!!!!  

B.在Branch路由器的f0/0接口抓包

C.查看加解密

  1. Branch#show crypto engine connections active   
  2. Crypto Engine Connections  
  3.    ID  Type    Algorithm           Encrypt  Decrypt LastSeqN IP-Address  
  4.     1  IPsec   DES+MD5                   9        0        0 202.100.1.1  
  5.     2  IPsec   DES+MD5                   0        9        9 202.100.1.1   
  6.  1005  IKEv2   SHA256+AES256             0        0        0 202.100.1.1  
标签:

给我留言