当前位置:网站首页>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同上
边栏推荐
- MySQL-Multiversion Concurrency Control
- OC-NSArray
- 停止精神内耗 每日分享
- 有点奇怪!访问目的网址,主机能容器却不行
- OC-NSString
- MySQL-底层设置
- 研发创新编码器霍尔板,引领企业高质量发展
- 2022-08-01 第四小组 修身课 学习笔记(every day)
- MySQL报错1055解决办法:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains
- pnpm install出现:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
猜你喜欢
Understand the Chisel language. 30. Chisel advanced communication state machine (2) - FSMD: Take Popcount as an example
机器学习笔记--数学库
MySQL-索引详解
MySQL - Index Optimization and Query Optimization
Splunk Filed Alias 字段改名
Splunk Filed extraction 字段截取
Introduction to Totem Pole and Push-Pull Circuits
MySQL - based
(2022牛客多校五)D-Birds in the tree(树形DP)
研发创新编码器霍尔板,引领企业高质量发展
随机推荐
OC-NSNumber和NSValue一般用来装箱拆箱
Modify apt-get source to domestic mirror source
Transimpedance amplifier
Xilinx Constraint Study Notes - Timing Constraints
Inverter insulation detection detection function and software implementation
LeetCode brush questions (7)
MySQL批量更新
MySQL - low level settings
How to export multiple query results at once in SQL server 2014?
OC-Category
查看僵尸进程
如何保护智能家居不受黑客攻击
Splunk Filed Alias 字段改名
Mysql报错2003 解决办法 Can‘t connect to MySQL server on ‘localhost‘ (10061)
spark read folder data
Conditional constructor ~wapper
Splunk Field Caculated Calculated Field
带手续费买卖股票的最大利益[找DP的状态定义到底缺什么?]
playwright 爬虫使用
MySQL - slow query log