GRE over ipsec组网实验

前言:
概念明确:
1、VPN:

VPN(虚拟专用网络)是一个在公共网络上建立起一个逻辑的、专用的隧道的技术。

2、GRE:

GRE(通用路由封装)是一种封装协议,它允许一种协议的报文封装在另一种协议的数据包中,

从而实现VPN传输。

3、IPSec:
IPSec(Internet Protocol Security)是一种由多种协议组成的协议栈,在建立IPSec链接前,会先使用IKE协议来进行密钥的交换和认证,建立安全关联(SA)。

实验理由:在vpn加密的过程中,之所以要建立GRE over IPsec,是因为ipsec是不能抓去组播流量的(如视频流等),需要用到gre封装。但GRE封装是没有保密的,因此需要加上ipsec的esp加密。

实验目标:建立起一个GRE与IPSec结合使用的VPN连接。

实验拓扑如下:
 

配置流程:

1、配置ip/区域/路由

Fw1:

int g1/0/0

ip add 10.1.1.1 24

service-manage ping permit

q

int g1/0/1

ip add 20.1.1.1 24

service-manage ping permit

q

firewall zone trust

add int g1/0/0

q

firewall zone untrust

add int g1/0/1

ospf 1

area 0

network 20.1.1.0 0.0.0.255

Fw2:

int g1/0/0

ip add 10.1.2.1 24

service-manage ping permit

q

int g1/0/1

ip add 30.1.1.1 24

service-manage ping permit

q

firewall zone trust

add int g1/0/0

q

firewall zone untrust

add int g1/0/1

q

ospf 1

area 0

network 30.1.1.0 0.0.0.255

AR1:

int g0/0/0

ip add 20.1.1.2 24

int g0/0/1

ip add 30.1.1.2 24

q

ospf 1

area 0

network 30.1.1.0 0.0.0.255

network 20.1.1.0 0.0.0.255

检查

ip均已正确配置。

2、配置GRE隧道接口

FW1:
int Tunnel 1

ip add 1.1.1.1 24

tunnel-protocol gre

source 20.1.1.1

destination 30.1.1.1

q

firewall zone trust

add int tunnel 1

q

ip route-static 10.1.2.0 24 tunnel 1

FW2:

int Tunnel 1

ip add 2.2.2.2 24

tunnel-protocol gre

source 30.1.1.1

destination 20.1.1.1

firewall zone trust

add int tunnel 1

q

ip route-static 10.1.1.0 24 tunnel 1

3、配置gre安全策略

FW1、FW2相同:

security-policy

rule name vpnU_T

source-zone trust untrust

destination-zone trust untrust

source-address 10.1.1.0 24

source-address 10.1.2.0 24

destination-address 10.1.1.0 24

destination-address 10.1.2.0 24

action permit

q

rule name lun

source-zone local untrust trust

destination-zone local untrust trust

action permit

验证gre:
 

GRE配置完成

4、ipsec配置

(由于搭配gre使用,因此不配置感兴趣流acl)

4.1:ike协商:

ike proposal 10

(使用默认配置:

4.2:ike对等体:

ike peer fw2

pre-shared-key 1234

ike-proposal 10

remote-address 30.1.1.1

4.3:ipsec协商

ipsec proposal 10

使用默认配置:
 

4.4:ipsec策略:

ipsec profile fw2

ike-peer fw2

proposal 10

4.5:gre隧道接口配置:

int tunnel 1

keepalive

ipsec profile fw1

fw2配置:
ike proposal 10

q

ike peer fw2

pre-shared-key 1234

ike-proposal 10

remote-address 20.1.1.1

q

ipsec proposal 10

q

ipsec profile fw1

ike-peer fw1

proposal 10

q

int tunnel 1

keepalive

ipsec profile fw2

ping验证:

防火墙ipsec验证:

抓包,发现esp加密报文:

实验成功

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值