当前位置:网站首页>华为路由器: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
边栏推荐
- liunx 更改 vsftpd 的端口号
- Earthly container image construction tool -- the road to dream
- 【LeetCode】387. 字符串中的第一个唯一字符
- [pytoch basic tutorial 31] youtubednn model analysis
- RuntimeError: Missing dependencies:XXX
- Summary of methods in numpy
- GradScaler MaxClipGradScaler
- 何时使用RDD和DataFrame/DataSet
- A tip to read on Medium for free
- 基于QingCloud的地理信息企业研发云解决方案
猜你喜欢
随机推荐
Determination of monocular and binocular 3D coordinates
不能改变虚拟机电源状态报错解决方案
Centos7 installation of jdk8, mysql5.7 and Navicat connection to virtual machine MySQL and solutions (solutions to MySQL download errors are attached)
Get screen width and height tool class
MySQL 因字符集问题插入中文数据时提示代码 :1366
opencv最大值滤波(不局限于图像)
Scheduled database backup script
教程篇(5.0) 08. Fortinet安全架构集成与FortiXDR * FortiEDR * Fortinet 网络安全专家 NSE 5
快慢指针系列
“不平凡的代理初始值设定不受支持”,出现的原因及解决方法
Become an IEEE student member
数组相向指针系列
小程序云数据,数据请求一个集合数据的方法
用VNC Viewer的方式远程连接无需显示屏的树莓派
【LeetCode】415. 字符串相加
[team management] 25 tips for testing team performance management
【牛客】HJ1 字符串最后一个单词的长度
pymysql 向MySQL 插入数据无故报错
Analyze the meaning of Internet advertising terms CPM, CPC, CPA, CPS, CPL and CPR
2138. 将字符串拆分为若干长度为 k 的组









