当前位置:网站首页>ospf2 two-point two-way republish (question 2)
ospf2 two-point two-way republish (question 2)
2022-07-30 10:13:00 【turkey sauce】
实验题目

拓扑图:

实验分析:
如拓扑IP地址分配,左边为RIP,右边为OSPF area0
2,2,2,2和4.4.4.4环回可能会存在32位掩码和24位掩码的路由,所以进环回接口,将环回接口改为broadcast类型
备份路径需将某些路由的Cost值修改在ASBR上进行即可,路由回馈在OSPF中已经解决
防止出现环路,将ASBR上面的直连接口重发布入RIP和OSPF区域
最后添加路由规则R1:
[Huawei]sysname r1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 12.1.1.1 255.255.255.0
[r1-GigabitEthernet0/0/0]int g0/0/1
[r1-GigabitEthernet0/0/1]ip add 14.1.1.1 255.255.255.0
[r1-GigabitEthernet0/0/1]int l0
[r1-LoopBack0]ip add 1.1.1.1 255.255.255.0
[r1-LoopBack0]int l1
[r1-LoopBack1]ip add 172.16.1.1 24
[r1-LoopBack1]int l2
[r1-LoopBack2]ip add 172.16.2.1 24
[r1-LoopBack2]int l3
[r1-LoopBack3]ip add 172.16.4.1 24
[r1-LoopBack3]rip 1
[r1-rip-1]version 2
[r1-rip-1]network 12.0.0.0
[r1-rip-1]network 1.0.0.0
[r1-rip-1]network 14.0.0.0
[r1-rip-1]network 172.16.0.0
[r1-rip-1]q
[r1]ip ip-prefix 23 permit 23.1.1.0 24
[r1]int g0/0/01
[r1-GigabitEthernet0/0/1]rip metricout ip-prefix 23 2
[r1-GigabitEthernet0/0/1]q
[r1]ip ip-prefix 4 permit 4.4.4.0 24
[r1]ip ip-prefix 43 permit 43.1.1.0 24
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]rip metricin ip-prefix 4 2
[r1-GigabitEthernet0/0/0]rip metricin ip-prefix 43 2
R2:
[Huawei]sysname r2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 12.1.1.2 255.255.255.0
[r2-GigabitEthernet0/0/0]int g0/0/1
[r2-GigabitEthernet0/0/1]ip add 23.1.1.2 255.255.255.0
[r2-GigabitEthernet0/0/1]int l0
[r2-LoopBack0]ip add 2.2.2.2 255.255.255.0
[r2-LoopBack0]ospf network-type broadcast
[r2-LoopBack0]osfp 1
[r2-LoopBack0]q
[r2]ospf 1
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[r2-ospf-1-area-0.0.0.0]q
[r2-ospf-1]import-route direct
[r2-ospf-1]import-route rip 1
[r2-ospf-1]rip 1
[r2-rip-1]version 2
[r2-rip-1]network 12.0.0.0
[r2-rip-1]network 2.0.0.0
[r2-rip-1]import-route direct
[r2-rip-1]import-route ospf 1
[r2-rip-1]q
[r2]ip ip-prefix 5 permit 4.4.4.0 24
[r2]ip ip-prefix 6 permit 43.1.1.0 24
[r2]ip ip-prefix 1 permit 172.16.1.0 24
[r2]ip ip-prefix 2 permit 172.16.2.0 24
[r2]ip ip-prefix 3 permit 172.16.3.0 24
[r2]ip ip-prefix 4 permit 172.16.4.0 24
[r2]route-policy haha deny node 10
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix 1
[r2-route-policy]route-policy haha per
[r2-route-policy]q
[r2]route-policy haha permit node
[r2]route-policy haha permit node 20
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix 2
[r2-route-policy]apply cost-type type-1
[r2-route-policy]route-policy haha permit node 30
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix 3
[r2-route-policy]apply cost 6
[r2-route-policy]route-policy haha permit node 40
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix 4
[r2-route-policy]apply cost 9
[r2-route-policy]apply cost-type type-1
[r2-route-policy]route-policy haha permit node 50
Info: New Sequence of this List.
[r2-route-policy]route-policy haha permit node 15
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix 5
[r2-route-policy]apply cost-type type-1
[r2-route-policy]route-policy haha permit node 25
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix 6
[r2-route-policy]apply cost-type type-1
[r2-route-policy]q
[r2]ospf 1
[r2-ospf-1]import-route rip 1 route-policy haha
R3:
[Huawei]sysname r3
[r3]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]network 43.1.1.0 0.0.0.255
[r3-ospf-1-area-0.0.0.0]int g0/0/0
R4:
[Huawei]sysname r4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 14.1.1.4 255.255.255.0
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 43.1.1.4 255.255.255.0
[r4-GigabitEthernet0/0/1]int l0
[r4-LoopBack0]ip add 4.4.4.4 255.255.255.0
[r4-LoopBack0]ospf network-type broadcast
[r4-LoopBack0]rip 1
[r4-rip-1]version 2
[r4-rip-1]network 14.0.0.0
[r4-rip-1]import-route direct
[r4-rip-1]import-route ospf 1
[r4-rip-1]q
[r4]ip ip-prefix 5 permit 23.1.1.0 24
[r4]ip ip-prefix 6 permit 2.2.2.0 24
[r4]ip ip-prefix 1 permit 172.16.1.0 24
[r4]ip ip-prefix 2 permit 172.16.2.0 24
[r4]ip ip-prefix 3 permit 172.16.3.0 24
[r4]ip ip-prefix 4 permit 172.16.4.0 24
[r4]route-policy haha deny node 10
Info: New Sequence of this List.
[r4-route-policy]if-match ip-prefix 1
[r4-route-policy]route-policy haha permit node 20
Info: New Sequence of this List.
[r4-route-policy]if-match ip-prefix 2
[r4-route-policy]apply cost-type type-1
[r4-route-policy]route-policy haha permit node 30
Info: New Sequence of this List.
[r4-route-policy]if-match ip-prefix 3
[r4-route-policy]apply cost 6
[r4-route-policy]route-policy haha permit node 40
Info: New Sequence of this List.
[r4-route-policy]if-match ip-prefix 4
[r4-route-policy]apply cost 9
[r4-route-policy]apply cost-type type-1
[r4-route-policy]route-policy haha permit node 50
Info: New Sequence of this List.
[r4-route-policy]route-policy haha permit node 15
Info: New Sequence of this List.
[r4-route-policy]if-match ip-prefix 5
[r4-route-policy]apply cost-type type-1
[r4-route-policy]route-policy haha permit node 25
Info: New Sequence of this List.
[r4-route-policy]if-match ip-prefix 6
[r4-route-policy]apply cost-type type-1
[r4-route-policy]q
[r4]ospf 1
[r4-ospf-1]import-route rip 1 route-policy haha
实验验证:
双向重发布
通过RIP学到的路由



R3通过OSPF学到的路由

R3学到的路由

边栏推荐
- 【深度学习】(问题记录)<对一个变量求梯度得到什么>-线性回归-小批量随机梯度下降
- Multi-threading scheme to ensure that a single thread opens a transaction and takes effect
- Re20:读论文 What About the Precedent: An Information-Theoretic Analysis of Common Law
- leetcode 剑指 Offer 12. 矩阵中的路径
- 转行软件测试,报培训班3个月出来就是高薪工作,靠谱吗?
- BERT预训练模型系列总结
- leetcode 剑指 Offer 25. 合并两个排序的链表
- Domino服务器SSL证书安装指南
- 软考 系统架构设计师 简明教程 | 案例分析 | 需求分析
- 连接mysql报错WARN: Establishing SSL connection without server‘s identity verification is not recommended
猜你喜欢

梅科尔工作室-看鸿蒙设备开发实战笔记六—无线联网开发

在机器人行业的专业人士眼里,机器人行业目前的情况如何?

Re15:读论文 LEVEN: A Large-Scale Chinese Legal Event Detection Dataset

Online target drone prompt.ml

STM32CubeMX配置生成FreeRTOS项目

快解析结合象过河erp

Meikle Studio-Look at the actual combat notes of Hongmeng device development six-wireless networking development

Matplotlib--绘图标记

Day113. Shangyitong: WeChat login QR code, login callback interface

Unified exception handling causes ResponseBodyAdvice to fail
随机推荐
PyQt5快速开发与实战 8.1 窗口风格
Matplotlib--绘图标记
leetcode 剑指 Offer 47. 礼物的最大价值
leetcode 剑指 Offer 10- I. 斐波那契数列
Oracle 创建和操作表
(BUG记录)No module named PIL
If someone asks you about distributed transactions again, throw this to him
leetcode 剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
连接mysql报错WARN: Establishing SSL connection without server‘s identity verification is not recommended
2022年顶会accepted papers list
debian10安装djando
(C语言)文件操作
柱状图 直方图 条形图 的区别
GNOME 新功能:安全启动被禁用时警告用户
Multithreading--the usage of threads and thread pools
梅科尔工作室-看鸿蒙设备开发实战笔记四——内核开发
105. Construct binary tree from preorder and inorder traversal sequence (video explanation!!)
leetcode 剑指 Offer 12. 矩阵中的路径
水电表预付费系统
leetcode 剑指 Offer 10- II. 青蛙跳台阶问题