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

边栏推荐
猜你喜欢

leetcode 剑指 Offer 25. 合并两个排序的链表

激活数据潜力 亚马逊云科技重塑云上存储“全家桶”

积分专题笔记-与路径无关条件

Circuit analysis: constant current source circuit composed of op amp and triode

树莓派_烧写Raspberry官方镜像系统

leetcode 剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
![[Fun BLDC series with zero basics] Taking GD32F30x as an example, the timer related functions are explained in detail](/img/1d/700c79a766f115d5d0f3bd8263d67c.png)
[Fun BLDC series with zero basics] Taking GD32F30x as an example, the timer related functions are explained in detail

HCIP - MPLS VPN experiment

Activating data potential Amazon cloud technology reshapes cloud storage "family bucket"

The use of qsort function and its analog implementation
随机推荐
微软 SQL 服务器被黑,带宽遭到破坏
虚幻引擎图文笔记:could not be compiled. Try rebuilding from source manually.问题的解决
leetcode 剑指 Offer 21. 调整数组顺序使奇数位于偶数前面
积分简明笔记-第一类曲线积分的类型
Access to display the data
柱状图 直方图 条形图 的区别
如何避免CMDB沦为数据孤岛?
【无标题】
积分简明笔记-第二类曲线积分的类型
利用R语言读取csv文件入一个数据框,然后查看各列的属性。
Circuit analysis: constant current source circuit composed of op amp and triode
Kotlin value class - value class
Jetpack Compose 从入门到入门(八)
编程界的“躲猫猫”比赛 | 每日趣闻
Unified exception handling causes ResponseBodyAdvice to fail
PyQt5快速开发与实战 8.1 窗口风格
快解析结合泛微OA
How to avoid CMDB becoming a data island?
最长公共序列、串问题总结
leetcode 剑指 Offer 52. 两个链表的第一个公共节点