A-A+

华为路由器的GRE OVER IPSEC的应用

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

公司内部的网络并不是很复杂,典型的星型结构。总部与多个分支建立了VPN,同时还需要跑一些组播以及OSPF的东西,所以采用了比较经典的 GRE OVER IPSEC 的配置。之前的H3C设备上配置没有发现什么问题,但最近基于设备性能的考虑准备换用华为的AR系列产品。相对而言华为的设备较H3C价格稍贵,但性能上要强不少。此次使用的设备主要是华为AR2220以及AR151。

华为设备在配置ipsec vpn的时候如果采用传统的方式配置则每个2220路由器只能和16个分支建立vpn连接,超过16个变无法配置成功。对于这个问题华为提出了在核心网一侧的路由器上采用策略模板的方式来建立多个ipsec vpn,这种方式在核心网一侧不需要配置ACL,在分支一侧需要指定acl。另外如果华为跟其他厂商的设备配置IPSEC VPN 则应该选择配置v1版本的ike peer。以下是我核心网采用2220 分支采用151的配置。
网络结构比较简单,拓扑图如下:

  1. <SZ_CR_1>disp cur  
  2. [V200R002C01SPC200]  
  3. #  
  4.  sysname SZ_CR_1  
  5. #  
  6.  snmp-agent local-engineid 800007DB03E0247F20C08B  
  7.  snmp-agent   
  8. #  
  9.  drop illegal-mac alarm  
  10. #  
  11. acl number 3000    
  12. #  
  13. ipsec proposal 1  
  14. #  
  15. ike peer br v1  
  16.  pre-shared-key simple 123  
  17.  local-address 202.96.1.9  
  18. #  
  19. ipsec policy-template br 1  
  20.  ike-peer br  
  21.  proposal 1  
  22. #  
  23. ipsec policy cr 1 isakmp template br  
  24. #  
  25. aaa   
  26.  authentication-scheme default              
  27.  authorization-scheme default  
  28.  accounting-scheme default  
  29.  domain default   
  30.  domain default_admin   
  31.  local-user admin password cipher %$%${*|FV4WA)E/|SkH9I0I7gulc%$%$  
  32.  local-user admin privilege level 3  
  33.  local-user admin service-type telnet ssh  
  34. #  
  35. interface GigabitEthernet0/0/0  
  36.  description connect to sz_cs_1/0/0/48  
  37.  ip address 20.0.29.1 255.255.255.252   
  38. #  
  39. interface GigabitEthernet0/0/1  
  40.  description connect to internet  
  41.  ip address 202.96.1.1 255.255.255.252   
  42.  ipsec policy cr  
  43. #  
  44. interface GigabitEthernet0/0/2  
  45. #  
  46. interface NULL0  
  47. #  
  48. interface Tunnel0/0/0  
  49.  description connect to sz_brr_1  
  50.  ip address 20.0.1.1 255.255.255.248        
  51.  tunnel-protocol gre  
  52.  source 202.96.1.9  
  53.  destination 202.96.1.1  
  54. #  
  55. ip route-static 20.0.0.0 255.255.255.248 Tunnel0/0/0  
  56. ip route-static 202.96.0.0 255.255.0.0 202.96.1.2  
  57. #  
  58. user-interface con 0  
  59.  authentication-mode password  
  60.  set authentication password cipher %$%$}vVu=u!Vr.+&il)6m3#',"vm+Mx[TaM\W!+abu=@)VPR#(|w%$%$  
  61. user-interface vty 0 4  
  62.  authentication-mode aaa  
  63. user-interface vty 16 20  
  64. #  
  65. voice   
  66.  #  
  67.  diagnose  
  68. #  
  69. Return  
  70. <sz_br_1>disp cur  
  71. [V200R002C01SPC200]  
  72. #  
  73.  sysname sz_br_1  
  74. #  
  75.  snmp-agent local-engineid 800007DB03CCCC8174F532  
  76.  snmp-agent   
  77. #  
  78.  drop illegal-mac alarm  
  79. #  
  80. acl number 3000    
  81.  rule 0 permit ip source 202.96.1.9 0.0.0.0  destination 202.96.1.1  0.0.0.0  
  82.  #  
  83. ipsec proposal 1  
  84. #  
  85. ike peer cr v1  
  86.  pre-shared-key simple 123  
  87.  local-address 202.96.1.9  
  88.  remote-address 202.96.1.1  
  89. #  
  90. ipsec policy br 1 isakmp  
  91.  security acl 3000  
  92.  ike-peer cr  
  93.  proposal 1  
  94. #                                           
  95. aaa   
  96.  authentication-scheme default  
  97.  authorization-scheme default  
  98.  accounting-scheme default  
  99.  domain default   
  100.  domain default_admin   
  101.  local-user admin password cipher %$%$Z'#iOA:^$!]-{U(C97{XhH~6%$%$  
  102.  local-user admin privilege level 3  
  103.  local-user admin service-type telnet ssh  
  104. #  
  105. interface Vlanif1  
  106.  ip address 20.0.0.1 255.255.255.248   
  107. #  
  108. interface Ethernet0/0/0  
  109.  port link-type access  
  110. #  
  111. interface Ethernet0/0/1  
  112. #  
  113. interface Ethernet0/0/2  
  114. #  
  115. interface Ethernet0/0/3  
  116. #  
  117. interface Ethernet0/0/4  
  118.  description connect to internet            
  119.  ip address 202.96.1.9 255.255.255.252   
  120.  ipsec policy br  
  121. #  
  122. interface NULL0  
  123. #  
  124. interface Tunnel0/0/0  
  125.  description connect to sz_cr_1  
  126.  ip address 20.0.1.2 255.255.255.248   
  127.  tunnel-protocol gre  
  128.  source 202.96.1.1  
  129.  destination 202.96.1.9  
  130. #  
  131. ip route-static 20.0.0.0 255.255.0.0 Tunnel0/0/0  
  132. ip route-static 202.96.0.0 255.255.0.0 202.96.1.10  
  133. #  
  134. user-interface con 0  
  135.  authentication-mode password  
  136.  set authentication password cipher %$%$n~z&;^8SvD+%tH'4{pn0,md[".Y^'ppeO$Ut&ZSQb*73*sje%$%$  
  137. user-interface vty 0  
  138.  authentication-mode aaa  
  139.  user privilege level 15  
  140. user-interface vty 1 4  
  141.  authentication-mode aaa  
  142. user-interface vty 16 20                    
  143. #  
  144. voice   
  145.  #  
  146.  diagnose  
  147. #  
  148. return  
  149. <sz_br_1>   
标签:

给我留言