【HCIE】GRE OVER IPSec

本文详细描述了如何通过配置GRE隧道和IPSec协议实现PC1与PC2之间的互通并加密数据。涉及步骤包括设置GRE隧道、动态路由、IPSec安全提议、IKE协商和安全框架应用。GREoverIPsec简化了配置,但后续将探讨更高级的DSVPN技术。
摘要由CSDN通过智能技术生成

实验目标:pc1与pc2互通,且数据加密。

步骤1:配置GRE

R1:

interface Tunnel0/0/0
 ip address 192.168.13.1 255.255.255.0 
 tunnel-protocol gre
 source 12.1.1.1
 destination 23.1.1.3

ip route-static 0.0.0.0 0.0.0.0 12.1.1.2

R3:

interface Tunnel0/0/0
 ip address 192.168.13.3 255.255.255.0 
 tunnel-protocol gre
 source 23.1.1.3
 destination 12.1.1.1

ip route-static 0.0.0.0 0.0.0.0 23.1.1.2

步骤2:配置ospf 动态路由协议

R1:

ospf 1 router-id 1.1.1.1 
 area 0.0.0.0 
  network 192.168.1.254 0.0.0.0 
  network 192.168.13.1 0.0.0.0

R3:

ospf 1 router-id 3.3.3.3 
 area 0.0.0.0 
  network 192.168.3.254 0.0.0.0 
  network 192.168.13.3 0.0.0.0

这时pc1与pc2可以明文通讯

步骤3:配置IPSec安全提议,定义保护方法

R1/R3:

ipsec proposal p1    \\创建安全提议,名称p1
 encapsulation-mode transport    \\模式传输,GRE已提供新IP头部,采用传输模式减少报头
 esp authentication-algorithm sha2-512    \\认证算法
 esp encryption-algorithm aes-256    \\加密算法

步骤4:配置IKE协商和对等体

R1/R3:

ike proposal 1    \\创建IKE协商提议
 encryption-algorithm aes-cbc-256    \\加密算法
 dh group14    \\密钥交换算法
 authentication-algorithm aes-xcbc-mac-96    \\认证算法

R1:

ike peer R3 v2
 pre-shared-key cipher huawei
 ike-proposal 1

R3:

ike peer R1 v2
 pre-shared-key cipher huawei
 ike-proposal 1

步骤5:配置安全框架,调用IPSec安全提议和对等体

R1:

ipsec profile s1
 ike-peer R3
 proposal p1

R3:

ipsec profile s1
 ike-peer R1
 proposal p1

步骤6:GRE隧道接口调用安全框架

R1/R3:

interface Tunnel0/0/0
  ipsec profile s1

这时pc1与pc2可以密文通讯

总结:gre over ipsec 这里gre负责提供vpn隧道,ipsec负责数据加密和安全,各司其职。和单纯的ipsec-vpn比较少了acl 配置,少了静态路由,少了源目地址。gre over ipsec 是比较理想的vpn方式,但也有它的缺点,下期介绍究极体  DSVPN。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值