华为路由器:IPSec加密GRE通道(GRE over IPsec)
IPSec加密GRE通道
由于GRE隧道不提供安全性保障,使用ipsec加密gre隧道是现网中比较常用的VPN部署,它的加密方式分为两种:
可以使用IPsec来加密隧道进行传输,叫做IPsec over GRE;
加密数据流后从隧道传输,称为GRE over IPsec。
下面将配置一个简单的IPsec over GRE实验。
一、搭建模拟环境
首先我们先搭建环境,先根据拓扑图把基本的IP地址配好,然后分别在AR1、AR3加两条静态路由,使得两个公网互通。
[AR1]in g0/0/0
[AR1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[AR1-GigabitEthernet0/0/0]q
[AR1]in g0/0/1
[AR1-GigabitEthernet0/0/1]ip add 200.1.1.1 24
[AR1-GigabitEthernet0/0/1]q
[AR1]ip route-static 200.2.2.0 24 200.1.1.2[AR2]in g0/0/0
[AR2-GigabitEthernet0/0/0]ip add 200.1.1.2 24
[AR2-GigabitEthernet0/0/0]q
[AR2]in g0/0/1
[AR2-GigabitEthernet0/0/1]ip add 200.2.2.2 24
[AR2-GigabitEthernet0/0/1]q[AR3]in g0/0/0
[AR3-GigabitEthernet0/0/0]ip add 200.2.2.1 24
[AR3-GigabitEthernet0/0/0]q
[AR3]in g0/0/1
[AR3-GigabitEthernet0/0/1]ip add 192.168.2.254 24
[AR3-GigabitEthernet0/0/1]q
[AR3]ip route-static 200.1.1.0 24 200.2.2.2验证结果:[AR1]ping -a 200.1.1.1 200.2.2.1PING 200.2.2.1: 56 data bytes, press CTRL_C to breakReply from 200.2.2.1: bytes=56 Sequence=1 ttl=254 time=60 msReply from 200.2.2.1: bytes=56 Sequence=2 ttl=254 time=20 msReply from 200.2.2.1: bytes=56 Sequence=3 ttl=254 time=40 msReply from 200.2.2.1: bytes=56 Sequence=4 ttl=254 time=10 msReply from 200.2.2.1: bytes=56 Sequence=5 ttl=254 time=30 ms--- 200.2.2.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/32/60 ms
二、GRE的配置
AR1interface Tunnel0/0/0 #新建隧道description zongbu #这个是描述,不是目标地址,需要注意ip address 10.1.1.1 255.255.255.0 #给隧道配置地址tunnel-protocol gre #隧道协议source 200.1.1.1 #源地址,注意这里是公网地址destination 200.2.2.1 #目标地址,注意这里是公网地址AR3interface Tunnel0/0/0description fengongsiip address 10.1.1.2 255.255.255.0 tunnel-protocol gresource 200.2.2.1destination 200.1.1.1两边各加1条静态路由[AR1]ip route-static 192.168.2.0 24 Tunnel 0/0/0 #这里我们用隧道接口,也可以用隧道IP
[AR1]ip route-static 192.168.2.0 24 ? #这里除了加接口还可以直接IPIP_ADDR<X.X.X.X> Gateway addressGigabitEthernet GigabitEthernet interfaceNULL NULL interfaceTunnel Tunnel interfacevpn-instance Destination VPN-Instance for Gateway address[AR3]ip route-static 192.168.1.0 24 Tunnel 0/0/0验证一下:PC1 > PC2PC>ping 192.168.2.1Ping 192.168.2.1: 32 data bytes, Press Ctrl_C to break
From 192.168.2.1: bytes=32 seq=1 ttl=126 time=31 ms
From 192.168.2.1: bytes=32 seq=2 ttl=126 time=16 ms
From 192.168.2.1: bytes=32 seq=3 ttl=126 time=31 ms
From 192.168.2.1: bytes=32 seq=4 ttl=126 time=15 ms
From 192.168.2.1: bytes=32 seq=5 ttl=126 time=16 ms--- 192.168.2.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 15/21/31 ms
三、配置IPSec加密
#创建IKE提议
ike proposal 1 encryption-algorithm 3des-cbc #指定加密算法authentication-algorithm md5 #认证算法#配置IKE对等体
ike peer 1 v2 pre-shared-key simple 123456 #共享密钥ike-proposal 1#配置IPSec提议
ipsec proposal 1 esp encryption-algorithm 3des #esp的加密算法#配置IPSec文件,其实也就是调用上面的IKE提议和IPSec提议
ipsec profile gre ike-peer 1proposal 1interface Tunnel0/0/0ipsec profile greinterface Tunnel0/0/0description zongbuip address 10.1.1.1 255.255.255.0 tunnel-protocol gresource 200.1.1.1destination 200.2.2.1ipsec profile gre####以上配置AR1、AR3完全一样
四、加密验证
我们选择下图中AR1的g0/0/1接口抓包
然后用PC1去pingPC2的抓包效果
华为路由器:IPSec加密GRE通道(GRE over IPsec)相关推荐
- 华为路由器stelnet加密访问设置
路由器AR1,路由器AR2 在AR1上开启stelnet服务,通过AR2进行访问. AR1设置: <Huawei>system [Huawei]sysname AR1 (改路由器名这:AR ...
- 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 ...
- 华为路由器console口加密 telnet远程登录 DHCP server在路由器中的两种写法
console口加密 方法一 [Huawei]user-interface console 0 [Huawei-ui-console0]authentication-mode password Ple ...
- IPSec over GRE 和 GRE over IPSec学习总结
GRE可以与IPSec配合使用,通过建立GRE over IPSec隧道,对路由协议.语音.视频等数据先进性GRE封装,再对封装后的报文进行IPsec处理. 二者配合使用的有点: 提高数据在隧道中的传 ...
- 深信服 华为路由器 ipsce对接
深信服 华为路由器 ipsce对接 前言 一.深信服设置 深信服 第一段对接 完成设置后得到以下参数 深信服 第二段对接 二.华为路由器设置 前言 公司总部是深信服服路由器,有固定ip,项目上没有固定 ...
- 技术分享:逆向破解华为路由器第三部分
技术分享:逆向破解华为路由器第三部分 引文 在前面两个部分(1,2)已经介绍了UART,BusyBox等部分的逆向调试,而这篇将会开始在流量分析方面下手,来逆向出更多的信息. 正文 请看下图,数据存储 ...
- 华为路由器命令大全(字典查询)
华 为 路 由 器 命 令 大 全 删除设备配置 reset saved-configuration 重启 reboot 看当前配置文件 display current-configuratio ...
- 华为路由器ppp配置
华为路由器PPP协议配置 http://kms.lenovots.com/kb/article.php?id=7414 Quidway路由器配置广域网协议配置命令3.1 PPP.SLIP和MP配 ...
- 【收藏】华为路由器交换机配置命令大全
华为路由器交换机配置命令:计算机命令 PCAlogin:root;使用root用户 password:linux;口令是linux #shutdown-hnow;关机 #init0;关机 #logou ...
最新文章
- 区分真实模式的两个标准
- Bitcoin Unlimited客户端发布新版本,删除了BSV协议功能
- 刚入Linux坑常见的8大问题
- 初学Java会遇见的几个问题分享
- [网络安全提高篇] 一〇六.SQL注入之手工注入和SQLMAP入门案例详解
- 2017年我国智能卡行业市场现状及发展趋势分析
- python如何将数组里的数提取出来_python – 从数组数组中提取数组
- Introduction to Computer Networking学习笔记(九):error detection 错误探查 Checksum、CRC、MAC
- np.dot、np.outer、np.matmul、np.multipy、np.inner、np.outer与np.cross几个函数之间的区别
- 每天做好一件事,坦然微笑地面对生活
- windows2003序列号
- Number isFinite()方法
- opporeno5k怎样关闭乐划锁屏锁屏杂志
- 算术分解定理取根号的注意点
- matlab print 保留颜色,科学网—解决matlab saveas printf保存图片时 colorbar中的字体颜色发生改变 - 肖鑫的博文...
- “1万起投,年化达8%”?天安金交中心卖力“吆喝”的产品,是“香”还是“坑”?
- 写给 -- Arrow.L
- 分布式数据库案例分享:腾讯移动支付平台米大师
- 计算机知识竞赛心得体会,知识竞赛活动心得范文【两篇】
- 最好花5分钟看一下:辞职后五险一金怎么办