当前位置:网站首页>MGRE环境下的OSPF
MGRE环境下的OSPF
2022-08-02 07:18:00 【羊腿大大】
配置需求:
- R6为ISP只能配置IP地址。R1-R5的环回为私有网段。
- R1/4/5为全连的MGRE结构,R1/2/3为星型的拓扑结构,R1为中心站点。
- 所有私有网段都可以互相通讯,私有网段使用OSPF获取路由。
- 注:由于MGRE的全连网状和星系结构不能再一根链路上同时使用,故R1有两个链路
实验配置:
1,分配网段
R1
[r1]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 116.0.0.1 24
[r1-GigabitEthernet0/0/1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 16.0.0.1 24
[r1-GigabitEthernet0/0/0]int l0
[r1-LoopBack0]ip add 192.168.1.1 24
[r1]ip route-static 0.0.0.0 0 116.0.0.2
[r1]ip route-static 0.0.0.0 0 16.0.0.2
R2/3/4/5/6同上
公网的网络就通了
2,搭建MGRE环境
完成星型结构的搭建
R1中心站点
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168.7.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 16.0.0.1
Jul 12 2022 21:21:27-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]nhrp network-id 100 ---创建nhrp域来自动换取目标ip
[r1-Tunnel0/0/0]nhrp entry multicast dynamic ---开启伪广播
分支R2
[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.7.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp ---定义封装类型
[r2-Tunnel0/0/0]source g0/0/0
Jul 12 2022 21:28:03-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r2-Tunnel0/0/0]nhrp network-id 100 ---加入nhrp域
[r2-Tunnel0/0/0]nhrp entry 192.168.7.1 16.0.0.1 register ---找中心注册
R3同上
完成全连的拓扑结构
R1
[r1]int Tunnel 0/0/1
[r1-Tunnel0/0/1]ip add 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source 116.0.0.1
Jul 12 2022 21:40:11-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/1 has entered the UP state.
[r1-Tunnel0/0/1]nhrp network-id 110
[r1-Tunnel0/0/1]nhrp entry multicast dynamic
[r1-Tunnel0/0/1]nhrp entry 192.168.6.2 46.0.0.1 register
[r1-Tunnel0/0/1]nhrp entry 192.168.6.3 56.0.0.1 register
R4,R5同上(分别承担中心站点,并互相注册)
私网就连通了
3,启动OSPF获取整个未知网段的拓扑信息
R1
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 0
[r1-ospf-1-area-0.0.0.0]network 192.168.1.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.6.0 0.0.0.255
[r1-ospf-1-area-0.0.0.0]network 192.168.7.0 0.0.0.255
R2/3/4/5同上
点到点的工作模式只能建立一个邻居关系,会导致未知网段的信息获取不全。考虑到DR和BDR的选举有可能不统一,可以选择P2MP类型
R1
[r1]int t0/0/0
[r1-Tunnel0/0/0]ospf ne
[r1-Tunnel0/0/0]ospf network-type p2mp
R2/3同上
在全连的MGRE环境下,3者互相能通讯,不用考虑DR和BDR选举不同意,可以选择broadcast
R1
[r1-Tunnel0/0/0]int t0/0/1
[r1-Tunnel0/0/1]ospf network-type broadcast
R4/5同上
边栏推荐
- OC-error prompt
- MySQL-锁机制
- Splunk Filed Alias 字段改名
- Enterprise training and reproduction guidebook - training and reasoning of the OpenPose model based on Huawei ModelArts platform, realizing the recognition of two behaviors of climbing and climbing ov
- View port number occupancy
- (2022牛客多校五)B-Watches(二分)
- (2022 Nioke Duo School 5) C-Bit Transmission (Thinking)
- MySQL-FlinkCDC-Hudi实时入湖
- DeadLock的可视化分析
- playwright 爬虫使用
猜你喜欢
MySQL-FlinkCDC-Hudi enters the lake in real time
ROS文件系统以及相关命令
企业实训复现指导手册——基于华为ModelArts平台的OpenPose模型的训练和推理、基于关键点数据实现对攀爬和翻越护栏两种行为的识别、并完成在图片中只标注发生行为的人
Introduction to mysql operation (4) ----- data sorting (ascending, descending, multi-field sorting)
Mysql报错2003 解决办法 Can‘t connect to MySQL server on ‘localhost‘ (10061)
Splunk Filed Alias field name
Splunk Filed extraction field interception
2022年防止网络攻击的15个网络安全实践,你学会了吗?
pnpm install出现:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
概率论与数理统计
随机推荐
(2022 Nioke Duo School 5) C-Bit Transmission (Thinking)
A full review of mainstream timed task solutions
2022年数据泄露平均成本高达435万美元,创历史新高!
吃透Chisel语言.30.Chisel进阶之通信状态机(二)——FSMD:以Popcount为例
主流定时任务解决方案全横评
Data reveal that the average cost is as high as $4.35 million in 2022, a record!
Inverter Phase Locking Principle and DSP Implementation
Chain Of Responsibility
数据中台:始于阿里,兴于DaaS
OC-Category
数据中心的网络安全操作规范
OC-NSSet(集合)
有关 sql中的 concat()函数问题,如何拼接
OC-错误提示
MySQL - Index Optimization and Query Optimization
Buried development process
MySQL-慢查询日志
Fatal error compiling: 无效的目标发行版: 11
从云计算到函数计算
埋点开发流程