GRE over IPSec
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1.5 H3C SecPath GRE over IPSec 实验指导
1、组网需求:
某公司杭州和北京各有一个公网出口VPN网关,两网关之间通过建立GRE 隧道,实现
两机构私网互访。由于GRE协议本身无法对私网数据进行加密封装,因此我们配置IPSec 来保护GRE的报文。
2、组网图:
杭州UTM公网地址为202.0.0.1/24,私网地址为192.168.1.1/24;北京F100-A公网地址为202.0.0.2/24,私网地址为192.168.2.1/24,F100-A和VPNB之间建立GRE over IPSec的VPN隧道,实现两个机构的私网互通。
3,UTM命令行配置
System View: return to User View with Ctrl+Z.
[H3C]dis cur
#
#
//配置IKE本地名字
ike local-name utm
#
#
//感兴趣数据流为GRE封装后的报文
acl number 3000
rule 0 permit gre source 202.0.0.1 0 destination 202.0.0.2 0
#
ike peer firewall //配置IKE对等体
pre-shared-key cipher xz8n+yXxN+I= //预共享密钥123456 remote-address 202.0.0.2 //指定对端地址
local-address 202.0.0.1 //指定本端地址
#
ipsec proposal 1 //配置安全提议
#
ipsec policy utm 1 isakmp //配置IPSec策略
security acl 3000
ike-peer firewall
proposal 1
#
interface GigabitEthernet0/0
ip address 192.168.0.1 255.255.255.0
#
interface GigabitEthernet0/1
ip address 202.0.0.1 255.255.255.0
ipsec policy utm //在物理口上应用IPSec策略
#
interface GigabitEthernet0/2
ip address 192.168.1.1 255.255.255.0
#
#
interface Tunnel1 //配置GRE的Tunnel接口
ip address 2.1.1.1 255.255.255.252 //配置Tunnel口的地址source 202.0.0.1 //指定源地址
destination 202.0.0.2 //指定目的地址
#
//配置到达对端私网的路由,下一跳指向本地Tunnel口
ip route-static 192.168.2.0 255.255.255.0 Tunnel1
#
3.2 F100-A配置:
[F100-A]dis cur
#
sysname F100-A
#
ike local-name firewall //ike名称
#
firewall packet-filter enable
firewall packet-filter default permit //默认包过滤为允许
ike peer utm //配置IKE对等体
pre-shared-key 123456
remote-address 202.0.0.1
local-address 202.0.0.2
#
ipsec proposal 1
#
ipsec policy firewall 1 isakmp //配置IPSec策略
security acl 3000
ike-peer utm
proposal 1 //配置安全提议
#
acl number 3000 //配置感兴趣数据流
rule 0 permit gre source 202.0.0.2 0 destination 202.0.0.1 0 interface Ethernet1/0
ip address 202.0.0.2 255.255.255.0
ipsec policy firewall
#
interface Ethernet1/1
ip address 192.168.2.1 255.255.255.0
interface Tunnel1
ip address 2.1.1.2 255.255.255.252
source 202.0.0.2
destination 202.0.0.1
#
interface NULL0
#
//配置到达对端私网的路由
ip route-static 192.168.1.0 255.255.255.0 Tunnel 1 preference 60
#
[F100-A]
4 、验证结果
1,从PC1可以ping通PC2;
2,分别查看UTM和F100A的IPSec安全联盟,可以看到相关信息;
UTM侧:
[H3C]dis ike sa
total phase-1 SAs: 1
connection-id peer flag phase doi
----------------------------------------------------------
13 202.0.0.2 RD|ST 1 IPSEC
14 202.0.0.2 RD|ST 2 IPSEC
5 、思考
1,如果PC1和PC2长时间没有流量,则IPSec sa会不会消失?