A-A+

思科路由器站点到站点IPSEC SVTI VPN配置

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

SVTI与GRE相比节省4个字节的GRE头部

一,Site1配置:

  1. crypto isakmp policy 10    //定义第一阶段ISAKMP安全协商策略,show crypto policy。  
  2.  encr 3des  
  3.  hash md5  
  4.  authentication pre-share  
  5.  group 2  
  6. crypto isakmp key cisco address 61.128.1.1  
  7. !  
  8. !  
  9. crypto ipsec transform-set cisco esp-des esp-md5-hmac   
  10. mode tunnel                 #SVTI技术使用默认的隧道模式  
  11. !  
  12. crypto ipsec profile To_site2_ipsec  
  13.  set transform-set cisco  
  14. !  
  15.   
  16. !  
  17. interface Loopback0  
  18.  ip address 1.1.1.1 255.255.255.0  
  19. !  
  20. interface Tunnel0  
  21.  ip address 172.16.1.1 255.255.255.0  
  22.  tunnel source 202.100.1.1  
  23.  tunnel destination 61.128.1.1  
  24.  tunnel mode ipsec ipv4        #与GRE IPSEC 配置不同,SVTI使用IPSEC IPVE隧道模式  
  25.  tunnel protection ipsec profile To_site2_ipsec  
  26. !  
  27. interface FastEthernet0/0  
  28.  ip address 202.100.1.1 255.255.255.0  
  29.  duplex auto  
  30.  speed auto  
  31. !  
  32. router ospf 1  
  33.  log-adjacency-changes  
  34.  network 1.1.1.0 0.0.0.255 area 0  
  35.  network 172.16.1.0 0.0.0.255 area 0  
  36. !  
  37. no ip http server  
  38. no ip http secure-server  
  39. !  
  40. ip forward-protocol nd  
  41. ip route 0.0.0.0 0.0.0.0 202.100.1.10  
  42. !  
  43. Site1#  

二,Site2配置:

  1. crypto isakmp policy 10  
  2.  encr 3des  
  3.  hash md5  
  4.  authentication pre-share  
  5.  group 2  
  6. crypto isakmp key cisco address 202.100.1.1  
  7. !  
  8. !  
  9. crypto ipsec transform-set cisco esp-des  
  10. !  
  11. crypto ipsec profile To_site1_ipsec  
  12.  set transform-set cisco  
  13. !  
  14. interface Loopback0  
  15.  ip address 2.2.2.2 255.255.255.0  
  16. !  
  17. interface Tunnel0  
  18.  ip address 172.16.1.2 255.255.255.0  
  19.  tunnel source FastEthernet1/0  
  20.  tunnel destination 202.100.1.1  
  21.  tunnel mode ipsec ipv4  
  22.  tunnel protection ipsec profile To_site1_ipsec  
  23. !  
  24. interface FastEthernet0/0  
  25.  no ip address  
  26.  shutdown  
  27.  duplex auto  
  28.  speed auto  
  29. !  
  30. interface FastEthernet1/0  
  31.  ip address 61.128.1.1 255.255.255.0  
  32.  duplex auto  
  33.  speed auto  
  34. !  
  35. no ip http server  
  36. no ip http secure-server   
  37. !  
  38. ip forward-protocol nd  
  39. ip route 0.0.0.0 0.0.0.0 61.128.1.10  
  40. Site2#  

三,测试:

  1. Site1# ping 2.2.2.2 so 1.1.1.1  
  2. Type escape sequence to abort.  
  3. Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:  
  4. Packet sent with a source address of 1.1.1.1  
  5. !!!!!  
  6. Success rate is 100 percent (5/5), round-trip min/avg/max = 24/53/76 ms  
  7. Site1#  

四,状态查看命令:

  1. Site1#show crypto engi conn ac  
  2.   ID Interface            IP-Address      State  Algorithm           Encrypt  Decrypt  
  3.    4 FastEthernet0/0      202.100.1.1     set    HMAC_MD5+3DES_56_C        0        0  
  4. 2002 FastEthernet0/0      202.100.1.1     set    DES+MD5                  26        0  
  5. 2004 FastEthernet0/0      202.100.1.1     set    DES+MD5                   0       25   
  6. Site1#show crypto isakmp sa  
  7. dst             src             state          conn-id slot status  
  8. 202.100.1.1     61.128.1.1      QM_IDLE              4    0 ACTIVE  
  9. Site1#show crypto ipsec sa  
  10. interface: Tunnel0  
  11.     Crypto map tag: Tunnel0-head-0, local addr 202.100.1.1  
  12.    protected vrf: (none)  
  13.    local  ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)    #加密流为任意到任意  
  14.    remote ident (addr/mask/prot/port): (0.0.0.0/0.0.0.0/0/0)  
  15.    current_peer 61.128.1.1 port 500  
  16.      PERMIT, flags={origin_is_acl,}  
  17.     #pkts encaps: 27, #pkts encrypt: 27, #pkts digest: 27   
  18.     #pkts decaps: 26, #pkts decrypt: 26, #pkts verify: 26  
  19.     #pkts compressed: 0, #pkts decompressed: 0  
  20.     #pkts not compressed: 0, #pkts compr. failed: 0  
  21.     #pkts not decompressed: 0, #pkts decompress failed: 0  
  22.     #send errors 0, #recv errors 0  
  23.      local crypto endpt.: 202.100.1.1, remote crypto endpt.: 61.128.1.1  
  24.      path mtu 1500, ip mtu 1500, ip mtu idb FastEthernet0/0  
  25.      current outbound spi: 0xCA895958(3397998936)  
  26.      inbound esp sas:  
  27.       spi: 0x962F864(157481060)  
  28.         transform: esp-des esp-md5-hmac ,  
  29.         in use settings ={Tunnel, }         #使用隧道模式  
  30.         conn id: 2004, flow_id: SW:4, crypto map: Tunnel0-head-0  
  31.   
  32.   
  33.         sa timing: remaining key lifetime (k/sec): (4508692/3542)  
  34.         IV size: 8 bytes  
  35.         replay detection support: Y  
  36.         Status: ACTIVE  
  37.      inbound ah sas:  
  38.      inbound pcp sas:  
  39.      outbound esp sas:  
  40.       spi: 0xCA895958(3397998936)  
  41.         transform: esp-des esp-md5-hmac ,  
  42.         in use settings ={Tunnel, }  
  43.         conn id: 2002, flow_id: SW:2, crypto map: Tunnel0-head-0  
  44.         sa timing: remaining key lifetime (k/sec): (4508692/3540)  
  45.         IV size: 8 bytes  
  46.         replay detection support: Y   
  47.         Status: ACTIVE  
  48.      outbound ah sas:  
  49.      outbound pcp sas:  
  50. Site1#clear crypto sa    #清除、新建IPSEC SA 安全关联。  
  51. Site1#  
标签:

给我留言