北京金桥世纪H3C认证培训全国总代理

H3C AR系列路由器GRE Over IPSec的典型配置

2011-11-15 13:40:17互联网

【需求】
分部1和分部2通过野蛮IPSec的方式连接到中心,采用GRE-Over-IPSec的方式,在tunnel上运行OSPF协议来实现总部和分部之间的互通。 


 【配置脚本】 
H3C AR系列路由器GRE Over IPSec的典型配置


 【配置脚本】
中心配置脚本
 
#
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的GRE数据流/
rule 0 permit gre source 202.101.1.2 0 destination 202.101.2.2 0
acl number 3002                  /定义从中心到分部2的GRE数据流/
rule 0 permit gre source 202.101.1.2 0 destination 202.101.3.2 0
#
interface Serial2/0
link-protocol ppp
ip address 202.101.1.2 255.255.255.252
ipsec policy center              /在公网出口上应用IPSec policy/
 
 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
#
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
#
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
 

 分部1配置脚本
 #
sysname Branch1
#
ike local-name branch1             /分部1的ike的local-name为:branch1/
#
radius scheme system
#
domain system
#
ike peer center                     /配置到中心的ike peer/
exchange-mode aggressive           /设置IPSec为野蛮方式/
pre-shared-key abc                 /预共享密钥为abc/
id-type name                       /选择名字作为ike协商过程中使用的ID/
remote-name center                 /对端的名字为center/
remote-address 202.101.1.2         /对端的地址为202.101.1.2(中心的公网地址)/
 
 
 ipsec proposal 1                    /定义ipsec proposal/
#
ipsec policy branch1 10 isakmp      /配置到中心的ipsec policy/
security acl 3001                  /指定安全策略所引用的访问控制列表号/
ike-peer center                    /引用ike peer/
proposal 1                         /引用ipsec proposal/
#
acl number 3001                     /定义从分部1到中心的GRE数据流/
rule 0 permit gre source 202.101.2.2 0 destination 202.101.1.2 0
#
 

 interface Serial2/0
link-protocol ppp
ip address 202.101.2.2 255.255.255.252
ipsec policy branch1               /在公网出口上应用IPSec policy/
#
interface Tunnel0                   /配置分部1和中心之间的GRE tunnel/
ip address 10.0.0.2 255.255.255.252
source 202.101.2.2
destination 202.101.1.2
#
interface NULL0
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
 
 interface Ethernet0/0               /配置分部1的内网地址/
ip address 192.168.2.1 255.255.255.0
#
ospf 1
area 0.0.0.10                      /分部1属于area 10/
network 2.2.2.2 0.0.0.0
network 10.0.0.0 0.0.0.3
network 192.168.2.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 202.101.2.1 preference 60
#
user-interface con 0
user-interface vty 0 4
#
return
 
 


·[优惠活动]华三动态 
·[金桥动态]H3CIE+确定开班7月20日 
·[金桥动态]全程金牌讲师讲授,保障顺利考试通过! 
·[知识课堂]【H3C技术】控制OSPF的DR选举 
·[行业资讯]华三(H3C)在中国市场的份额已连续三年超过思科 
·[金桥动态]金桥世纪承办“H3C杯”全国大学生网络技术大赛 


点击这里给我发消息 点击这里给我发消息 点击这里给我发消息 点击这里给我发消息 点击这里给我发消息


开班信息

7月26

H3CNE认证

热报中

8月16

H3C-IMC认证

热报中

7月26

H3CNE认证

热报中

7月26

H3CIE+认证

热报中

8月16

H3C-IMC认证

热报中

7月26

H3CNE培训

热报中

7月26

H3CSE认证

热报中

8月16

H3C无线

热报中

7月26

H3CSE培训

热报中

8月16

H3CIMC培训

热报中

8月16

H3C无线培训

热报中

8月31

H3CEAD培训

热报中

8月16

H3CPME认证

热报中

8月16

H3C安全认证

热报中

8月16

H3CIMC培训

热报中

8月16

H3C无线培训

热报中

8月09

H3CEAD培训

热报中

8月16

H3CPME认证

热报中

8月16

H3C安全认证

热报中

8月16

H3CIMC培训

热报中

8月09

H3C无线培训

热报中

8月09

H3CEAD培训

热报中

8月09

H3CPME认证

热报中

8月09

H3C安全认证

热报中

点击咨询开班情况>>

在线咨询