华为路由器IPSec -Over-GRE典型配置

需求』
分部1和分部2通过野蛮IPSec的方式连接到中心,采用IPSec-Over-GRE的方式,在 tunnel上运行OSPF协议来实现总部和分部之间的互通。
                 192.168.1.1/24
                       |
                   ROUTER1 202.101.1.2/30
                   |      |
                   |      |
            2.2 ROUTER2  ROUTER3 202.101.3.2/30
                |            |
          192.168.2.1/24    192.168.3.1/24
Center 配置】
#
 sysname Center
#
 ike local-name center                  / 中心 ike local-name 为: center/
#
 router id 1.1.1.1
#
radius scheme system
#
domain system
#
ike peer branch1                        / 配置到分部 1 ike peer/
 exchange-mode aggressive               / 设置 IPSec 为野蛮方式 /
 pre-shared-key abc                     / 预共享密钥为 abc/
 id-type name                           / 选择名字作为 ike 协商过程中使用的 ID/
 remote-name branch1                   / 分部 1 的名字为 branch1/
#
ike peer branch2                        / 配置到分部 2 ike peer/
 exchange-mode aggressive              
 pre-shared-key abc                    
 id-type name                            
 remote-name branch2
#
ipsec proposal 1                        / 定义 ipsec proposal/
#
ipsec policy center 10 isakmp           / 配置到分部 1 ipsec policy/
 security acl 3001                      / 指定安全策略所引用的访问控制列表号 /
 ike-peer branch1                      / 引用 ike peer/
 proposal 1                             / 引用 ipsec proposal/
#
ipsec policy center 20 isakmp           / 到分部 2 的配置和分部 1 的配置类似 / 
 security acl 3002
 ike-peer branch2
 proposal 1
#
acl number 3001                         / 定义从中心到分部 1 的内网数据流 /
 rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
acl number 3002                         / 定义从中心到分部 2 的内网数据流 /
 rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
#
interface Serial2/0
 link-protocol ppp
 ip address 202.101.1.2 255.255.255.252                  
#
interface Tunnel0                       / 配置中心和分部 1 之间的 GRE tunnel/
 ip address 10.0.0.1 255.255.255.252
 source 202.101.1.2
 destination 202.101.2.2
 ipsec policy branch1                   / 在tunnel 0上应用 IPSec policy branch1/
#
interface Tunnel1                       / 配置中心和分部 2 之间的 GRE tunnel/
 ip address 10.0.0.5 255.255.255.252
 source 202.101.1.2
 destination 202.101.3.2
ipsec policy branch2                   / 在tunnel 1上应用 IPSec policy branch2/
 
#
interface NULL0
#
interface LoopBack0
 ip address 1.1.1.1 255.255.255.255
#
interface Ethernet0/0      
 ip address 192.168.1.1 255.255.255.0  / 中心的内网地址 /
#
ospf 1           
 area 0.0.0.10                         / 分部 1 属于 area 10/
  network 10.0.0.0 0.0.0.3
 #
 area 0.0.0.20                         / 分部 2 属于 area 20/
  network 10.0.0.4 0.0.0.3
 #
 area 0.0.0.0                          / 总部属于 area 0/
  network 1.1.1.1 0.0.0.0
network 192.168.1.0 0.0.0.255
#
 ip route-static 0.0.0.0 0.0.0.0 202.101.1.1 preference 60
#
user-interface con 0
user-interface vty 0 4
#
return
 
 
 
  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值