A-A+

思科路由器与windows建立L2L IPSecVPN的设置方法

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

下面采用三个思科路由器和一台windows2003主机建立一个链式的网络,连接方法如下图所示,最终通过设置以实现建立L2L IPSecVPN的功能。

1.拓扑:

2.基本配置:

  1. A.R1:  
  2.   
  3. interface FastEthernet0/0  
  4.  ip address 202.100.1.1 255.255.255.0   
  5.  no shut  
  6. interface Loopback0   
  7.  ip address 10.1.1.1 255.255.255.0  
  8. ip route 0.0.0.0 0.0.0.0 202.100.1.2   
  9. B.R2:  
  10. interface FastEthernet0/0   
  11.  ip address 202.100.1.2 255.255.255.0  
  12.  no shut   
  13. interface FastEthernet0/1  
  14.  ip address 202.100.2.2 255.255.255.0   
  15.  no shut  
  16. C.R3:   
  17. interface FastEthernet0/0  
  18.  ip address 20.1.1.3 255.255.255.0   
  19.  no shut  
  20. ip route 0.0.0.0 0.0.0.0 20.1.1.8   
  21. D.Windows2003:  
  22. eth0:   
  23.   IP:202.100.2.8/24  
  24.   GW:202.100.2.2   
  25. eth1:  
  26.   IP:20.1.1.8/24   

启动路由和转发服务。

3.VPN配置:

A.Windows2003:

①创建感兴趣流(双向):

-----在windows中为创建IP筛选器

IP筛选器10-to-20:选择源ip为10.1.1.0/24,目的IP为20.1.1.0/24,协议任意

IP筛选器20-to-10:选择源ip为20.1.1.0/24,目的IP为10.1.1.0/24,协议任意

注意添加时取消向导,取消镜像。

②第一阶段策略:

-----在windows的IP安全策略中为身份验证方法,第一阶段可供配置的东西很少。

②第二阶段策略:

-----在windows的IP安全策略中为筛选器操作:

③.配置crypto map:

----在windows的IP安全策略中为双向数据流的筛选器配置隧道终点,连接类型为所有网络连接。

④.应用crypto map:

----在windows的IP安全策略中为指派IP安全策略。

  1. B.R1:  
  2. ①.配置感兴趣流:   
  3. ip access-list extended vpn  
  4.  permit ip 10.1.1.0 0.0.0.255 20.1.1.0 0.0.0.255   
  5. ②.第一阶段:  
  6. crypto isakmp policy 10   
  7.  hash md5  
  8.  authentication pre-share   
  9.  group 1  
  10.  lifetime 3600   
  11. crypto isakmp key cisco address 202.100.2.8  
  12. ②.第二阶段:   
  13. crypto ipsec transform-set transet ah-md5-hmac esp-des esp-md5-hmac   
  14. ③.配置crypto map:   
  15. crypto map crymap 10 ipsec-isakmp   
  16.  set peer 202.100.2.8   
  17.  set transform-set transet   
  18.  match address vpn   
  19. ④.应用crypto map:  
  20. interface FastEthernet0/0   
  21.  crypto map crymap  

4.测试:

  1. R1#ping 20.1.1.3 source l0  
  2.   
  3. Type escape sequence to abort.  
  4. Sending 5, 100-byte ICMP Echos to 20.1.1.3, timeout is 2 seconds:   
  5. Packet sent with a source address of 10.1.1.1   
  6. .!!!!   
  7. Success rate is 80 percent (4/5), round-trip min/avg/max = 84/98/112 ms  
  8. R1#   

下面为抓包的截图。

标签:

给我留言