当前位置:网站首页>华为路由器: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
边栏推荐
- 解决:模型训练时loss出现nan
- Database migration from PostgreSQL to MySQL
- 工具类
- Win11 blank when using VIM to view content in cmder
- Increase insert speed
- [life thinking] planning and self-discipline
- xargs使用技巧 —— 筑梦之路
- One article explains in detail | those things about growth
- Liunx change the port number of vsftpd
- 1704. 判断字符串的两半是否相似
猜你喜欢

玄铁E906移植----番外0:玄铁C906仿真环境搭建

【使用 PicGo+腾讯云对象存储COS 作为图床】

Jenkins自动化部署,连接不到所依赖的服务【已解决】
![打印出来的对象是[object object],解决方法](/img/fc/9199e26b827a1c6304fcd250f2301e.png)
打印出来的对象是[object object],解决方法

liunx服务器 telnet 带用户名 端口登陆方法

À propos de ETL il suffit de lire cet article, trois minutes pour vous faire comprendre ce qu'est ETL

A tip to read on Medium for free

数据中台:数据采集和抽取的技术栈详解

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

pymysql 向MySQL 插入数据无故报错
随机推荐
一文讲透,商业智能BI未来发展趋势如何
Pymysql inserts data into MySQL and reports an error for no reason
Telnet port login method with user name for liunx server
520. 检测大写字母
Why can ping fail while traceroute can
216. 组合总和 III-枚举法
Increase insert speed
更改SSH端口号
[life thinking] planning and self-discipline
【量化投资】离散傅里叶变换求数组周期
Fast and slow pointer series
Several schemes of PHP code encryption
小程序云数据,数据请求一个集合数据的方法
4274. 后缀表达式
【使用 PicGo+腾讯云对象存储COS 作为图床】
偶然间得到的framework工具类 自用
Distributed | how to make "secret calls" with dble
Analyze the meaning of Internet advertising terms CPM, CPC, CPA, CPS, CPL and CPR
【NOI模拟赛】给国与时光鸡(构造)
【PyTorch基础教程30】DSSM双塔模型代码解析