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  ,如需转载请自行联系原作者


相关文章
|
8月前
|
监控 安全 Java
SpringBoot实现日志系统,代码世界的“摄像头”与“记事本”
如果你的程序突然“挂掉”了,你却不知道它死前经历了什么——这比看悬疑电影看到一半停电还难受!日志系统就是你的“侦探助手”,它悄咪咪地记录着程序的一举一动。
275 0
|
存储 机器学习/深度学习 人工智能
二维码生成原理和解码原理
二维码(Quick Response Code,简称QR码)是一种广泛使用的二维条形码技术。二维码能有效地存储和传递信息,广泛应用于商品追溯、支付、广告等多个领域。二维码的主要特点是信息存储量大、读取速度快、容错能力强等。
4720 2
|
小程序
如何制作一个简单的微信小程序
据官方资料显示,微信小程序的数量和使用人数都在不断增长,在流量天花板的环境中,这样的用户增长和使用增长都是一颗可遇不可求的重要机遇,很多线下个体商家也看到了这一趋势,想要紧紧抓住机遇,制作一个微信小程序。 随着科学技术的不断发展,许多以前要齐心协力完成的事情,现在都可以凭一人之力就可以完成。做微信小程序这个看似十分复杂的事情,在如今看来,其实个人也可以很快的完成。 无需懂代码懂技术,都可以个人做出【微信小程序】具体应该如何操作?下文给你带来详细解读。 Ⅰ. 选择自助搭建平台,直接使用免费小程序模板
620 0
1.2.2认识各个硬件部件
1.2.2认识各个硬件部件
不要累死自己,也不要卷死别人。
不要累死自己,也不要卷死别人。
354 0
|
缓存 安全 前端开发
今天520,要及时「缓存」你们的珍贵时光。(一)
在很久很久以前人类和洪水作斗争的过程中,水库发挥了至关重要的作用 : 在发洪水时可以蓄水,缓解洪水对下游的冲击;在干旱时可以把库存的水释放出来以供人们使用。这里的水库就起着缓存的作用。在如今互联网的世界里随着互联网的普及,内容信息越来越复杂,用户数和访问量越来越大,我们的应用需要支撑更多的并发量,同时我们的应用服务器和数据库服务器所做的计算也越来越多。
今天520,要及时「缓存」你们的珍贵时光。(一)
|
监控 Java 应用服务中间件
如何计算tomcat线程池大小?
背景   在我们的日常开发中都涉及到使用tomcat做为服务器,但是我们该设置多大的线程池呢?以及根据什么原则来设计这个线程池呢?   接下来,我将介绍本人是怎么设计以及计算的。 目标   确定tomcat服务器线程池大小 具体方法   众所周知,tomcat接受一个request后处理过程中,会涉及到cpu和IO时间。
1919 0
|
Perl
[实变函数]5.3 非负可测函数的 Lebesgue 积分
本节中, 设 $f,g,f_i$ 是可测集 $E$ 上的非负可测函数, $A,B$ 是 $E$ 的可测子集.       1 定义:                         (1) $f$ 在 $E$ 上的 Lebesgue 积分        $$\bex        \int_...
1237 0
|
2天前
|
监控 网络协议 算法
2026年起SSL证书有效期逐年缩短:企业如何避免“续期风暴”!
SSL证书有效期将从2026年起分三阶段逐步缩短至47天,人工续期难以为继。阿里云“WoSign SSL证书+自动化服务”,支持域名监控、自动托管、云产品/服务器一键部署及智能提醒,助力企业高效应对高频续期挑战。
8079 2
|
11天前
|
域名解析 人工智能 Linux