路由策略实验

实验要求:
在这里插入图片描述
实验拓扑图:
在这里插入图片描述
配置ip:
R1

[r1-LoopBack0]ip address 1.1.1.1 24
[r1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[r1-GigabitEthernet0/0/1]ip address 13.1.1.1 24

R2

[r2-LoopBack0]ip address 2.2.2.2 24
[r2-GigabitEthernet0/0/0]ip address 12.1.1.2 24
[r2-GigabitEthernet0/0/1]ip address 24.1.1.1 24

R3

[r3-LoopBack0]ip address 3.3.3.3 24
[r3-GigabitEthernet0/0/0]ip address 13.1.1.2 24
[r3-GigabitEthernet0/0/1]ip address 34.1.1.1 24

R4

[r4-LoopBack0]ip address 4.4.4.4 24
[r4-GigabitEthernet0/0/0]ip address 24.1.1.2 24
[r4-GigabitEthernet0/0/1]ip address 34.1.1.2 24
[r4-GigabitEthernet0/0/2]ip address 45.1.1.1 24

R5

[r5-LoopBack0]ip address 5.5.5.5 24
[r5-GigabitEthernet0/0/0]ip address 45.1.1.2 24
[r5-GigabitEthernet0/0/1]ip address 56.1.1.1 24

R6

[r6-LoopBack0]ip address 6.6.6.6 24
[r6-GigabitEthernet0/0/0]ip address 56.1.1.2 24
[r6-GigabitEthernet0/0/1]ip address 67.1.1.1 24

R7

[r7-LoopBack0]ip address 7.7.7.7 24
[r7-GigabitEthernet0/0/0]ip address 67.1.1.2 24

协议配置:
R1

[r1-rip-1]network 1.0.0.0
[r1-rip-1]network 12.0.0.0
[r1-rip-1]network 13.0.0.0

R2

[r2]rip 1
[r2-rip-1]version 2
[r2-rip-1]network 12.0.0.0
[r2-rip-1]network 2.0.0.0
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]network 24.1.1.1 0.0.0.0

R3

[r3]rip 1
[r3-rip-1]version 2
[r3-rip-1]network 34.0.0.0
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

R4

[r4]ospf 1 router-id 4.4.4.4
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]network 24.1.1.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 34.1.1.2 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 45.1.1.1 0.0.0.0
[r4-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0

R5

[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 45.1.1.2 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 56.1.1.1 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0

R6

[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 56.1.1.2 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 67.1.1.1 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 6.6.6.6 0.0.0.0

R7

[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 67.1.1.2 0.0.0.0
[r7]rip 1
[r7-rip-1]version 2
[r7-rip-1]network 7.0.0.0

重发布路由:

R2:
[r2-ospf-1]import-route rip 1
[r2-rip-1]import-route ospf 1
R3:
[r3-ospf-1]import-route rip 1
[r3-rip-1]import-route ospf 1
R7:
[r7-ospf-1]import-route rip 1

路由策略:
R2:

[r3]ip ip-prefix qq index 10 permit 7.7.7.0 24
[r3]route-policy qq permit node 10
[r3-route-policy]if-match ip-prefix qq
[r3-route-policy]apply preference 151
[r3]rip 1
[r3-rip-1]preference route-policy qq

[r2]ip ip-prefix a permit 7.7.7.0 24
[r2]route-policy qq permit node 10
[r2-route-policy]if-match ip-prefix a
[r2-route-policy]apply preference 151
[r2]rip 1
[r2-rip-1]preference route-policy qq

[r3-LoopBack0]ip address 3.3.3.3 32

[r2]ip ip-prefix a permit 34.1.1.0 24
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]rip metricout ip-prefix a 2

[r3]ip ip-prefix b permit 24.1.1.0 24
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]rip metricout ip-prefix b 2

[r2]ip ip-prefix c permit 12.1.1.0 24
[r2]ip ip-prefix c permit 2.2.2.0 24
[r2]route-policy a permit node 10
[r2-route-policy]if-match ip-prefix c
[r2-route-policy]apply cost-type type-1
[r2]route-policy c permit node 20
[r2-ospf-1]import-route rip route-policy a

[r3]ip ip-prefix c permit 13.1.1.0 24
[r3]route-policy c permit node 10
[r3-route-policy]if-match ip-prefix c
[r3-route-policy]apply cost-type type-1
[r3]route-policy cc permit node 20
[r3-ospf-1]import-route rip route-policy c

[r2]ip ip-prefix b permit 3.3.3.3 32
[r2-GigabitEthernet0/0/0]rip metricout ip-prefix b 3

实验报告
在这里插入图片描述
在这里插入图片描述

在ensp实验中,策略路由是一项重要的实验内容。根据引用中的描述,策略路由涉及到多种方法和配置,包括理解路由策略的不同方法、了解原理和熟悉配置等。根据引用中的内容,策略路由的详细配置可能涉及到拓扑图、IP地址配置、OSPF区域配置和策略配置等。在实验过程中,可以通过测试来验证配置的正确性。最后,可以使用相应的命令查看R4和R5的OSPF路由表信息和LSDB数据库信息,以评估实验结果。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [ensp--路由策略实验](https://blog.csdn.net/Suexiao7/article/details/128974068)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [华为ENSP全系实验.zip](https://download.csdn.net/download/qq_23930765/85927763)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [基于路由策略的ensp OSPF实验](https://blog.csdn.net/Mr_rsq/article/details/79510320)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值