CCNP课程实验-Route_Path_Control_CFG

目录

  • 实验条件
    • 网络拓朴
    • 需求
  • 配置实现
    • 基础配置
    • 需求实现
      • 1.A---F所有区用Loopback模拟,地址格式为:XX.XX.XX.XX/32,其中X为路由器编号。根据拓扑宣告进对应协议。A1和A2区为特例,A1:55.55.55.0/24,A2:55.55.66.0/24
      • 2.照拓扑图配置EIGRP/OSPF路由协议,关闭所有自动汇总。OSPF手动指明RID为Loopback 0地址。
      • 3.R4做双向重分布,R6把OSPF重分布到EIGRP,要求全网ping通。如无明确说明,禁止使用静态路由,禁止直接使用ACL过滤数据。
      • 4. A1区网段为55.55.55.0/24,配置R6使其禁止从R7学到此网段(要求:使用前缀列表)
      • 5. 在R4上配置,要求EIGRP重分布到OSPF时,B区Metric值为100,类型为E1;C区Metric值为200,类型为E1。 其他路由按照默认设置。
      • 6. 在R1的Area 0中增加以下网段:11.11.1.0/24、11.11.2.0/24 (用Loopback模拟),要求在R2上配置最精确的路由汇总,并且只允许在III区学到该汇总路由。
      • 7. 要求A1到F区的数据流走R4,A2到E区的数据流走R6(R5带A1和A2的源地址采用Traceroute测试)
      • 8. 在R7上配置,使其路由表中显示去往E、F区的下一跳是R6。
      • 10. 在R4上配置,使其访问E区走 I 区 --> III 区,其他路线不变 (要求:不允许策略路由和分发列表)

实验条件

网络拓朴

在这里插入图片描述
拓扑中的IP地址段采用:172.8.AB.X/24,其中AB为两台路由器编号组合,
例如:R3-R6之间的AB为36,X为路由器编号,例如R3的X=3
所有路由器都有一个Loopback 0接口,地址格式为:X.X.X.X/32,其中X为路由器编号。
没有特殊要求,不允许使用静态路由。

需求

  1. A—F所有区用Loopback模拟,地址格式为:XX.XX.XX.XX/32,其中X为路由器编号。根据拓扑宣告进对应协议。A1和A2区为特例,A1:55.55.55.0/24,A2:55.55.66.0/24。
  2. 照拓扑图配置EIGRP/OSPF路由协议,关闭所有自动汇总。OSPF手动指明RID为Loopback 0地址。
  3. R4做双向重分布,R6把OSPF重分布到EIGRP,要求全网ping通。如无明确说明,禁止使用静态路由,禁止直接使用ACL过滤数据。
  4. A1区网段为55.55.55.0/24,配置R6使其禁止从R7学到此网段(要求:使用前缀列表)
  5. 在R4上配置,要求EIGRP重分布到OSPF时,B区Metric值为100,类型为E1;C区Metric值为200,类型为E1。 其他路由按照默认设置。
  6. 在R1的Area 0中增加以下网段:11.11.1.0/24、11.11.2.0/24 (用Loopback模拟),要求在R2上配置最精确的路由汇总,并且只允许在III区学到该汇总路由。
  7. 要求A1到F区的数据流走R4,A2到E区的数据流走R6(R5带A1和A2的源地址采用Traceroute测试)
  8. 在R7上配置,使其路由表中显示去往E、F区的下一跳是R6。
  9. 在R4上配置,使其访问E区走 I 区 --> III 区,其他路线不变 (要求:不允许策略路由和分发列表)

配置实现

基础配置

R1

R1#show run | s interface
interface Loopback0ip address 1.1.1.1 255.255.255.255ip ospf 89 area 2
interface Ethernet0/0ip address 14.1.1.1 255.255.255.0ip ospf 89 area 2duplex auto
interface Ethernet0/1ip address 12.1.1.1 255.255.255.0ip ospf 89 area 0duplex auto
R1#show run | s rout 
router ospf 89router-id 1.1.1.1

R2

R2#show run | s interface 
interface Loopback0ip address 2.2.2.2 255.255.255.255ip ospf 89 area 0
interface Loopback1ip address 22.22.22.22 255.255.255.255
interface Ethernet0/0ip address 23.1.1.2 255.255.255.0ip ospf 89 area 3duplex auto
interface Ethernet0/1ip address 12.1.1.2 255.255.255.0ip ospf 89 area 0duplex auto
R2#show run | s route
router ospf 89router-id 2.2.2.2

R3

R3(config-if)#do show run | s interface
interface Loopback0ip address 3.3.3.3 255.255.255.255ip ospf 89 area 3
interface Loopback1ip address 33.33.33.33 255.255.255.255
interface Ethernet0/0ip address 23.1.1.3 255.255.255.0ip ospf 89 area 3duplex auto
interface Ethernet0/1ip address 36.1.1.3 255.255.255.0ip ospf 89 area 3duplex auto
R3(config-if)#do show run | s route
router ospf 89router-id 3.3.3.3

R4

R4(config-route-map)#do show run | s interface  
interface Loopback0ip address 4.4.4.4 255.255.255.255ip ospf 89 area 2
interface Loopback1ip address 44.44.44.44 255.255.255.255
interface Ethernet0/0ip address 14.1.1.4 255.255.255.0ip ospf 89 area 2duplex auto
interface Ethernet0/1ip address 47.1.1.4 255.255.255.0duplex auto
R4(config-route-map)#do show run | s route
router eigrp 1network 44.44.44.44 0.0.0.0network 47.1.1.4 0.0.0.0eigrp router-id 4.4.4.4
router ospf 89router-id 4.4.4.4

R5

R5(config-router)#do show run | s interface 
interface Loopback0ip address 5.5.5.5 255.255.255.255
interface Loopback1ip address 55.55.55.55 255.255.255.0
interface Loopback2ip address 55.55.66.66 255.255.255.0
interface Ethernet0/2ip address 57.1.1.5 255.255.255.0duplex auto
R5(config-router)#do show run | s route
router eigrp 1network 0.0.0.0eigrp router-id 5.5.5.5
R5(config-router)#

R6

R6(config-router)#do show run | s interface 
interface Loopback0ip address 6.6.6.6 255.255.255.255ip ospf 89 area 3
interface Loopback1ip address 66.66.66.66 255.255.255.255
interface Ethernet0/0ip address 67.1.1.6 255.255.255.0duplex auto
interface Ethernet0/1ip address 36.1.1.6 255.255.255.0ip ospf 89 area 3duplex auto
R6(config-router)#do show run | s route
router eigrp 1distribute-list prefix A1 in network 66.66.66.66 0.0.0.0network 67.1.1.6 0.0.0.0eigrp router-id 6.6.6.6
router ospf 89router-id 6.6.6.6
R6(config-router)#

R7

R7(config-router)#do show run | s route
router eigrp 1network 0.0.0.0eigrp router-id 7.7.7.7
R7(config-router)#do show run | s interface 
interface Loopback0ip address 7.7.7.7 255.255.255.255
interface Loopback1ip address 77.77.77.77 255.255.255.255
interface Ethernet0/0ip address 67.1.1.7 255.255.255.0duplex auto
interface Ethernet0/1ip address 47.1.1.7 255.255.255.0duplex auto
interface Ethernet0/2ip address 57.1.1.7 255.255.255.0duplex auto
R7(config-router)#do show run | s route
router eigrp 1network 0.0.0.0eigrp router-id 7.7.7.7
R7(config-router)#

需求实现

1.A—F所有区用Loopback模拟,地址格式为:XX.XX.XX.XX/32,其中X为路由器编号。根据拓扑宣告进对应协议。A1和A2区为特例,A1:55.55.55.0/24,A2:55.55.66.0/24

基础配置中已完成

2.照拓扑图配置EIGRP/OSPF路由协议,关闭所有自动汇总。OSPF手动指明RID为Loopback 0地址。

基础配置中已完成

3.R4做双向重分布,R6把OSPF重分布到EIGRP,要求全网ping通。如无明确说明,禁止使用静态路由,禁止直接使用ACL过滤数据。

R4:

router eigrp 1
redistribute ospf 89 metric 10000 100 255 1 1500router ospf 89
redistribute eigrp 1 subnets

R6:

router eigrp 1
redistribute ospf 89 metric 10000 100 255 1 1500

4. A1区网段为55.55.55.0/24,配置R6使其禁止从R7学到此网段(要求:使用前缀列表)

R6:

ip prefix-list A1 deny 55.55.55.0/24
ip prefix-list A1 permit 0.0.0.0/0 le 32
router eigrp 1
distribute-list prefix A1 in Ethernet0/0

5. 在R4上配置,要求EIGRP重分布到OSPF时,B区Metric值为100,类型为E1;C区Metric值为200,类型为E1。 其他路由按照默认设置。

R4:

access-list 1 permit 44.44.44.44
access-list 2 permit 66.66.66.66route-map BCarea permit 10match ip address 1set metric 100set metric-type type-1
route-map BCarea permit 20match ip address 2set metric 200set metric-type type-1
route-map BCarea permit 30router ospf 89
redistribute eigrp 1 subnets route-map BCarea

6. 在R1的Area 0中增加以下网段:11.11.1.0/24、11.11.2.0/24 (用Loopback模拟),要求在R2上配置最精确的路由汇总,并且只允许在III区学到该汇总路由。

R1:

interface Loopback1ip address 11.11.1.1 255.255.255.0
interface Loopback2ip address 11.11.2.1 255.255.255.0
router ospf 89network 11.11.1.1 0.0.0.0 area 0network 11.11.2.1 0.0.0.0 area 0

R2:

router ospf 89area 0 range 11.11.0.0 255.255.252.0

现在要将这个汇总的路由限制在III区内,那就是要在R6上重分布到I区时,拦截该条汇总路由,不让他分布进I区的eigrp协议中
R6:

ip prefix-list R1-summary permit 11.11.0.0/22	// 精确匹配这条路由route-map R1-summary deny 10		//拒绝match的路由match ip address prefix-list R1-summary
route-map R1-summary permit 20router eigrp 1redistribute ospf 89 metric 10000 100 255 1 1500 route-map R1-summary

7. 要求A1到F区的数据流走R4,A2到E区的数据流走R6(R5带A1和A2的源地址采用Traceroute测试)

这个需求可以使用策略路由来实现这个功能, 根据源地址来决定路由走向,先定义两个ACL
R7:

access-list 155 permit 55.55.55.0 0.0.0.255 host 22.22.22.22 // 扩展ACL
access-list 166 permit 55.55.66.0 0.0.0.255 host 33.33.33.33route-map PBR permit 10match ip address 155set ip next-hop 47.1.1.4
route-map PBR permit 20match ip address 166set ip next-hop 67.1.1.6A1A2区进入R7的时候,配置策略路由
interface ethernet 0/2ip policy route-map PBR

测试结果
R5:

R5#traceroute 22.22.22.22 source 55.55.55.55
Type escape sequence to abort.
Tracing the route to 22.22.22.22
VRF info: (vrf in name/id, vrf out name/id)1 57.1.1.7 0 msec 1 msec 0 msec2 47.1.1.4 0 msec 1 msec 0 msec3 14.1.1.1 1 msec 0 msec 1 msec4 12.1.1.2 0 msec *  1 msec
R5#traceroute 33.33.33.33 source 55.55.66.66
Type escape sequence to abort.
Tracing the route to 33.33.33.33
VRF info: (vrf in name/id, vrf out name/id)1 57.1.1.7 0 msec 1 msec 0 msec2 67.1.1.6 1 msec 0 msec 0 msec3 36.1.1.3 1 msec *  0 msec

8. 在R7上配置,使其路由表中显示去往E、F区的下一跳是R6。

去往E、F区的路由是 22.22.22.22 33.33.33.33
R7: 路由表

      22.0.0.0/32 is subnetted, 1 subnets
D EX     22.22.22.22 [170/307200] via 67.1.1.6, 04:00:32, Ethernet0/0[170/307200] via 47.1.1.4, 04:00:32, Ethernet0/133.0.0.0/32 is subnetted, 1 subnets
D EX     33.33.33.33 [170/307200] via 67.1.1.6, 03:46:12, Ethernet0/0[170/307200] via 47.1.1.4, 03:46:12, Ethernet0/1

从路由表上得到的信息是,等价负载均衡的,现在只需增大去往R4的metric值,使的R6的metric优先,就可以达到目的
R7:

access-list 10 permit 22.22.22.22
access-list 10 permit 33.33.33.33
router eigrp 1offset-list 10 in 1 ethernet 0/1	//从R4通告过来的,通过ethernet 0/1接口 进来的方向

路由表结果

      22.0.0.0/32 is subnetted, 1 subnets
D EX     22.22.22.22 [170/307200] via 67.1.1.6, 00:00:02, Ethernet0/023.0.0.0/24 is subnetted, 1 subnets
D EX     23.1.1.0 [170/307200] via 67.1.1.6, 00:00:02, Ethernet0/0[170/307200] via 47.1.1.4, 00:00:02, Ethernet0/133.0.0.0/32 is subnetted, 1 subnets
D EX     33.33.33.33 [170/307200] via 67.1.1.6, 00:00:02, Ethernet0/0
R7(config-router)#do show ip eigrp topology 22.22.22.22/32
EIGRP-IPv4 Topology Entry for AS(1)/ID(7.7.7.7) for 22.22.22.22/32State is Passive, Query origin flag is 1, 1 Successor(s), FD is 307200Descriptor Blocks:67.1.1.6 (Ethernet0/0), from 67.1.1.6, Send flag is 0x0Composite metric is (307200/281600), route is ExternalVector metric:Minimum bandwidth is 10000 KbitTotal delay is 2000 microsecondsReliability is 255/255Load is 255/255Minimum MTU is 1500Hop count is 1Originating router is 6.6.6.6External data:AS number of route is 89External protocol is OSPF, external metric is 21Administrator tag is 0 (0x00000000)47.1.1.4 (Ethernet0/1), from 47.1.1.4, Send flag is 0x0Composite metric is (307201/281600), route is ExternalVector metric:Minimum bandwidth is 10000 KbitTotal delay is 2000 microsecondsReliability is 255/255Load is 255/255Minimum MTU is 1500Hop count is 1Originating router is 4.4.4.4External data:AS number of route is 89External protocol is OSPF, external metric is 21Administrator tag is 0 (0x00000000)
  67.1.1.6 (Ethernet0/0), from 67.1.1.6, Send flag is 0x0Composite metric is (307200/281600), route is External47.1.1.4 (Ethernet0/1), from 47.1.1.4, Send flag is 0x0Composite metric is (307201/281600), route is External

R4上的路由metric FD值为307201,比R6上的307200大了1

10. 在R4上配置,使其访问E区走 I 区 --> III 区,其他路线不变 (要求:不允许策略路由和分发列表)

R4上查询路由表得到

      33.0.0.0/32 is subnetted, 1 subnets
O IA     33.33.33.33 [110/31] via 14.1.1.1, 00:20:20, Ethernet0/0

查询Eigrp拓扑表可以查到以下记录

R4#show ip eigrp topology 33.33.33.33/32                 
EIGRP-IPv4 Topology Entry for AS(1)/ID(4.4.4.4) for 33.33.33.33/32State is Passive, Query origin flag is 1, 1 Successor(s), FD is 281600Descriptor Blocks:14.1.1.1, from Redistributed, Send flag is 0x0Composite metric is (281600/0), route is ExternalVector metric:Minimum bandwidth is 10000 KbitTotal delay is 1000 microsecondsReliability is 255/255Load is 255/255Minimum MTU is 1500Hop count is 0Originating router is 4.4.4.4External data:AS number of route is 89External protocol is OSPF, external metric is 31Administrator tag is 0 (0x00000000)47.1.1.7 (Ethernet0/1), from 47.1.1.7, Send flag is 0x0Composite metric is (332800/307200), route is ExternalVector metric:Minimum bandwidth is 10000 KbitTotal delay is 3000 microsecondsReliability is 255/255Load is 255/255Minimum MTU is 1500Hop count is 2Originating router is 6.6.6.6External data:AS number of route is 89External protocol is OSPF, external metric is 11Administrator tag is 0 (0x00000000)

我的想法是通过在eigrp里修改distance,达到目的,具体是这样的

access-list 33 permit 33.33.33.33 router eigrp 1distance 109 47.1.1.7 0.0.0.0 33

但是可惜没有能达到目的,因为33.33.33.33是eigrp外部路由,不能生效。 所以就改将ospf OIA的AD值为110的那条记录。修改成171,因为eigrp外部路由的AD值为170,这样的话,ospf的那条路由记录就会竞争RIB失效。从而达到我们的目的,从I区,III区走。

access-list 33 permit 33.33.33.33 router ospf 89distance 171 0.0.0.0 255.255.255.255 33

查询路由表得到

      33.0.0.0/32 is subnetted, 1 subnets
D EX     33.33.33.33 [170/332800] via 47.1.1.7, 00:00:07, Ethernet0/1测试路径
R4#traceroute 33.33.33.33
Type escape sequence to abort.
Tracing the route to 33.33.33.33
VRF info: (vrf in name/id, vrf out name/id)1 47.1.1.7 0 msec 0 msec 0 msec2 67.1.1.6 1 msec 0 msec 0 msec3 36.1.1.3 0 msec *  1 msec
R4#

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/823973.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

ArkTS基本概念装饰器

目录 ArkTS基本概念 装饰器汇总 ArkTS基本概念 ArkTS是HarmonyOS的主力应用开发语言。 它在TypeScript(简称TS)的基础上,匹配ArkUI框架,扩展了声明式UI、状态管理等相应的能力,让开发者以更简洁、更自然的方式开发跨…

Python变量与常量

第三章、变量与常量 一、标识符 1、定义 在 Python 中,标识符是用来标识变量、函数、类、模块或其他用户定义的对象的名称。标识符是程序员自定义的名称,用于在代码中标识不同的实体,使得代码可读性更强,更易于理解和维护。标识…

汽配订货系统 助力汽配行业数字化转型升级

一个汽配订货系统可以助力汽配行业数字化转型升级,提供以下功能和优势: 1. 订单管理:订货系统可以记录每笔订单的详细信息,包括客户信息、产品信息、价格、数量等,方便汽配商进行订单统计和分析。 2. 库存管理&#x…

mxxWechatBot微信机器人V2版本文档说明

大家伙,我是雄雄,欢迎关注微信公众号:雄雄的小课堂。 先看这里 一、前言二、mxxWechatBot流程图三、怎么使用? 一、前言 经过不断地探索与研究,mxxWechatBot正式上线,届时全面开放使用。 mxxWechatBot&am…

59. 螺旋矩阵 II

给你一个正整数 n ,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的 n x n 正方形矩阵 matrix 。 示例 1: 输入:n 3 输出:[[1,2,3],[8,9,4],[7,6,5]]示例 2: 输入:n 1 输出&…

OSPF的DR与BDR-新版(16)

目录 整体拓扑 操作步骤 1.基本配置 1.1 配置R1的IP 1.2 配置R2的IP 1.3 配置R3的IP 1.4 配置R4的IP 1.5 检测R1与R4连通性 1.6 检测R1与R2连通性 1.7 检测R1与R3连通性 2.搭建基本的OSPF网络 2.1 配置R1 OSPF 2.2 配置R2 OSPF 2.3 配置R3 OSPF 2.4 配置R4 OSPF…

前端常用的实用工具与网站

1. Snipaste–截图工具 Snipaste截图软件应该算是前端必备的截图软件了,之前也用过其他很多截图软件,这个算最为方便的了。而且最重要的时,它可以回滚截图历史,并且在回滚中还能截图。下面是官网地址的网站链接,当然我…

Unity坦克大战开发全流程——开始场景——设置界面

开始场景——设置界面 step1:设置面板的背景图 照着这个来设置就行了 step2:写代码 关联的按钮控件 监听事件函数 注意:要在start函数中再写一行HideMe函数,以便该面板能在一开始就能隐藏自己。 再在BeginPanel脚本中调用该函数即…

【AIGC-图片生成视频系列-2】八仙过海,各显神通:AI生成视频相关汇总剖析

最近「图片生成视频系列」层出不穷,我拜读并结合实践(对,就是手撕代码,有开源就撕),并对以下几篇文章的相似点以及关键点稍微做个总结: 一. 生成视频中图像的一致性 在图像生成视频的这个过程…

2023年全国网络安全行业职业技能大赛数据安全管理员操作技能赛题(样题)

2023年全国网络安全行业职业技能大赛数据安全管理员操作技能赛题(样题) 2023年全国网络安全行业职业技能大赛数据安全管理员操作技能赛题(样题) 第一部分:数据安全防护(30%) 第二部分:数据安全管理(30%) 第三部分:数据安全处置(40%) 项目介绍…

10.定时器各功能分析及编码

知识汇总: STM32的定时器有三种,高级定时器,通用定时器,基本定时器 就是功能多与少的差别,下面来逐个解释功能:在此之前,需要对几个概念有认知 几个概念: 1.定时器时钟频率&…

linux安装python

文章目录 前言一、下载安装包二、安装1.安装依赖2.解压3.安装4.软链接5.验证 总结 前言 本篇文章介绍linux环境下安装python。 一、下载安装包 下载地址:官方网站 我们以最新的标准版为例 二、安装 1.安装依赖 yum -y install openssl-devel ncurses-devel li…

mfc140u.dll丢失的解决方法,怎样修复mfc140u.dll

最近看到很多朋友在问找不到mfc140u.dll丢失怎么办?有什么解决方法,今天就给小伙伴们解答一下,mfc140u.dll丢失的解决办法,怎么修复mfc140u.dll。 一.丢失的原因 1.损坏的程序安装:在安装某个程序时,可能会出现意外中…

第六课:冷战和消费主义、个人计算机革命、图形用户界面(GUI)及3D图形

第六课:冷战和消费主义、个人计算机革命、图形用户界面(GUI)及3D图形 第二十四章:冷战和消费主义本课概括:政府和消费者推动了计算机的发展 第二十五章:个人计算机革命本集概括:继续讲计算机发展…

MySQL 数值函数,字符串函数与多表查询

MySQL像其他语言一样,也提供了很多库函数,分为单行函数和分组函数(聚合函数),我们这里先简易介绍一些函数,熟悉就行,知道怎么使用即可. 数值函数 三角函数 指数与对数函数 进制间的转换函数 字符串函数 注:LPAD函数是右对齐,RPAD函数是左对齐 多表查询 注:如果为表起了别名,就…

JavaScript使用教程(二):类型、值和变量

计算机程序通过操作值(如数值3.14)或文本(如“Hello World”)来工作。编程语言中这些可以表示和操作的值被称为类型,而一门语言支持的类型集也是这门语言最基本的特征。程序在需要把某个值保存下来以便将来使用时&…

用CSS中的动画效果做一个转动的表

<!DOCTYPE html> <html lang"en"><head><meta charset"utf-8"><title></title><style>*{margin:0;padding:0;} /*制作表的样式*/.clock{width: 500px;height: 500px;margin:0 auto;margin-top:100px;border-rad…

Post-hoc Concept Bottleneck Models (PCBM)

ICLR 2023 spotlight 文章链接&#xff1a;https://arxiv.org/abs/2205.15480 代码链接&#xff1a;https://github.com/mertyg/post-hoc-cbm 一、概述 Post-hoc CBM&#xff08;PCBM&#xff09;也是CBM大家族中的一员&#xff0c;因此它的基本逻辑与CBM一致&#xff0c;就是…

uniapp微信小程序接入友盟

一、登录友盟官网&#xff0c;按照引导注册友盟账号 二、在友盟平台新建小程序应用&#xff08;建好之后会得到appkey&#xff09; 进入小程序统计后台创建Appkey&#xff0c;按要求填写小程序名称及类型&#xff1a; 三、在微信小程序中接入SDK ---- 以下是npm 配置 1. 安装…

【docker实战】01 Linux上docker的安装

Docker CE是免费的Docker产品的新名称&#xff0c;Docker CE包含了完整的Docker平台&#xff0c;非常适合开发人员和运维团队构建容器APP。 Ubuntu 14.04/16.04&#xff08;使用 apt-get 进行安装&#xff09; # step 1: 安装必要的一些系统工具 sudo apt-get update sudo ap…