当前位置:网站首页>华为路由器: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
边栏推荐
- K8S部署高可用postgresql集群 —— 筑梦之路
- 小程序wx.show
- Wan Weiwei, a researcher from Osaka University, Japan, introduced the rapid integration method and application of robot based on WRS system
- Xiaohei ai4code code baseline nibble 1
- Numpy 中的方法汇总
- 【牛客】HJ1 字符串最后一个单词的长度
- What is graph neural network? Figure what is the use of neural networks?
- 解决:模型训练时loss出现nan
- Mysql数据(Liunx环境)定时备份
- Centos7 installation of jdk8, mysql5.7 and Navicat connection to virtual machine MySQL and solutions (solutions to MySQL download errors are attached)
猜你喜欢
【NOI模拟赛】寄(树形DP)
【Pytorch基础教程31】YoutubeDNN模型解析
Detailed explanation of Base64 coding and its variants (to solve the problem that the plus sign changes into a space in the URL)
Distributed | how to make "secret calls" with dble
一文详解|增长那些事儿
Jenkins is deployed automatically and cannot connect to the dependent service [solved]
表单图片上传在Chorme中无法查看请求体的二进制图片信息
Xiaohei ai4code code baseline nibble 1
leetcode——错误的集合
数据中台:数据采集和抽取的技术栈详解
随机推荐
【量化投资】离散傅里叶变换求数组周期
What is the future development trend of Business Intelligence BI
第七章 操作位和位串(三)
【E325: ATTENTION】vim编辑时报错
阿里资深软件测试工程师推荐测试人员必学——安全测试入门介绍
What is graph neural network? Figure what is the use of neural networks?
数据中台:中台架构及概述
Get screen width and height tool class
解析互联网广告术语 CPM、CPC、CPA、CPS、CPL、CPR 是什么意思
剑指 Offer 55 - I. 二叉树的深度-dfs法
MyCAT读写分离与MySQL主从同步
2022春招面试总结
微博撰写-流程图-序列图-甘特图-mermaid流程图-效果不错
Fast and slow pointer series
關於ETL看這篇文章就够了,三分鐘讓你明白什麼是ETL
所说的Get post:请求的区别,你真的知道了吗??????
Background management of uniapp hot update
Deep learning and neural networks: the six most noteworthy trends
Using sonar for code checking
Numpy 中的方法汇总