当前位置:网站首页>ospf2双点双向重发布(题2)
ospf2双点双向重发布(题2)
2022-07-30 09:06:00 【土尔奇酱】
实验题目

拓扑图:

实验分析:
如拓扑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学到的路由

边栏推荐
- 统一异常处理导致ResponseBodyAdvice失效
- 读书笔记:《这才是心理学:看穿伪心理学的本质(第10版)》
- 2022/07/29 学习笔记 (day19)异常处理
- 2022 Hangzhou Electric Multi-School 2nd Game
- The use of qsort function and its analog implementation
- [Yugong Series] July 2022 Go Teaching Course 021-Slicing Operation of Go Containers
- leetcode 剑指 Offer 25. 合并两个排序的链表
- Concise Notes on Integrals - Types of Curve Integrals of the Second Kind
- Kotlin value class - value class
- The sword refers to offer 48: the longest non-repeating substring
猜你喜欢
随机推荐
Kotlin value class - value class
Unreal Engine Graphic Notes: could not be compiled. Try rebuilding from source manually. Problem solving
使用 Neuron 接入 Modbus TCP 及 Modbus RTU 协议设备
微软 SQL 服务器被黑,带宽遭到破坏
0729放假自习
leetcode 剑指 Offer 63. 股票的最大利润
2022杭电多校第二场
C# 之 $ – 字符串内插
分布式系统大势所趋,银行运维如何与时俱进?
硬件工程师
02-课程发布
【无标题】
Detailed description of iperf3 parameter options
Version management of public Jar packages
C language classic practice questions (3) - "Hanoi Tower (Hanoi)"
【云原生】Kubernetes入门详细讲解
leetcode 剑指 Offer 12. 矩阵中的路径
Using IN in MySQL will not go through index analysis and solutions
2022/07/29 Study Notes (day19) Exception Handling
Access to display the data








