GRE over IPSec

即 IPSec 在最外层(或称最底层)。意思是先在 R1 与 R2 之间建立 IPSec Tunnel,把里面的 GRE Tunnel 整个进行加密,Routing Protocol 在 GRE Tunnel 里面完成 Route 交换,最后 Data 在 GRE Tunnel 里面传送。从下图所见,因整个 GRE Tunnel 被加密,所以里面的 Routing Protocol 及 Data 都会被加密。

GRE over IPSec隧道示例

配置思路

采用如下思路配置虚拟隧道接口建立GRE over IPSec隧道:
1.配置物理接口的IP地址和到对端的静态路由,保证两端路由可达。
2.配置GRE Tunnel接口。
3.配置IPSec安全提议,定义IPSec的保护方法。
4.配置IKE对等体,定义对等体间IKE协商时的属性。
5.配置安全框架,并引用安全提议和IKE对等体。
6.在Tunnel接口上应用安全框架,使接口具有IPSec的保护功能。
7.配置Tunnel接口的转发路由,将需要IPSec保护的数据流引到Tunnel接口。

#sysname RouterA
#
ipsec proposal tran1esp authentication-algorithm sha2-256esp encryption-algorithm aes-128
#
ike proposal 5encryption-algorithm aes-128dh group14authentication-algorithm sha2-256authentication-method pre-shareintegrity-algorithm hmac-sha2-256prf hmac-sha2-256
#
ike peer spubundo version 2pre-shared-key cipher %^%#JvZxR2g8c;a9~FPN~n'$7`DEV&=G(=Et02P/%\*!%^%#ike-proposal 5
#
ipsec profile profile1ike-peer spubproposal tran1
#
interface Tunnel0/0/0ip address 192.168.1.1 255.255.255.0tunnel-protocol gresource 1.1.1.1destination 2.1.1.1ipsec profile profile1
#
interface GigabitEthernet1/0/0ip address 1.1.1.1 255.255.255.0
#
interface GigabitEthernet2/0/0ip address 10.1.1.1 255.255.255.0
#
ip route-static 2.1.1.0 255.255.255.0 1.1.1.2
ip route-static 10.1.2.0 255.255.255.0 tunnel0/0/0
#
return•RouterB的配置文件#sysname RouterB
#
ipsec proposal tran1esp authentication-algorithm sha2-256esp encryption-algorithm aes-128
#
ike proposal 5encryption-algorithm aes-128dh group14authentication-algorithm sha2-256authentication-method pre-shareintegrity-algorithm hmac-sha2-256prf hmac-sha2-256
#
ike peer spuaundo version 2pre-shared-key cipher %^%#K{JG:rWVHPMnf;5\|,GW(Luq'qi8BT4nOj%5W5=)%^%#ike-proposal 5
#
ipsec profile profile1ike-peer spuaproposal tran1
#
interface Tunnel0/0/0ip address 192.168.1.2 255.255.255.0tunnel-protocol gresource 2.1.1.1destination 1.1.1.1ipsec profile profile1
#
interface GigabitEthernet1/0/0ip address 2.1.1.1 255.255.255.0
#
interface GigabitEthernet2/0/0ip address 10.1.2.1 255.255.255.0
#
ip route-static 1.1.1.0 255.255.255.0 2.1.1.2
ip route-static 10.1.1.0 255.255.255.0 tunnel0/0/0
#
return

IPSec over GRE

即 GRE 在最外层(或称最底层)。在 R1 与 R2 之间先建立 GRE Tunnel,在 GRE Tunnel 里面再建 IPSec Tunnel,有趣的是:由于 IPSec 并不支缓 Multicast,因此通常把 Routing Protocol 建在 GRE Tunnel 进行 Route 交换,并无加密,只有 Data 在 IPSec Tunnel 里面被加密。如坚持把 Routing Protocol 也放在 IPSec Tunnel 中,可以透过设定 Unicast IP Address 建立 Neighbor,但这样做 Router 就无法自动建立 Neighbor 关系,如果 Router 数量多起来,设定方面肯定比较痛苦。

IPSec over GRE隧道示例

配置思路

采用如下思路配置虚拟隧道接口建立IPSec over GRE隧道:
1.配置物理接口的IP地址和到对端的静态路由,保证两端路由可达。
2.配置GRE Tunnel接口。
3.配置IPSec安全提议,定义IPSec的保护方法。
4.配置IKE对等体,定义对等体间IKE协商时的属性。
5.配置安全框架,并引用安全提议和IKE对等体。
6.配置IPSec Tunnel接口,将IPSec Tunnel的源接口配置为GRE Tunnel接口;且IPSec Tunnel的目的地址的路由必须从GRE Tunnel接口出去。
7.在IPSec Tunnel接口上应用安全框架,使接口具有IPSec的保护功能。
8.配置IPSec Tunnel接口的转发路由,将需要IPSec保护的数据流引到IPSec Tunnel接口。

•Router_1的配置文件
#sysname Router_1
#
ipsec proposal tran1esp authentication-algorithm sha2-256esp encryption-algorithm aes-128
#
ike proposal 5encryption-algorithm aes-128dh group14authentication-algorithm sha2-256authentication-method pre-shareintegrity-algorithm hmac-sha2-256prf hmac-sha2-256
#
ike peer spubundo version 2pre-shared-key cipher %^%#JvZxR2g8c;a9~FPN~n'$7`DEV&=G(=Et02P/%\*!%^%#ike-proposal 5
#
ipsec profile profile1ike-peer spubproposal tran1
#
interface Tunnel0/0/0ip address 192.168.1.1 255.255.255.0tunnel-protocol gresource 1.1.1.1destination 2.1.1.1
#
interface Tunnel0/0/1ip address 192.168.2.1 255.255.255.0tunnel-protocol ipsecsource Tunnel0/0/0destination 192.168.1.2ipsec profile profile1
#
interface GigabitEthernet1/0/0ip address 1.1.1.1 255.255.255.0
#
interface GigabitEthernet2/0/0ip address 10.1.1.1 255.255.255.0
#
ip route-static 10.1.2.0 255.255.255.0 tunnel0/0/1
ip route-static 2.1.1.0 255.255.255.0 1.1.1.2
#
return•Router_2的配置文件#sysname Router_2
#
ipsec proposal tran1esp authentication-algorithm sha2-256esp encryption-algorithm aes-128
#
ike proposal 5encryption-algorithm aes-128dh group14authentication-algorithm sha2-256authentication-method pre-shareintegrity-algorithm hmac-sha2-256prf hmac-sha2-256
#
ike peer spuaundo version 2pre-shared-key cipher %^%#K{JG:rWVHPMnf;5\|,GW(Luq'qi8BT4nOj%5W5=)%^%#ike-proposal 5
#
ipsec profile profile1ike-peer spuaproposal tran1
#
interface Tunnel0/0/0ip address 192.168.1.2 255.255.255.0tunnel-protocol gresource 2.1.1.1destination 1.1.1.1
#
interface Tunnel0/0/1ip address 192.168.2.2 255.255.255.0tunnel-protocol ipsecsource Tunnel0/0/0destination 192.168.1.1ipsec profile profile1
#
interface GigabitEthernet1/0/0ip address 2.1.1.1 255.255.255.0
#
interface GigabitEthernet2/0/0ip address 10.1.2.1 255.255.255.0
#
ip route-static 10.1.1.0 255.255.255.0 tunnel0/0/1
ip route-static 1.1.1.0 255.255.255.0 2.1.1.2
#
return

GRE over IPSec vs IPSec over GRE相关推荐

  1. DCN-2655 gre隧道 vpn 嵌入IPSec配置:

    DCN-2655 gre隧道 vpn 嵌入IPSec配置: RT1配置: Ip route 183.203.10.128 255.255.255.252 183.203.10.2 Interface ...

  2. gre模考软件java.exe_5款GRE模考软件神器大汇总

    原标题:5款GRE模考软件神器大汇总 1.GREPractice 4.1模考软件 与Magoosh GRE基本吻合,更接近真题,另外赠送有6套题库,可以练习或模考,Magoosh verbal.数学. ...

  3. HCIA--访问控制技术--NAT、ACL、aaa、IPSec、vpn、GRE

    HCIA–访问控制技术–NAT.ACL.aaa.IPSec VPN.GRE 一.网络地址转换(NAT) 工作原理: 借助于NAT,私有(保留)地址的"内部"网络通过路由器发送数据包 ...

  4. 五分钟了解GRE是什么,四信GRE相关应用推荐

    随着互联网新技术的发展以及智能化水平的提高,各企业对实时数据传输的需求也在不断提升,企业愈发重视数据中心的建设,各类虚拟网络技术相继被引入.今天,我们重点了解下云端"借道"鼻祖,善 ...

  5. [dev][ipsec][esp] ipsec链路中断的感知问题

    ipsec如何感知到链路中断了?以下内容讲的是在没有配置DPD,且没有rekey的场 景下.1. ESP认为,以下两个场景交由应用层来感知,应用层会发现ipsec的连接坏掉了.a,ESP承载的连接是t ...

  6. linux分析gre中断问题,linux – 无法删除GRE隧道

    我在 Linux 2.6.26中配置GRE隧道,我遇到了一个非常奇怪的问题,我找不到任何解决方案. 我创建了一个名为gre0的GRE隧道,但不管我做什么,我根本无法删除这个隧道.命令ip tunnel ...

  7. 不需要gre的计算机硕士,不需要GRE的美国大学及专业

    原标题:不需要GRE的美国大学及专业 大家都知道,GRE一般针对美国理工科和一些文科专业.然而,并不是所有学校的专业都要求有GRE的,比如英语教学,社会工作等专业.今天,我们就和大家来说说那些不需要G ...

  8. 新gre考位放出时间:GRE考位已满怎么办?

    新GRE考试在每月只设置了2场考试.面对部分城市考位已满的情况,考生应该如何处理呢?很多想要参加新GRE考试的考生都反映,虽然大家对于新gre考试有些恐惧,怕考题难,但新gre考试考位依然十分抢手,很 ...

  9. strongSwan:ipsec.conf – IPsec 的配置和连接

    配置文件描述 可选的ipsec.conf文件指定了strongSwan IPsec子系统的大多数配置和控制信息. 主要的例外是身份验证的机密:见ipsec.secrets(5).其内容不是安全敏感的. ...

最新文章

  1. 刪數 (Standard IO)
  2. OpenSSL 与 SSL 数字证书概念贴
  3. inputstreamreader 编码不完整_素材编码对剪辑效率的影响
  4. 脱离业务的技术架构,都只是一团废纸,教你从0-1建设业务架构
  5. 技术影响力和开发者生态如何打造?
  6. linux服务器终止进程,结束linux 服务器系统中一个程序的多个进程
  7. 古代汉语(王力版)笔记
  8. 全面质量管理体系方案
  9. 报表技术2(百万数据导入导出,POI操作word)
  10. 利用php的GD库封装的海报demo
  11. 尚硅谷 clickHouse
  12. HTML5期末大作业:女装服装商城网站设计——女装服装商城(11页) HTML+CSS+JavaScript 学生DW网页设计作业成品 web课程设计网页
  13. PHPStorm设置Ctrl+滚轮调整字体大小
  14. 第031讲:永久存储,腌制一缸美味的泡菜 | 学习记录(小甲鱼零基础入门学习Python)
  15. BUAA(2021春)实验:树的构造与遍历——根据提示循序渐进(可惜提示有问题Ծ‸Ծ)
  16. 2022春招前端最新面试题分享(蓝信移动)
  17. 伊登工业云:云计算打通“机器换人”最关键一环
  18. bulid.prop优化代码(好像很强?)
  19. 阿里云态势感知和安骑士区别有哪些?
  20. ArcGIS Python arcpy 批量创建SDE空间索引

热门文章

  1. Oracle 12c创建表空间、用户
  2. linux网卡配置多个IP详解
  3. “GIIS 2018智能网联汽车产业创新峰会”隆重召开,共探科技出行图景
  4. 中企动力携力拓消防为安全出行保驾护航
  5. 推荐6款自学网站,好用到暴风哭泣!
  6. 微信公众号(01)---相关基础知识
  7. 幽灵按钮html透明度,CSS3之传说中的幽灵按钮详解
  8. 2019胡润全球独角兽榜
  9. 大数据:“人工特征工程+线性模型”的尽头
  10. Android APP加固混淆案例分享(解决风险提示问题)