CCNP-23 路由重发布3(BSCI)

简介:

CCNP-23 路由重发布3

实验拓扑:

实验要求: R1 R2 之间采用集成的 ISIS 路由协议, R2 R3 之间采用 OSPF 路由协议,配置重发布,使 R1 R3 之间可以相互学习到对方的路由。
试验目的:掌握 OSPF ISIS 之间路由重发布的配置。

实验配置:
R1
R1(config)#router  isis
R1(config-router)#net 49.0001.1111.1111.1111.00
R1(config-router)#is-type level-1
R1(config-router)#exit
R1(config)#int s1/0
R1(config-if)#ip add 199.99.1.1 255.255.255.0
R1(config-if)#ip router  isis
R1(config-if)#no shu
R1(config-if)#exit
R1(config)#int loop0
R1(config-if)#ip add  1.1.1 .1 255.255.255.0
R1(config-if)#ip router  isis
R1(config-if)#exit
R1(config)#int loop1
R1(config-if)#ip add 172.16.1.1 255.255.255.0
R1(config-if)#ip router  isis
R1(config-if)#exit
R1(config)#int loop2
R1(config-if)#ip add 172.16.2.1 255.255.255.0
R1(config-if)#ip router  isis
R1(config-if)#exit
R1(config)#int loop3
R1(config-if)#ip add 172.16.3.1 255.255.255.0
R1(config-if)#ip router  isis
R1(config-if)#exit
R1(config)#int loop4
R1(config-if)#ip add 172.16.4.1 255.255.255.0
R1(config-if)#ip router  isis
R1(config-if)#exit
R1(config)#int loop5
R1(config-if)#ip add 172.16.5.1 255.255.255.0
R1(config-if)#ip router  isis
R1(config-if)#exit
 
R2
R2(config)#router  isis
R2(config-router)#net 49.0001.2222.2222.2222.00
R2(config-router)#exit
R2(config)#int s1/0
R2(config-if)#ip add 199.99.1.2 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shu
R2(config-if)#ip router  isis
R2(config-if)#exit
R2(config)#int loop0
R2(config-if)#ip add  2.2.2 .2 255.255.255.0
R2(config-if)#ip router  isis
R2(config-if)#exit
R2(config)#int s1/1
R2(config-if)#ip add 199.99.2.1 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#no shu
R2(config-if)#exit
R2(config)#int loop0
R2(config-if)#ip ospf network point-to-point
R2(config-if)#exit
R2(config)#router ospf 100
R2(config-router)#router-id  2.2.2 .2
R2(config-router)#network 199.99.2.0  0.0.0 .255 area 0
R2(config-router)#exit
 
R3
R3(config)#int s1/0
R3(config-if)#ip add 199.99.2.2 255.255.255.0
R3(config-if)#no shu
R3(config-if)#exit
R3(config)#int loop0
R3(config-if)#ip add  3.3.3 .3 255.255.255.0
R3(config-if)#ip ospf network point-to-point
R3(config-if)#exit
R3(config)#router ospf 100
R3(config-router)#router-id  3.3.3 .3
R3(config-router)#network 199.99.2.0  0.0.0 .255 area 0
R3(config-router)#exit
R3(config)#int loop1
R3(config-if)#ip add 172.17.1.1 255.255.255.0
R3(config-if)#exit
R3(config)#int loop2
R3(config-if)#ip add 172.17.2.1 255.255.255.0
R3(config-if)#exit
R3(config)#int loop3
R3(config-if)#ip add 172.17.3.1 255.255.255.0
R3(config-if)#exit
R3(config)#int loop4
R3(config-if)#ip add 172.17.4.1 255.255.255.0
R3(config-if)#exit
R3(config)#int loop5
R3(config-if)#ip add 172.17.5.1 255.255.255.0
R3(config-if)#exit
R3(config)#router ospf 100
R3(config-router)#network 172.17.1.0  0.0.0 .255 area 0
R3(config-router)#network 172.17.2.0  0.0.0 .255 area 0
R3(config-router)#network 172.17.3.0  0.0.0 .255 area 0
R3(config-router)#network 172.17.4.0  0.0.0 .255 area 0
R3(config-router)#network 172.17.5.0  0.0.0 .255 area 0
R3(config-router)#end
以上为基本的配置,配置完成后我们来查看一下每台路由器的路由表:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O -  OSPF IA  - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is 199.99.1.2 to network  0.0.0 .0
 
      1.0.0 .0/24 is subnetted, 1 subnets
C        1.1.1 .0 is directly connected, Loopback0
      2.0.0 .0/24 is subnetted, 1 subnets
i L1     2.2.2 .0 [115/20] via 199.99.1.2, Serial1/0
     172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
C       172.16.4.0/24 is directly connected, Loopback4
C       172.16.5.0/24 is directly connected, Loopback5
C       172.16.1.0/24 is directly connected, Loopback1
C       172.16.2.0/24 is directly connected, Loopback2
C       172.16.3.0/24 is directly connected, Loopback3
C    199.99.1.0/24 is directly connected, Serial1/0
i*L1  0.0.0 .0/0 [115/10] via 199.99.1.2, Serial1/0
ISIS 路由除了一条 R2 loopback 地址外还有一条缺省路由。
 
R2#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O -  OSPF IA  - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
      1.0.0 .0/24 is subnetted, 1 subnets
i L1     1.1.1 .0 [115/20] via 199.99.1.1, Serial1/0
      2.0.0 .0/24 is subnetted, 1 subnets
C        2.2.2 .0 is directly connected, Loopback0
     172.17.0.0/32 is subnetted, 5 subnets
O       172.17.4.1 [110/65] via 199.99.2.2, 00:00:13, Serial1/1
O       172.17.5.1 [110/65] via 199.99.2.2, 00:00:13, Serial1/1
O       172.17.1.1 [110/65] via 199.99.2.2, 00:00:13, Serial1/1
O       172.17.2.1 [110/65] via 199.99.2.2, 00:00:13, Serial1/1
O       172.17.3.1 [110/65] via 199.99.2.2, 00:00:13, Serial1/1
     172.16.0.0/24 is subnetted, 5 subnets
i L1    172.16.4.0 [115/20] via 199.99.1.1, Serial1/0
i L1    172.16.5.0 [115/20] via 199.99.1.1, Serial1/0
i L1    172.16.1.0 [115/20] via 199.99.1.1, Serial1/0
i L1    172.16.2.0 [115/20] via 199.99.1.1, Serial1/0
i L1    172.16.3.0 [115/20] via 199.99.1.1, Serial1/0
C    199.99.2.0/24 is directly connected, Serial1/1
C    199.99.1.0/24 is directly connected, Serial1/0
分别列出了从 ISIS OSPF 学到的路由。
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O -  OSPF IA  - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
      3.0.0 .0/24 is subnetted, 1 subnets
C        3.3.3 .0 is directly connected, Loopback0
     172.17.0.0/24 is subnetted, 5 subnets
C       172.17.5.0 is directly connected, Loopback5
C       172.17.4.0 is directly connected, Loopback4
C       172.17.1.0 is directly connected, Loopback1
C       172.17.3.0 is directly connected, Loopback3
C       172.17.2.0 is directly connected, Loopback2
C    199.99.2.0/24 is directly connected, Serial1/0
R3 只有直连路由被列出来了,呵呵!
下面开始在 R2 上配置路由重发布,首先,先将 OSPF 路由重发布到 ISIS 中去:
R2(config)#router  isis
R2(config-router)#redistribute ospf 100 level-1 metric 5
R2(config-router)#exit
重发布 OSPF 100 的路由以 level-1 的形式洪泛到 ISIS 中,并且定义其度量值为 5 ,然后在 R1 上查看路由表:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O -  OSPF IA  - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is 199.99.1.2 to network  0.0.0 .0
 
      1.0.0 .0/24 is subnetted, 1 subnets
C        1.1.1 .0 is directly connected, Loopback0
      2.0.0 .0/24 is subnetted, 1 subnets
i L1     2.2.2 .0 [115/20] via 199.99.1.2, Serial1/0
     172.17.0.0/32 is subnetted, 5 subnets
i L1    172.17.4.1 [115/15] via 199.99.1.2, Serial1/0
i L1    172.17.5.1 [115/15] via 199.99.1.2, Serial1/0
i L1    172.17.1.1 [115/15] via 199.99.1.2, Serial1/0
i L1    172.17.2.1 [115/15] via 199.99.1.2, Serial1/0
i L1    172.17.3.1 [115/15] via 199.99.1.2, Serial1/0
     172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
C       172.16.4.0/24 is directly connected, Loopback4
C       172.16.5.0/24 is directly connected, Loopback5
i L1    172.16.0.0/16 [115/15] via 199.99.1.2, Serial1/0
C       172.16.1.0/24 is directly connected, Loopback1
C       172.16.2.0/24 is directly connected, Loopback2
C       172.16.3.0/24 is directly connected, Loopback3
i L1 199.99.2.0/24 [115/15] via 199.99.1.2, Serial1/0
C    199.99.1.0/24 is directly connected, Serial1/0
i*L1  0.0.0 .0/0 [115/10] via 199.99.1.2, Serial1/0
上面用红颜色标记出来的都是从 OSPF 中学习到的路由,并且度量值为 15 ISIS 默认所有接口的度量值为 10 ),然后我们再在 R2 上配置,将 ISIS 路由重发布到 OSPF 中:
R2(config)#router ospf 100
R2(config-router)#redistribute  isis  level-1 metric 10 subnets
R2(config-router)#exit
重发布 ISIS level-1 的路由到 OSPF 中,并且定义其度量值为 10 。然后再到 R3 上查看路由表:
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O -  OSPF IA  - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
      1.0.0 .0/24 is subnetted, 1 subnets
O E2     1.1.1 .0 [110/10] via 199.99.2.1, 00:00:04, Serial1/0
      3.0.0 .0/24 is subnetted, 1 subnets
C        3.3.3 .0 is directly connected, Loopback0
     172.17.0.0/24 is subnetted, 5 subnets
C       172.17.5.0 is directly connected, Loopback5
C       172.17.4.0 is directly connected, Loopback4
C       172.17.1.0 is directly connected, Loopback1
C       172.17.3.0 is directly connected, Loopback3
C       172.17.2.0 is directly connected, Loopback2
     172.16.0.0/24 is subnetted, 5 subnets
O E2    172.16.4.0 [110/10] via 199.99.2.1, 00:00:04, Serial1/0
O E2    172.16.5.0 [110/10] via 199.99.2.1, 00:00:04, Serial1/0
O E2    172.16.1.0 [110/10] via 199.99.2.1, 00:00:05, Serial1/0
O E2    172.16.2.0 [110/10] via 199.99.2.1, 00:00:05, Serial1/0
O E2    172.16.3.0 [110/10] via 199.99.2.1, 00:00:05, Serial1/0
C    199.99.2.0/24 is directly connected, Serial1/0
好的,看到了 O E2 的路由了,接下来的工作就是配置路由汇总来减小路由表的大小了,在 R2 上配置:
R2(config)#router ospf 100
R2(config-router)#summary-address 172.16.0.0 255.255.0.0
R2(config-router)#exit
R2(config)#router  isis
R2(config-router)#summary-address 172.17.0.0 255.255.0.0 level-1
R2(config-router)#end
两个路由协议的路由汇总配置差不多。然后再分别查看 R1 R3 的路由表:
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O -  OSPF IA  - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is 199.99.1.2 to network  0.0.0 .0
 
      1.0.0 .0/24 is subnetted, 1 subnets
C        1.1.1 .0 is directly connected, Loopback0
      2.0.0 .0/24 is subnetted, 1 subnets
i L1     2.2.2 .0 [115/20] via 199.99.1.2, Serial1/0
i L1 172.17.0.0/16 [115/15] via 199.99.1.2, Serial1/0
     172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
C       172.16.4.0/24 is directly connected, Loopback4
C       172.16.5.0/24 is directly connected, Loopback5
i L1    172.16.0.0/16 [115/15] via 199.99.1.2, Serial1/0
C       172.16.1.0/24 is directly connected, Loopback1
C       172.16.2.0/24 is directly connected, Loopback2
C       172.16.3.0/24 is directly connected, Loopback3
i L1 199.99.2.0/24 [115/15] via 199.99.1.2, Serial1/0
C    199.99.1.0/24 is directly connected, Serial1/0
i*L1  0.0.0 .0/0 [115/10] via 199.99.1.2, Serial1/0
路由被汇总了,再看看 R3 的:
R3#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O -  OSPF IA  - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
      1.0.0 .0/24 is subnetted, 1 subnets
O E2     1.1.1 .0 [110/10] via 199.99.2.1, 00:00:57, Serial1/0
      3.0.0 .0/24 is subnetted, 1 subnets
C        3.3.3 .0 is directly connected, Loopback0
     172.17.0.0/24 is subnetted, 5 subnets
C       172.17.5.0 is directly connected, Loopback5
C       172.17.4.0 is directly connected, Loopback4
C       172.17.1.0 is directly connected, Loopback1
C       172.17.3.0 is directly connected, Loopback3
C       172.17.2.0 is directly connected, Loopback2
O E2 172.16.0.0/16 [110/10] via 199.99.2.1, 00:00:02, Serial1/0
C    199.99.2.0/24 is directly connected, Serial1/0
同样也只剩下了一条汇总路由。下面我们来看一下 R2 的路由表:
R2#show ip
*Nov  7 19:52:17.211: %SYS-5-CONFIG_I: Configured from console by consoleroute
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O -  OSPF IA  - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route
 
Gateway of last resort is not set
 
      1.0.0 .0/24 is subnetted, 1 subnets
i L1     1.1.1 .0 [115/20] via 199.99.1.1, Serial1/0
      2.0.0 .0/24 is subnetted, 1 subnets
C        2.2.2 .0 is directly connected, Loopback0
     172.17.0.0/16 is variably subnetted, 6 subnets, 2 masks
O       172.17.4.1/32 [110/65] via 199.99.2.2, 00:06:37, Serial1/1
O       172.17.5.1/32 [110/65] via 199.99.2.2, 00:06:37, Serial1/1
O       172.17.1.1/32 [110/65] via 199.99.2.2, 00:06:37, Serial1/1
i su    172.17.0.0/16 [115/5] vi a 0.0.0 .0, Null0
O       172.17.2.1/32 [110/65] via 199.99.2.2, 00:06:37, Serial1/1
O       172.17.3.1/32 [110/65] via 199.99.2.2, 00:06:37, Serial1/1
     172.16.0.0/16 is variably subnetted, 6 subnets, 2 masks
i L1    172.16.4.0/24 [115/20] via 199.99.1.1, Serial1/0
i L1    172.16.5.0/24 [115/20] via 199.99.1.1, Serial1/0
O       172.16.0.0/16 is a summary, 00:02:21, Null0
i L1    172.16.1.0/24 [115/20] via 199.99.1.1, Serial1/0
i L1    172.16.2.0/24 [115/20] via 199.99.1.1, Serial1/0
i L1    172.16.3.0/24 [115/20] via 199.99.1.1, Serial1/0
C    199.99.2.0/24 is directly connected, Serial1/1
C    199.99.1.0/24 is directly connected, Serial1/0

实验总结:掌握 ISIS OSPF 路由协议之间的路由重发布的配置,以及路由汇总的配置方法。






















本文转自loveme2351CTO博客,原文链接: http://blog.51cto.com/loveme23/49592  ,如需转载请自行联系原作者


相关文章
|
1月前
|
供应链 搜索推荐 API
从0到1掌握1688API:图片搜索获取技巧与避坑指南
1688图片搜索API基于图像识别技术,支持上传JPG/PNG格式图片(Base64或URL),实现同款或相似商品搜索。适用于电商选品、供应链管理等场景,提供价格、销量等多维度筛选,返回商品ID、标题、价格、销量及供应商信息。
|
2月前
|
算法 数据挖掘 异构计算
【多目标优化算法比较】MOFPA、MOFA、MOCS、MOBA、MOHHO五种多目标优化算法性能对比研究(Matlab代码实现)
【多目标优化算法比较】MOFPA、MOFA、MOCS、MOBA、MOHHO五种多目标优化算法性能对比研究(Matlab代码实现)
195 0
【多目标优化算法比较】MOFPA、MOFA、MOCS、MOBA、MOHHO五种多目标优化算法性能对比研究(Matlab代码实现)
|
编解码 监控 算法
图像和视频处理中DSP算法的研究与发展
图像和视频处理中DSP算法的研究与发展
337 2
|
10月前
|
前端开发 Java 数据库连接
【潜意识Java】深度解读JavaWeb开发在Java学习中的重要性
深度解读JavaWeb开发在Java学习中的重要性
194 4
|
11月前
|
Linux API 开发工具
魔搭llamafile集成:让大模型开箱即用
Llamafile是一个将大模型和其所需运行环境,全封装在一个可执行文件中的开源创新项目。为了方便广大开发者能以更低的门槛使用大模型,魔搭社区上提供了大量优秀模型的llamafile格式。
360 5
|
自然语言处理 Shell 开发者
|
存储 监控 数据可视化
性能测试:主流性能剖析工具介绍
**性能剖析**是识别应用性能瓶颈的关键,涉及指标收集、热点分析、优化建议及可视化报告。常用工具有:**JConsole**监控JVM,**VisualVM**多合一分析,**JStack**分析线程,**FlameGraph**展示CPU耗时,**SkyWalking**分布式跟踪,**Zipkin**追踪服务延迟。这些工具助力开发人员提升系统响应速度和资源效率。
|
存储 安全 搜索推荐
深入理解 Session-Expire 头字段的作用
【8月更文挑战第24天】
301 0
|
JavaScript 容器
vue element plus Space 间距
vue element plus Space 间距
397 0
|
传感器 XML 物联网
Android项目实战(三十四):蓝牙4.0 BLE 多设备连接
原文:Android项目实战(三十四):蓝牙4.0 BLE 多设备连接   最近项目有个需求,手机设备连接多个蓝牙4.0 设备 并获取这些设备的数据。   查询了很多资料终于实现,现进行总结。   ------------------------------------------------...
1824 1