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

边栏推荐
- 【CV】OpenVINO installation tutorial
- Splunk Filed extraction 字段截取
- regular expression
- Metasploit(MSF)基础超级详细版
- Splunk Filed extraction field interception
- (2022 Nioke Duo School 5) C-Bit Transmission (Thinking)
- (2022牛客多校五)C-Bit Transmission(思维)
- typescript学习
- UG NX二次开发(C#)-外部模式-导出dwg格式的文件
- Link with Game Glitch(spfa判负环)
猜你喜欢
随机推荐
MySQL-FlinkCDC-Hudi实时入湖
【Unity3D】初学加密技巧(反破解)
MySQL batch update
HCIP 第十天
Buried development process
apt & apt-get commands
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;)
Xilinx Constraint Study Notes - Timing Constraints
Agile, DevOps and Embedded Systems Testing
pnpm + workspace + changesets 构建你的 monorepo 工程
2022-08-01 第四小组 修身课 学习笔记(every day)
Data reveal that the average cost is as high as $4.35 million in 2022, a record!
HCIP 第十二天
spark read local file
MySQL-数据库设计规范
OC-NSString
OC-NSSet(集合)
LeetCode 2312. 卖木头块
spark读取文件夹数据
LeetCode 2360. The longest cycle in a graph









