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

边栏推荐
- (2022 Nioke Duo School 5) C-Bit Transmission (Thinking)
- apt & apt-get命令
- OC-NSString
- CSRF-Cross-site request forgery-related knowledge
- ROS文件系统以及相关命令
- Data reveal that the average cost is as high as $4.35 million in 2022, a record!
- From cloud computing to function computing
- CollectionUtil: a collection of functional style tool
- MySQL - Index Optimization and Query Optimization
- MySQL-基础
猜你喜欢

MySQL - based

吃透Chisel语言.31.Chisel进阶之通信状态机(三)——Ready-Valid接口:定义、时序和Chisel中的实现

Conditional constructor ~wapper

pnpm install出现:ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies

Xilinx Constraint Study Notes - Timing Constraints

Hack The Box - File Transfers Module详细讲解中文教程

MySQL-索引优化和查询优化

A full review of mainstream timed task solutions

图腾柱和推挽电路介绍

Splunk Field Caculated Calculated Field
随机推荐
OC-NSSet(集合)
Transimpedance amplifier
postgres 水平分表,自动创建分区,按时间分表
停止精神内耗 每日分享
apt & apt-get命令
[mixed] PIP in domestic source tutorial and domestic source address
Debian 10 dhcp relay (dhcp 中继) dhcp 固定分配
Data reveal that the average cost is as high as $4.35 million in 2022, a record!
LeetCode 2360. 图中的最长环
Introduction to Totem Pole and Push-Pull Circuits
Modify apt-get source to domestic mirror source
View zombie processes
CollectionUtil: a collection of functional style tool
MySQL - low level settings
DeadLock的可视化分析
Splunk Filed extraction field interception
Link with Game Glitch(spfa判负环)
Fatal error compiling: 无效的目标发行版: 11
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
【Network】IP, subnet mask