当前位置:网站首页>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学到的路由

边栏推荐
- 在机器人行业的专业人士眼里,机器人行业目前的情况如何?
- 快解析结合用友时空
- 105. Construct binary tree from preorder and inorder traversal sequence (video explanation!!)
- Soft test system architects introductory tutorial | system operation and software maintenance
- 方法的参数传递
- 线程池方式开启线程--submit()和execute()的区别
- CVTE校招笔试题+知识点总结
- ThreadLocal内存泄漏是伪命题?
- Test automation selenium (a)
- 【深度学习】(问题记录)<对一个变量求梯度得到什么>-线性回归-小批量随机梯度下降
猜你喜欢

LeetCode二叉树系列——94.二叉树的中序遍历

转行软件测试,报培训班3个月出来就是高薪工作,靠谱吗?

【云原生】Kubernetes入门详细讲解

Redis Desktop Manager 2022.4.2 released

大数据产品:标签体系0-1搭建实践

shell script

Materialist Dialectics - Conditionalism

Re21:读论文 MSJudge Legal Judgment Prediction with Multi-Stage Case Representation Learning in the Real

Flask之路由(app.route)详解

leetcode 剑指 Offer 25. 合并两个排序的链表
随机推荐
(Text) Frameless button settings
BERT pre-training model series summary
Baidu promotion assistant encounters duplicate keywords, verification errors, how to delete redundant ones with one click
C语言顺序表基本操作
els 方块、背景上色
Basic operations of sequence table in C language
线程池方式开启线程--submit()和execute()的区别
GNOME 新功能:安全启动被禁用时警告用户
els 方块停在方块上。
0729放假自习
els 方块向左移动
JVM内存布局、类加载机制及垃圾回收机制详解
Day113.尚医通:微信登录二维码、登录回调接口
图像分析:投影曲线的波峰查找
方法的参数传递
水电表预付费系统
Re20:读论文 What About the Precedent: An Information-Theoretic Analysis of Common Law
Matplotlib--绘图标记
转行软件测试,报培训班3个月出来就是高薪工作,靠谱吗?
这种叫什么手法