当前位置:网站首页>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同上

边栏推荐
- hdu1752 copy
- View port number occupancy
- Go 实现分布式锁
- (2022 Nioke Duo School 5) C-Bit Transmission (Thinking)
- 如何保护智能家居不受黑客攻击
- 吃透Chisel语言.31.Chisel进阶之通信状态机(三)——Ready-Valid接口:定义、时序和Chisel中的实现
- From cloud computing to function computing
- DeadLock的可视化分析
- MySQL-执行流程+缓存+存储引擎
- Please tell me, how to write Flink SQL and JDBC sink into mysql library and want to create an auto-incrementing primary key
猜你喜欢

59: Chapter 5: Develop admin management services: 12: MongoDB usage scenarios; (non-core data, non-core data with a relatively large amount of data, small private files such as face photos;)

责任链模式(Chain Of Responsibility)

FormData upload binary file, object, object array

Buried development process

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

(2022 Niu Ke Duo School 5) D-Birds in the tree (tree DP)

主流定时任务解决方案全横评

MySQL - slow query log

MySQL-数据库事务详解

有点奇怪!访问目的网址,主机能容器却不行
随机推荐
postgres 水平分表,自动创建分区,按时间分表
2022年防止网络攻击的15个网络安全实践,你学会了吗?
DeadLock的可视化分析
hdu1752 copy
MySQL-多版本并发控制
MySQL-慢查询日志
Understand the Chisel language. 30. Chisel advanced communication state machine (2) - FSMD: Take Popcount as an example
MySQL - slow query log
Azure Synapse Analytics上创建用户并赋予权限
CollectionUtil: a collection of functional style tool
停止精神内耗 每日分享
数据中台:始于阿里,兴于DaaS
MySQL - Index Optimization and Query Optimization
MySQL-基础
pnpm + workspace + changesets 构建你的 monorepo 工程
Data reveal that the average cost is as high as $4.35 million in 2022, a record!
OC-NSString
LeetCode 2360. 图中的最长环
带手续费买卖股票的最大利益[找DP的状态定义到底缺什么?]
OC-NSDictionary