当前位置:网站首页>华为路由器:GRE技术
华为路由器:GRE技术
2022-06-24 07:07:00 【兔子王cool】
实验拓扑

R1 按照拓扑配置好IP地址
这里省略。
R2 GRE部分的配置
#按照拓扑图配置好IP
ip route-static 0.0.0.0 0 10.10.10.2 #加一条路由,使得两个公网IP互通
[R2]interface Tunnel0/0/0 #新建隧道
[R2-Tunnel0/0/0]description to_jikong #隧道描述
[R2-Tunnel0/0/0]tunnel-protocol gre #隧道协议
[R2-Tunnel0/0/0]source 10.10.10.1 #源地址
[R2-Tunnel0/0/0]de? #注意这两容易敲错,一定要destination
description Specify interface description
destination Destination address of the tunnel interface
[R2-Tunnel0/0/0]destination 10.10.20.1 #目标地址,注意这两容易敲错
[R2-Tunnel0/0/0]ip add 192.168.254.1 24 #给隧道配置地址
[R2-Tunnel0/0/0]q
[R2]ip route-static 192.168.12.0 255.255.255.0 192.168.254.2 #给隧道配置静态路由
需要注意的是:description(描述)和destination(目标地址),很容易敲错。
R3 GRE部分的配置
ip route-static 0.0.0.0 0 10.10.20.2
[R3]interface Tunnel0/0/0
[R3-Tunnel0/0/0]description to_office
[R3-Tunnel0/0/0]tunnel-protocol gre
[R3-Tunnel0/0/0]source 10.10.20.1
[R3-Tunnel0/0/0]destination 10.10.10.1
[R3-Tunnel0/0/0]ip add 192.168.254.1 24
[R3-Tunnel0/0/0]q
[R3]ip route-static 192.168.11.0 255.255.255.0 192.168.254.1
验证结果
PC>ping 192.168.12.1
Ping 192.168.12.1: 32 data bytes, Press Ctrl_C to break
From 192.168.12.1: bytes=32 seq=1 ttl=126 time=15 ms
From 192.168.12.1: bytes=32 seq=2 ttl=126 time=16 ms
From 192.168.12.1: bytes=32 seq=3 ttl=126 time=15 ms
From 192.168.12.1: bytes=32 seq=4 ttl=126 time=32 ms
From 192.168.12.1: bytes=32 seq=5 ttl=126 time=31 ms
PC>ping 192.168.11.1
Ping 192.168.11.1: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 192.168.11.1: bytes=32 seq=2 ttl=126 time=16 ms
From 192.168.11.1: bytes=32 seq=3 ttl=126 time=16 ms
From 192.168.11.1: bytes=32 seq=4 ttl=126 time=31 ms
From 192.168.11.1: bytes=32 seq=5 ttl=126 time=16 ms
边栏推荐
- 偶然间得到的framework工具类 自用
- 玄铁E906移植----番外0:玄铁C906仿真环境搭建
- 所说的Get post:请求的区别,你真的知道了吗??????
- Get screen width and height tool class
- Database migration from PostgreSQL to MySQL
- Determination of monocular and binocular 3D coordinates
- MySQL——SQL语句
- 基于QingCloud的地理信息企业研发云解决方案
- 基于QingCloud的 “房地一体” 云解决方案
- 2138. 将字符串拆分为若干长度为 k 的组
猜你喜欢

MySQL 因字符集问题插入中文数据时提示代码 :1366

What is graph neural network? Figure what is the use of neural networks?

什么是图神经网络?图神经网络有什么用?

原生小程序用画布制作海报,等比例缩放,和uniapp差不多就是写法有点不同

【NOI模拟赛】给国与时光鸡(构造)

【LeetCode】387. 字符串中的第一个唯一字符

Matlab camera calibrator camera calibration

"Unusual proxy initial value setting is not supported", causes and Solutions

MySQL | 存储《康师傅MySQL从入门到高级》笔记

The form image uploaded in chorme cannot view the binary image information of the request body
随机推荐
【使用 PicGo+腾讯云对象存储COS 作为图床】
Floating error waiting for changelog lock
所说的Get post:请求的区别,你真的知道了吗??????
双指针模拟
Analyze the meaning of Internet advertising terms CPM, CPC, CPA, CPS, CPL and CPR
常用表情符号
SLAM14讲中Sophus包的安装问题
关于ETL看这篇文章就够了,三分钟让你明白什么是ETL
解析互联网广告术语 CPM、CPC、CPA、CPS、CPL、CPR 是什么意思
One article explains in detail | those things about growth
数据中台:中台实践与总结
从华为WeAutomate数字机器人论坛,看政企领域的“政务新智理”
2022 spring recruitment interview summary
数据中台:中台架构及概述
pymysql 向MySQL 插入数据无故报错
【NOI模拟赛】给国与时光鸡(构造)
【MySQL从入门到精通】【高级篇】(一)字符集的修改与底层原理
Centos7 installation of jdk8, mysql5.7 and Navicat connection to virtual machine MySQL and solutions (solutions to MySQL download errors are attached)
[team management] 25 tips for testing team performance management
opencv最大值滤波(不局限于图像)